iqm.benchmarks.randomized_benchmarking.randomized_benchmarking_common

iqm.benchmarks.randomized_benchmarking.randomized_benchmarking_common#

Common functions for Randomized Benchmarking-based techniques

Functions

compute_inverse_clifford(qc_inv, ...)

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

estimate_survival_probabilities(num_qubits, ...)

Compute a result's probability of being on the ground state.

exponential_rb(depths, ...)

Fit function for interleaved/non-interleaved RB

fit_decay_lmfit(func, qubit_set, data, ...)

Perform a fitting routine for 0th-order (Ap^m+B) RB using lmfit

generate_all_rb_circuits(qubits, ...)

param qubits:

List of qubits

generate_fixed_depth_parallel_rb_circuits(...)

Generates parallel RB circuits, before and after transpilation, at fixed depth

generate_random_clifford_seq_circuits(...[, ...])

Generate random Clifford circuits in native gates for a given sequence length.

get_survival_probabilities(num_qubits, counts)

Compute a result's probability of being on the ground state.

import_native_gate_cliffords()

Import native gate Clifford dictionaries :returns: Dictionaries of 1Q and 2Q Clifford gates

lmfit_minimizer(fit_parameters, fit_data, ...)

param fit_parameters:

the parameters to fit

plot_rb_decay(identifier, qubits_array, ...)

Plot the fidelity decay and the fit to the model.

relabel_qubits_array_from_zero(arr)

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_parallel_rb_job(backend_arg, ...)

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(qubits, ...[, ...])

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]

survival_probabilities_parallel(...)

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_irb_gate(gate_id, backend_arg[, ...])

Validate that an input gate is Clifford and transpiled to IQM's native basis

validate_rb_qubits(qubits_array, backend_arg)

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