estimate_variance¶
-
forest.benchmarking.tomography.
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.
Parameters: - results – Measured results from a state tomography experiment
- qubits – Qubits that were tomographized.
- tomo_estimator – takes in
results, qubits
and returns a corresponding estimate of the state rho, e.g.linear_inv_state_estimate
- functional – Which functional to find variance, e.g.
dm.purity
. - target_state – A density matrix of the state with respect to which the distance
functional is measured. Not applicable if functional is
dm.purity
. - n_resamples – The number of times to re-sample.
- project_to_physical – Whether to project the estimated state to a physical one
with
project_state_matrix_to_physical()
.