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:
shots (int) –
max_gates_per_batch (int | None) –
max_circuits_per_batch (int | None) –
calset_id (str | None) –
routing_method (Literal['basic', 'lookahead', 'stochastic', 'sabre', 'none']) –
physical_layout (Literal['fixed', 'batching']) –
use_dd (bool | None) –
dd_strategy (DDStrategy | None) –
qubits_array (Sequence[Sequence[int]] | Sequence[Sequence[Sequence[int]]]) –
is_eplg (bool) –
parallel_execution (bool) –
num_circuit_samples (int) –
qiskit_optim_level (int) –
two_qubit_gate_ensembles (Sequence[Dict[str, float]] | None) –
- 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.
- 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:
- 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:
- depths#
The list of layer depths in which to execute DRB for all qubit layouts in qubits_array.
- Type:
Sequence[int]
- qiskit_optim_level#
The Qiskit-level of optimization to use in transpilation. * Default is 1.
- Type:
- 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}.
- 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.
Attributes
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
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].