iqm.benchmarks.randomized_benchmarking.direct_rb.direct_rb.generate_drb_circuits#
- iqm.benchmarks.randomized_benchmarking.direct_rb.direct_rb.generate_drb_circuits(qubits: Sequence[int], depth: int, circ_samples: int, backend_arg: IQMBackendBase | str, density_2q_gates: float = 0.25, two_qubit_gate_ensemble: Dict[str, float] | None = None, clifford_sqg_probability: float = 1.0, sqg_gate_ensemble: Dict[str, float] | None = None, qiskit_optim_level: int = 1, routing_method: Literal['basic', 'lookahead', 'stochastic', 'sabre', 'none'] = 'basic') Dict[str, List[QuantumCircuit]] #
- Generates lists of samples of Direct RB circuits, of structure:
Stabilizer preparation - Layers of canonical randomly sampled gates - Stabilizer measurement
- Parameters:
qubits (List[int]) – the qubits of the backend.
depth (int) – the depth (number of canonical layers) of the circuit.
circ_samples (int) – the number of circuit samples to generate.
backend_arg (IQMBackendBase | str) – the backend.
density_2q_gates (float) – the expected density of 2Q gates.
two_qubit_gate_ensemble (Optional[Dict[str, float]]) – A dictionary with keys being str specifying 2Q gates, and values being corresponding probabilities. * Default is None.
clifford_sqg_probability (float) – Probability with which to uniformly sample Clifford 1Q gates. * Default is 1.0.
sqg_gate_ensemble (Optional[Dict[str, float]]) – A dictionary with keys being str specifying 1Q gates, and values being corresponding probabilities. * Default is None.
qiskit_optim_level (int) – Qiskit transpiler optimization level. * Default is 1.
routing_method (Literal["basic", "lookahead", "stochastic", "sabre", "none"]) – Qiskit transpiler routing method. * Default is “basic”.
- Returns:
a dictionary with keys “transpiled”, “untranspiled” and values a list of respective DRB circuits.
- Return type:
Dict[str, List[QuantumCircuit]]