pyquil.operator_estimation.measure_observables(qc, tomo_experiment, n_shots=1000, progress_callback=None, active_reset=False, readout_symmetrize=None, calibrate_readout=None)[source]

Measure all the observables in a TomographyExperiment.

  • qc (QuantumComputer) – A QuantumComputer which can run quantum programs
  • tomo_experiment (TomographyExperiment) – A suite of tomographic observables to measure
  • n_shots (int) – The number of shots to take per ExperimentSetting
  • progress_callback – If not None, this function is called each time a group of settings is run with arguments f(i, len(tomo_experiment) such that the progress is i / len(tomo_experiment).
  • active_reset – Whether to actively reset qubits instead of waiting several times the coherence length for qubits to decay to |0> naturally. Setting this to True is much faster but there is a ~1% error per qubit in the reset operation. Thermal noise from “traditional” reset is not routinely characterized but is of the same order.
  • readout_symmetrize (Optional[str]) – Method used to symmetrize the readout errors, i.e. set p(0|1) = p(1|0). For uncorrelated readout errors, this can be achieved by randomly selecting between the POVMs {X.D1.X, X.D0.X} and {D0, D1} (where both D0 and D1 are diagonal). However, here we currently support exhaustive symmetrization and loop through all possible 2^n POVMs {X/I . POVM . X/I}^n, and obtain symmetrization more generally, i.e. set p(00|00) = p(01|01) = .. = p(11|11), as well as p(00|01) = p(01|00) etc. If this is None, no symmetrization is performed. The exhaustive method can be specified by setting this variable to ‘exhaustive’
  • calibrate_readout (Optional[str]) – Method used to calibrate the readout results. Currently, the only method supported is normalizing against the operator’s expectation value in its +1 eigenstate, which can be specified by setting this variable to ‘plus-eig’. The preceding symmetrization and this step together yield a more accurate estimation of the observable.