estimate_variance(results: List[forest.benchmarking.observable_estimation.ExperimentResult], qubits: List[int], tomo_estimator: Callable, functional: Callable, target_state=None, n_resamples: int = 40, project_to_physical: bool = False) → Tuple[float, float]¶
Use a simple bootstrap-like method to return an error bar on some functional of the quantum state.
- results – Measured results from a state tomography experiment
- qubits – Qubits that were tomographized.
- tomo_estimator – takes in
results, qubitsand returns a corresponding estimate of the state rho, e.g.
- functional – Which functional to find variance, e.g.
- target_state – A density matrix of the state with respect to which the distance
functional is measured. Not applicable if functional is
- n_resamples – The number of times to re-sample.
- project_to_physical – Whether to project the estimated state to a physical one