iqm.benchmarks.randomized_benchmarking.randomized_benchmarking_common#
Common functions for Randomized Benchmarking-based techniques
Functions
|
Function to compute the inverse Clifford of a circuit :param qc_inv: The Clifford circuit to be inverted :type qc_inv: QuantumCircuit :param clifford_dictionary: A dictionary of Clifford gates labeled by (de)stabilizers :type clifford_dictionary: Dict |
|
Compute a result's probability of being on the ground state. |
|
Fit function for interleaved/non-interleaved RB |
|
Perform a fitting routine for 0th-order (Ap^m+B) RB using lmfit |
|
|
Generates parallel RB circuits, before and after transpilation, at fixed depth |
|
|
Generate random Clifford circuits in native gates for a given sequence length. |
|
Compute a result's probability of being on the ground state. |
Import native gate Clifford dictionaries :returns: Dictionaries of 1Q and 2Q Clifford gates |
|
|
|
|
Plot the fidelity decay and the fit to the model. |
Helper function to relabel a qubits array to an increasingly ordered one starting from zero e.g., [[2,3], [5], [7,8]] -> [[0,1], [2], [3,4]] Note: this assumes the input array is sorted in increasing order! |
|
|
Submit fixed-depth parallel MRB jobs for execution in the specified IQMBackend :param backend_arg: the IQM backend to submit the job :type backend_arg: IQMBackendBase :param qubits_array: the qubits to identify the submitted job :type qubits_array: List[int] :param depth: the depth (number of canonical layers) of the circuits to identify the submitted job :type depth: int :param sorted_transpiled_circuit_dicts: A dictionary containing all MRB circuits :type sorted_transpiled_circuit_dicts: Dict[Tuple[int,...], List[QuantumCircuit]] :param shots: the number of shots to submit the job :type shots: int :param calset_id: the calibration identifier :type calset_id: Optional[str] :param max_gates_per_batch: the maximum number of gates per batch to submit the job :type max_gates_per_batch: Optional[str] |
|
Submit sequential RB jobs for execution in the specified IQMBackend :param qubits: the qubits to identify the submitted job :type qubits: List[int] :param transpiled_circuits: A dictionary containing all MRB circuits :type transpiled_circuits: Dict[str, List[QuantumCircuit]] :param shots: the number of shots to submit per job :type shots: int :param backend_arg: the IQM backend to submit the job :type backend_arg: IQMBackendBase :param calset_id: the calibration identifier :type calset_id: Optional[str] :param max_gates_per_batch: the maximum number of gates per batch :type max_gates_per_batch: Optional[int] |
Estimates marginalized survival probabilities from a parallel RB execution (at fixed depth) :param qubits_array: List of qubits in which the experiment was performed :type qubits_array: List[int] :param counts: The measurement counts for corresponding bitstrings :type counts: Dict[str, int] |
|
|
Validate that an input gate is Clifford and transpiled to IQM's native basis |
|
Validate qubit inputs for a Clifford RB experiment :param qubits_array: the array of qubits :type qubits_array: List[List[int]] :param backend_arg: the IQM backend :type backend_arg: IQMBackendBase |