iqm.benchmarks.quantum_volume.quantum_volume.QuantumVolumeBenchmark#
- class iqm.benchmarks.quantum_volume.quantum_volume.QuantumVolumeBenchmark(backend_arg: IQMBackendBase | str, configuration: QuantumVolumeConfiguration)#
Bases:
BenchmarkQuantum Volume reflects the deepest circuit a given number of qubits can execute with meaningful results.
Attributes
Methods
add_all_circuits_to_dataset(dataset)Adds all generated circuits during execution to the dataset variable.
add_all_meta_to_dataset(dataset)Adds all configuration metadata and circuits to the dataset variable.
analysis_function(run)Analysis function for a Quantum Volume experiment.
execute(backend)Executes the benchmark.
generate_circuit_list(num_qubits[, depth, ...])Generate a list of QV quantum circuits, with measurements at the end.
generate_single_circuit(num_qubits[, depth, ...])Generate a single QV quantum circuit, with measurements at the end.
get_rem_quasidistro(...)Computes readout-error-mitigated quasiprobabilities.
name()Returns the name of the benchmark.
submit_single_qv_job(backend, qubits, ...)Submit a single set of QV jobs for execution in the specified IQMBackend.
- Parameters:
backend_arg (IQMBackendBase | str)
configuration (QuantumVolumeConfiguration)
- static analysis_function(run: BenchmarkRunResult) BenchmarkAnalysisResult#
Analysis function for a Quantum Volume experiment.
- Parameters:
run (BenchmarkRunResult) – A Quantum Volume experiment run for which analysis result is created
- Returns:
AnalysisResult corresponding to Quantum Volume
- Return type:
- add_all_meta_to_dataset(dataset: Dataset) None#
Adds all configuration metadata and circuits to the dataset variable.
- Parameters:
dataset (Dataset) – The xarray dataset
- Return type:
None
- add_all_circuits_to_dataset(dataset: Dataset) None#
Adds all generated circuits during execution to the dataset variable.
- Parameters:
dataset (Dataset) – The xarray dataset
- Return type:
None
- static generate_single_circuit(num_qubits: int, depth: int | None = None, classical_permutation: bool = True) IQMCircuit#
Generate a single QV quantum circuit, with measurements at the end.
- Parameters:
- Returns:
The QV quantum circuit.
- Return type:
- generate_circuit_list(num_qubits: int, depth: int | None = None, classical_permutations: bool = True) list[IQMCircuit]#
Generate a list of QV quantum circuits, with measurements at the end.
- Parameters:
- Returns:
The list of QV quantum circuits.
- Return type:
- get_rem_quasidistro(sorted_transpiled_qc_list: dict[tuple, list[IQMCircuit]], sorted_qc_list_indices: dict[tuple, list[int]], execution_results: list[dict[str, int]], mit_shots: int) list[list[QuasiCollection]]#
Computes readout-error-mitigated quasiprobabilities.
- Parameters:
sorted_transpiled_qc_list (dict[tuple, list[IQMCircuit]]) – A dictionary of lists of quantum circuits, indexed by qubit layouts.
sorted_qc_list_indices (dict[tuple, list[int]]) – Dictionary of indices (integers) corresponding to those in the original (untranspiled) list of circuits, with keys being final physical qubit measurements.
execution_results (list[dict[str, int]]) – Counts from execution of all quantum circuits.
mit_shots (int) – The number of measurement shots to estimate the readout calibration errors.
- Returns:
A list of lists of quasiprobabilities.
- Return type:
- submit_single_qv_job(backend: IQMBackendBase, qubits: Sequence[int], sorted_transpiled_qc_list: dict[tuple[int, ...], list[IQMCircuit]]) dict[str, Any]#
Submit a single set of QV jobs for execution in the specified IQMBackend.
Organizes the results in a dictionary with the qubit layout, the submitted job objects, the type of QV results and submission time.
- Parameters:
backend (IQMBackendBase) – The IQM backend to submit the job.
qubits (Sequence[int]) – The qubits to identify the submitted job.
sorted_transpiled_qc_list (dict[tuple[int, ...], list[IQMCircuit]]) – A dictionary of lists of quantum circuits.
- Returns:
Dict with qubit layout, submitted job objects, type (vanilla/DD) and submission time.
- Return type:
- execute(backend: IQMBackendBase) Dataset#
Executes the benchmark.
- Parameters:
backend (IQMBackendBase)
- Return type: