iqm.benchmarks.entanglement.ghz.GHZBenchmark#
- class iqm.benchmarks.entanglement.ghz.GHZBenchmark(backend: IQMBackendBase, configuration: GHZConfiguration)#
Bases:
Benchmark
The GHZ Benchmark estimates the quality of generated Greenberger–Horne–Zeilinger states
Attributes
name
Methods
add_configuration_to_dataset
(dataset)Creates a xarray.Dataset and adds the circuits and configuration metadata to it.
analysis_function
(run)Analyze counts and compute the state fidelity
execute
(backend)Executes the benchmark.
Takes a given GHZ circuit and outputs circuits needed to measure fidelity via mult.
generate_native_ghz
(qubit_layout, ...)Generate a circuit preparing a GHZ state, according to a given routine and transpiled to the native gate set and topology.
generate_readout_circuit
(qubit_layout, ...)A wrapper for the creation of different circuits to estimate the fidelity
- Parameters:
backend (IQMBackendBase) –
configuration (GHZConfiguration) –
- static analysis_function(run: BenchmarkRunResult) BenchmarkAnalysisResult #
Analyze counts and compute the state fidelity
- Parameters:
run (BenchmarkRunResult) – RunResult The RunResult object containing a dataset with counts and benchmark parameters
- Returns:
- AnalysisResult
An object containing the dataset, plots, and observations
- Return type:
- generate_native_ghz(qubit_layout: List[int], qubit_count: int, routine: str) CircuitGroup #
Generate a circuit preparing a GHZ state, according to a given routine and transpiled to the native gate set and topology.
- Parameters:
qubit_layout (List[int]) – List[int] The subset of system-qubits used in the protocol, indexed from 0
qubit_count (int) – int The number of qubits for which a GHZ state should be created. This values should be smaller or equal to the number of qubits in qubit_layout
routine (str) – str The routine to generate the GHZ circuit
- Returns:
QuantumCircuit implementing GHZ native state
- Return type:
- generate_coherence_meas_circuits(qubit_layout: List[int], qubit_count: int) List[IQMCircuit] #
Takes a given GHZ circuit and outputs circuits needed to measure fidelity via mult. q. coherences method
- Parameters:
- Returns:
- List[QuantumCircuit]
A list of transpiled quantum circuits to be measured
- Return type:
qc_list_transpiled
- generate_readout_circuit(qubit_layout: List[int], qubit_count: int) CircuitGroup #
A wrapper for the creation of different circuits to estimate the fidelity
- Parameters:
- Returns:
- List[QuantumCircuit]
A list of transpiled quantum circuits to be measured
- Return type:
all_circuits_list
- add_configuration_to_dataset(dataset: Dataset)#
Creates a xarray.Dataset and adds the circuits and configuration metadata to it.
- Parameters:
dataset (xr.Dataset) –
- Returns:
dataset to be used for further data storage
- Return type:
xr.Dataset
- execute(backend) Dataset #
Executes the benchmark.
- Return type:
Dataset