iqm.benchmarks.randomized_benchmarking.direct_rb.direct_rb.DirectRBConfiguration#

class iqm.benchmarks.randomized_benchmarking.direct_rb.direct_rb.DirectRBConfiguration(*, benchmark: ~typing.Type[~iqm.benchmarks.benchmark_definition.Benchmark] = <class 'iqm.benchmarks.randomized_benchmarking.direct_rb.direct_rb.DirectRandomizedBenchmarking'>, shots: int = 256, max_gates_per_batch: int | None = None, max_circuits_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', use_dd: bool | None = False, dd_strategy: ~iqm.iqm_client.models.DDStrategy | None = None, qubits_array: ~typing.Sequence[~typing.Sequence[int]] | ~typing.Sequence[~typing.Sequence[~typing.Sequence[int]]], is_eplg: bool = False, parallel_execution: bool = False, depths: ~typing.Sequence[int], num_circuit_samples: int, qiskit_optim_level: int = 1, two_qubit_gate_ensembles: ~typing.Sequence[~typing.Dict[str, float]] | None = None, densities_2q_gates: ~typing.Sequence[float] | None = None, clifford_sqg_probabilities: ~typing.Sequence[float] | None = None, sqg_gate_ensembles: ~typing.Sequence[~typing.Dict[str, float]] | None = None)#

Bases: BenchmarkConfigurationBase

Direct RB configuration

Parameters:
benchmark#

DirectRandomizedBenchmarking.

Type:

Type[Benchmark]

qubits_array#

The array of physical qubits in which to execute DRB. * It can be specified as a Sequence (e.g. list or tuple) of qubit-index registers, e.g., [[0, 1], [2, 3]], or as Sequences of such Sequences, e.g., [[[0, 1], [2, 3]], [[0, 2], [1, 3]]]. In the second case, each Sequence[Sequence[int]] will execute sequentially, i.e., execution will be done for [[0, 1], [2, 3]] first, then for [[0, 2], [1, 3]], each either in parallel or sequence, according to the (bool) value of parallel_execution.

Type:

Sequence[Sequence[int]] | Sequence[Sequence[Sequence[int]]]

is_eplg#

Whether the DRB experiment is executed as a EPLG subroutine. * If True: - default parallel_execution below is override to True. - default two_qubit_gate_ensembles is {“CZGate”: 1.0}. - default densities_2q_gates is 0.5 (probability of sampling 2Q gates is 1). - default clifford_sqg_probabilities is 0.0. - default sqg_gate_ensembles is {“IGate”: 1.0}. * Default is False.

Type:

bool

parallel_execution#

Whether DRB is executed in parallel for all qubit layouts in qubits_array. * If is_eplg is False, it executes parallel DRB with MRB gate ensemble and density defaults. * Default is False.

Type:

bool

depths#

The list of layer depths in which to execute DRB for all qubit layouts in qubits_array.

Type:

Sequence[int]

num_circuit_samples#

The number of random-layer DRB circuits to generate.

Type:

int

shots#

The number of measurement shots to execute per circuit.

Type:

int

qiskit_optim_level#

The Qiskit-level of optimization to use in transpilation. * Default is 1.

Type:

int

routing_method#

The routing method to use in transpilation. * Default is “sabre”.

Type:

Literal[“basic”, “lookahead”, “stochastic”, “sabre”, “none”]

two_qubit_gate_ensembles#

The two-qubit gate ensembles to use in the random DRB circuits. * Keys correspond to str names of qiskit circuit library gates, e.g., “CZGate” or “CXGate”. * Values correspond to the probability for the respective gate to be sampled. * Each Dict[str,float] corresponds to each qubit layout in qubits_array. * If len(two_qubit_gate_ensembles) != len(qubits_array), the first Dict is assigned by default. * Default is None, which assigns {str(q): {“CZGate”: 1.0} for q in qubits_array}.

Type:

Optional[Sequence[Dict[str, float]]]

densities_2q_gates#

The expected densities of 2-qubit gates in the final circuits per qubit layout. * If len(densities_2q_gates) != len(qubits_array), the first density value is assigned by default. * Default is None, which assigns 0.25 to all qubit layouts.

Type:

Optional[Sequence[float]]

clifford_sqg_probabilities#

Probability with which to uniformly sample Clifford 1Q gates per qubit layout. * Default is None, which assigns 1.0 to all qubit layouts.

Type:

Optional[Sequence[float]]

sqg_gate_ensembles#

A dictionary with keys being str specifying 1Q gates, and values being corresponding probabilities. * If len(sqg_gate_ensembles) != len(qubits_array), the first ensemble is assigned by default. * Default is None, which leaves only uniform sampling of 1Q Clifford gates.

Type:

Optional[Sequence[Dict[str, float]]]

Attributes

model_config

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

benchmark

qubits_array

is_eplg

parallel_execution

depths

num_circuit_samples

qiskit_optim_level

two_qubit_gate_ensembles

densities_2q_gates

clifford_sqg_probabilities

sqg_gate_ensembles

routing_method

shots

max_gates_per_batch

max_circuits_per_batch

calset_id

physical_layout

use_dd

dd_strategy

Methods

model_config: ClassVar[ConfigDict] = {}#

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