generate_rb_experiment_sequences

forest.benchmarking.randomized_benchmarking.generate_rb_experiment_sequences(benchmarker: pyquil.api._benchmark.BenchmarkConnection, qubits: Sequence[int], depths: Sequence[int], interleaved_gate: pyquil.quil.Program = None, random_seed: int = None, use_self_inv_seqs=True) → List[List[pyquil.quil.Program]]

Generate the sequences of Clifford gates necessary to run a randomized benchmarking experiment for a single (group of) qubit(s).

A Clifford is given as a compiled sequence of native gates in a Program. The compilation is done by the BenchmarkConnection object. A sequence at a depth d is thus provided as a list of d programs each representing a random Clifford.

Calling this method separately on several different groups of qubits with the same depths will yield separate lists of sequences which can be passed to group_sequences_into_parallel_experiments in order to generate a ‘simultaneous’ RB experiment.

Parameters:
  • benchmarker – object returned from get_benchmarker() used to generate clifford sequences
  • qubits – the qubits for a single isolated rb experiment
  • depths – the depth of each sequence in the experiment.
  • interleaved_gate – optional gate to interleave throughout the sequence, see [IRB]
  • random_seed – Random seed passed to benchmarker to seed sequence generation.
  • use_self_inv_seqs – by default True, the last Clifford of the sequence will be the inverse of the composition of the previous Cliffords in the sequence; the entire sequence is thus the identity operation in the ideal case. If set to False then this last gate is simply omitted but the total number of gates is preserved.
Returns:

a list of all of the len(depths) many different Clifford sequences.