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.

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. an ObservablesExperiment that constitutes a state DFE experiment.