calibrate_observable_estimates¶
-
forest.benchmarking.observable_estimation.
calibrate_observable_estimates
(qc: pyquil.api._quantum_computer.QuantumComputer, expt_results: List[forest.benchmarking.observable_estimation.ExperimentResult], num_shots: int = 500, symmetrization_method: Callable = <function exhaustive_symmetrization>, noisy_program: pyquil.quil.Program = None) → Iterable[forest.benchmarking.observable_estimation.ExperimentResult]¶ Calibrates the expectation and std_err of the input expt_results and updates those estimates.
The input expt_results should be estimated with symmetrized readout error for this to work properly. Calibration is done by measuring expectation values of eigenstates of the observable, which ideally should yield either +/- 1 but in practice will have magnitude less than 1. For default exhaustive_symmetrization the calibration expectation magnitude averaged over all eigenvectors is recorded as calibration_expectation. The original expectation is moved to raw_expectation and replaced with the old value scaled by the inverse calibration expectation.
Parameters: - qc – a quantum computer object on which to run the programs necessary to calibrate each result.
- expt_results – a list of results, each of which will be separately calibrated.
- num_shots – the number of shots to run for each eigenvector
- symmetrization_method – by default every eigenvector of each observable is measured.
- noisy_program – an optional program from which to inherit a noise model; only relevant for running on a QVM
Returns: a copy of the input results with updated estimates and calibration results.