iqm.benchmarks.randomized_benchmarking.mirror_rb.mirror_rb.edge_grab#
- iqm.benchmarks.randomized_benchmarking.mirror_rb.mirror_rb.edge_grab(qubit_set: List[int], n_layers: int, backend_arg: IQMBackendBase | str, density_2q_gates: float = 0.25, two_qubit_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]) – 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]) – A dictionary with keys being str specifying 2Q 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:
List[QuantumCircuit]