pyquil.operator_estimation module

pyquil.operator_estimation.measure_observables(qc: QuantumComputer, tomo_experiment: Experiment, progress_callback: Callable[[int, int], None] | None = None, calibrate_readout: str | None = 'plus-eig') Generator[ExperimentResult, None, None][source]

Measure all the observables in a TomographyExperiment.

  • qc – A QuantumComputer which can run quantum programs

  • tomo_experiment – A suite of tomographic observables to measure

  • 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).

  • calibrate_readout – 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’ (default value). The preceding symmetrization and this step together yield a more accurate estimation of the observable. Set to None if no calibration is desired.