do_tomography(qc: pyquil.api._quantum_computer.QuantumComputer, program: pyquil.quil.Program, qubits: List[int], kind: str, num_shots: int = 1000, active_reset: bool = False, group_tpb_settings: bool = True, mitigate_readout_errors: bool = True, show_progress_bar: bool = False) → Tuple[numpy.ndarray, forest.benchmarking.observable_estimation.ObservablesExperiment, List[forest.benchmarking.observable_estimation.ExperimentResult]]¶
A wrapper around experiment generation, data acquisition, and estimation that runs a tomography experiment and returns the state or process estimate along with the experiment and results.
- qc – A quantum computer object on which the experiment will run.
- program – A program that either constructs the state or defines the process to be
estimated, depending on whether
kindis ‘state’ or ‘process’ respectively.
- qubits – The qubits on which the estimated state or process are supported. This can be a
superset of the qubits used in
program, in which case it is assumed the identity acts on these extra qubits. Note that we assume qubits are initialized to the |0> state.
- kind – A string describing the kind of tomography to do (‘state’ or ‘process’)
- num_shots – The number of shots to run for each experiment setting.
- active_reset – Boolean flag indicating whether experiments should begin with an active reset instruction (this can make the collection of experiments run a lot faster).
- group_tpb_settings – if true, compatible settings will be formed into groups that can be estimated concurrently from the same shot data. This will speed up the data acquisition time by reducing the total number of runs, but be aware that grouped settings will have non-zero covariance.
- mitigate_readout_errors – Boolean flag indicating whether bias due to imperfect readout should be corrected
- show_progress_bar – displays a progress bar via tqdm if true.
The estimated state prepared by or process represented by the input
program, as implemented on the provided
qc, along with the experiment and corresponding results.