generate_monte_carlo_state_dfe_experiment

forest.benchmarking.direct_fidelity_estimation.generate_monte_carlo_state_dfe_experiment(benchmarker: pyquil.api._benchmark.BenchmarkConnection, program: pyquil.quil.Program, qubits: List[int], n_terms=200) → forest.benchmarking.observable_estimation.ObservablesExperiment

Estimate state fidelity by sampled direct fidelity estimation.

This leads to constant overhead (w.r.t. number of qubits) fidelity estimation.

The algorithm is due to [DFE1] and [DFE2].

Parameters:
  • program – A program comprised of clifford gates that constructs a state for which we estimate the fidelity.
  • qubits – The qubits to perform DFE on. This can be a superset of the qubits used in program, in which case it is assumed the identity acts on these qubits. Note that we assume qubits are initialized to the |0> state.
  • benchmarker – The BenchmarkConnection object used to design experiments
  • n_terms – Number of randomly chosen observables to measure. This number should be a constant less than 2**len(qubits), otherwise exhaustive_state_dfe is more efficient.
Returns:

an ObservablesExperiment that constitutes a state DFE experiment.