do_rpe

forest.benchmarking.robust_phase_estimation.do_rpe(qc: pyquil.api._quantum_computer.QuantumComputer, rotation: pyquil.quil.Program, changes_of_basis: List[pyquil.quil.Program], qubit_groups: Sequence[Sequence[int]], num_depths: int = 6, multiplicative_factor: float = 1.0, additive_error: float = None, active_reset: bool = False, mitigate_readout_errors: bool = False, show_progress_bar: bool = False) → Tuple[Dict[Tuple[int, ...], float], List[forest.benchmarking.observable_estimation.ObservablesExperiment], List[List[forest.benchmarking.observable_estimation.ExperimentResult]]]

A wrapper around experiment generation, data acquisition, and estimation that runs robust phase estimation.

The changes_of_basis paired with qubit_groups implicitly specify the accumulation of which phases are being measured with respect to increasing applications of rotation. This can be used to facilitate multiple ‘parallel’ RPE experiments that measure the phase of several single qubit gates in parallel. It also allows for cross talk experiments where one physical gate drives effective rotations that are monitored on spectator qubits.

Parameters:
  • qc – A quantum computer object on which the experiment will run.
  • rotation – the program or gate whose angle of rotation is to be estimated. Note that this program will be run through forest_benchmarking.compilation.basic_compile().
  • changes_of_basis – a list of programs implementing the change of basis transformation which maps the computational basis states to the appropriate eigenvectors on each group of qubits provided.
  • qubit_groups – The partition of qubits into groups. For each group we will estimate an rb decay. Each decay should be interpreted as a ‘simultaneous rb decay’ as the sequences on each group of qubits will be run concurrently.
  • num_depths – the number of depths in the experiment
  • multiplicative_factor – ad-hoc factor to multiply the number of shots per iteration. See num_trials() which computes the optimal number of shots per iteration.
  • additive_error – estimate of the max additive error in the experiment, see num_trials()
  • active_reset – Boolean flag indicating whether experiments should begin with an active reset instruction (this can make the collection of experiments run a lot faster).
  • mitigate_readout_errors – Boolean flag indicating whether bias due to imperfect readout should be corrected
  • show_progress_bar – displays a progress bar via tqdm if true.
Returns:

The estimated rb decays for each group of qubits, along with the experiment and corresponding results.