iqm.benchmarks.entanglement.ghz.GHZConfiguration#

class iqm.benchmarks.entanglement.ghz.GHZConfiguration(*, benchmark: ~typing.Type[~iqm.benchmarks.benchmark_definition.Benchmark] = <class 'iqm.benchmarks.entanglement.ghz.GHZBenchmark'>, shots: int = 1024, max_gates_per_batch: int | None = None, calset_id: str | None = None, routing_method: ~typing.Literal['basic', 'lookahead', 'stochastic', 'sabre', 'none'] = 'sabre', physical_layout: ~typing.Literal['fixed', 'batching'] = 'fixed', state_generation_routine: str = 'tree', custom_qubits_array: ~typing.Sequence[~typing.Sequence[int]] | None = None, qubit_counts: ~typing.Sequence[int] | None = None, qiskit_optim_level: int = 3, optimize_sqg: bool = True, fidelity_routine: str = 'coherences', num_RMs: int | None = 100, rem: bool = True, mit_shots: int = 1000, cal_url: str | None = None)#

Bases: BenchmarkConfigurationBase

GHZ state configuration

Parameters:
  • benchmark (Type[Benchmark]) –

  • shots (int) –

  • max_gates_per_batch (int | None) –

  • calset_id (str | None) –

  • routing_method (Literal['basic', 'lookahead', 'stochastic', 'sabre', 'none']) –

  • physical_layout (Literal['fixed', 'batching']) –

  • state_generation_routine (str) –

  • custom_qubits_array (Sequence[Sequence[int]] | None) –

  • qubit_counts (Sequence[int] | None) –

  • qiskit_optim_level (int) –

  • optimize_sqg (bool) –

  • fidelity_routine (str) –

  • num_RMs (int | None) –

  • rem (bool) –

  • mit_shots (int) –

  • cal_url (str | None) –

benchmark#

GHZBenchmark

Type:

Type[Benchmark]

state_generation_routine#

The routine to construct circuits generating a GHZ state. Possible values: - “tree” (default): Optimized GHZ state generation circuit in log depth that takes the qubit coupling and CZ fidelities into account. The algorithm creates a minimal spanning tree for the qubit layout and chooses an initial qubit that minimizes largest weighted distance to all other qubits. - “log”: Optimized circuit with parallel application of CX gates such that the number of CX gates scales logarithmically in the system size. This implementation currently does not take connectivity on the backend into account. - “naive”: Applies the naive textbook circuit with #CX gates scaling linearly in the system size. * If other is specified, assumes “log”.

Type:

str

custom_qubits_array#

A sequence (e.g., Tuple or List) of sequences of

Type:

Optional[Sequence[Sequence[int]]]

physical qubit layouts, as specified by integer labels, where the benchmark is meant to be run.
  • If None, takes all qubits specified in the backend coupling map.

qubit_counts#

CURRENTLY NOT SUPPORTED, A sequence (e.g., Tuple or List) of integers

Type:

Optional[Sequence[int]]

denoting number of qubits
for which the benchmark is meant to be run. The largest qubit count provided here has to be smaller than the
smalles given qubit layout.
qiskit_optim_level#

The optimization level used for transpilation to backend architecture. * Default: 3

Type:

int

optimize_sqg#

Whether consecutive single qubit gates are optimized for reduced gate count via

Type:

bool

iqm.qiskit_iqm.iqm_transpilation.optimize_single_qubit_gates#
  • Default: True

fidelity_routine#

The method with which the fidelity is estimated. Possible values: - “coherences”: The multiple quantum coherences method as in [Mooney, 2021] - “randomized_measurements”: Fidelity estimation via randomized measurements outlined in https://arxiv.org/abs/1812.02624 * Default is “coherences”

Type:

str

num_RMs#

The number of randomized measurements used if the respective fidelity routine is chosen * Default: 100

Type:

Optional[int]

rem#

Boolean flag determining if readout error mitigation is used * Default: True

Type:

bool

mit_shots#

Total number of shots for readout error mitigation * Default: 1000

Type:

int

cal_url#

Optional URL where the calibration data for the selected backend can be retrieved from The calibration data is used for the “tree” state generation routine to prioritize couplings with high CZ fidelity. * Default: None

Type:

Optional[str]

Attributes

model_computed_fields

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

benchmark

state_generation_routine

custom_qubits_array

qubit_counts

shots

qiskit_optim_level

optimize_sqg

fidelity_routine

num_RMs

rem

mit_shots

cal_url

max_gates_per_batch

calset_id

routing_method

physical_layout

Methods

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'benchmark': FieldInfo(annotation=Type[Benchmark], required=False, default=<class 'iqm.benchmarks.entanglement.ghz.GHZBenchmark'>), 'cal_url': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'calset_id': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'custom_qubits_array': FieldInfo(annotation=Union[Sequence[Sequence[int]], NoneType], required=False, default=None), 'fidelity_routine': FieldInfo(annotation=str, required=False, default='coherences'), 'max_gates_per_batch': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'mit_shots': FieldInfo(annotation=int, required=False, default=1000), 'num_RMs': FieldInfo(annotation=Union[int, NoneType], required=False, default=100), 'optimize_sqg': FieldInfo(annotation=bool, required=False, default=True), 'physical_layout': FieldInfo(annotation=Literal['fixed', 'batching'], required=False, default='fixed'), 'qiskit_optim_level': FieldInfo(annotation=int, required=False, default=3), 'qubit_counts': FieldInfo(annotation=Union[Sequence[int], NoneType], required=False, default=None), 'rem': FieldInfo(annotation=bool, required=False, default=True), 'routing_method': FieldInfo(annotation=Literal['basic', 'lookahead', 'stochastic', 'sabre', 'none'], required=False, default='sabre'), 'shots': FieldInfo(annotation=int, required=False, default=1024), 'state_generation_routine': FieldInfo(annotation=str, required=False, default='tree')}#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.