iqm.benchmarks.compressive_gst.compressive_gst.CompressiveGST#
- class iqm.benchmarks.compressive_gst.compressive_gst.CompressiveGST(backend: IQMBackend | IQMFacadeBackend | str, configuration: GSTConfiguration)#
Bases:
BenchmarkSPAM-robust characterization of a set of quantum gates.
Attributes
Methods
add_configuration_to_dataset(dataset)Creates an xarray.Dataset and adds the circuits and configuration metadata to it.
analysis_function(run)Analysis function for compressive GST.
execute(backend)The main GST execution routine.
Generate random circuits from the gate set.
name()Returns the name of the benchmark.
Validate that the gate context is properly configured.
- Parameters:
backend (IQMBackend | IQMFacadeBackend | str)
configuration (GSTConfiguration)
- static analysis_function(run: BenchmarkRunResult) BenchmarkAnalysisResult#
Analysis function for compressive GST.
- Parameters:
run (BenchmarkRunResult) – A BenchmarkRunResult instance storing the dataset
- Returns:
A BenchmarkAnalysisResult instance with the updated dataset, as well as plots and observations
- Return type:
result
- validate_gate_context() None#
Validate that the gate context is properly configured.
Checks that: 1. If gate_context is a list, it has the same length as gate_set 2. The qubits used in gate_context don’t overlap with qubits in the layouts
- Raises:
ValueError – If gate_context is invalid or if qubits in gate_context overlap with qubits in layouts
- Return type:
None
- generate_meas_circuits() tuple[BenchmarkCircuit, BenchmarkCircuit]#
Generate random circuits from the gate set.
The random circuits are distributed among different depths ranging from L_MIN to L_MAX, both are configurable and stored in self.configuration.seq_len_list. No transpilation other than mapping to the desired qubits is performed, as the gates need to be executed axactly as described for GST to give meaningful results
- Returns:
The transpiled circuits untranspiled_circuits: The untranspiled circuits circuit_gen_transp_time: The time it took to generate and transpile the circuits
- Return type:
transpiled_circuits
- add_configuration_to_dataset(dataset: Dataset) None#
Creates an xarray.Dataset and adds the circuits and configuration metadata to it.
- Parameters:
self – Source class
dataset (Dataset) – Dataset to which the configuration is added
- Returns:
Dataset to be used for further data storage
- Return type:
dataset
- execute(backend: IQMBackend | IQMFacadeBackend) Dataset#
The main GST execution routine.
- Parameters:
backend (IQMBackend | IQMFacadeBackend)
- Return type: