do_rb

forest.benchmarking.randomized_benchmarking.do_rb(qc: pyquil.api._quantum_computer.QuantumComputer, benchmarker: pyquil.api._benchmark.BenchmarkConnection, qubit_groups: Sequence[Sequence[int]], depths: Sequence[int], interleaved_gate: pyquil.quil.Program = None, is_unitarity_expt: bool = False, num_shots: int = 1000, active_reset: 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 a RB experiment on the qubit_groups and returns the rb_decay along with the experiments and results.

Parameters:
  • qc – A quantum computer object on which the experiment will run.
  • benchmarker – object returned from pyquil.api.get_benchmarker() used to generate sequences of Clifford elements decomposed into native gates.
  • 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.
  • depths – the depth of each sequence in the experiment
  • interleaved_gate – optional gate to interleave throughout the sequence, see [IRB]
  • is_unitarity_expt – True if the desired experiment is a unitarity experiment, in which case additional settings are required to estimate the purity of the sequence output.
  • num_shots – The number of shots collected for each experiment setting on each sequence.
  • 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).
  • 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.