iqm.benchmarks.randomized_benchmarking.randomized_benchmarking_common.edge_grab#
- iqm.benchmarks.randomized_benchmarking.randomized_benchmarking_common.edge_grab(qubit_set: list[int] | Sequence[int], n_layers: 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) list[IQMCircuit]#
Generate a list of random layers containing single-qubit Cliffords and two-qubit gates.
Sampled according to the edge-grab algorithm (see arXiv:2204.07568 [quant-ph]).
- Parameters:
qubit_set (list[int] | Sequence[int]) – The set of qubits of the backend.
n_layers (int) – The number of layers.
backend_arg (IQMBackendBase | str) – IQM backend.
density_2q_gates (float) – The expected density of 2Q gates in a circuit formed by subsequent application of layers.
two_qubit_gate_ensemble (dict[str, float] | None) – A dictionary with keys being str specifying 2Q gates, and values being corresponding probabilities.
clifford_sqg_probability (float) – Probability with which to uniformly sample Clifford 1Q gates.
sqg_gate_ensemble (dict[str, float] | None) – A dictionary with keys being str specifying 1Q gates, and values being corresponding probabilities.
- Raises:
ValueError – if the probabilities in the gate ensembles do not add up to unity.
- Returns:
The list of gate layers, in the form of quantum circuits.
- Return type: