iqm.benchmarks.optimization.qscore.QScoreConfiguration#
- class iqm.benchmarks.optimization.qscore.QScoreConfiguration(*, benchmark: ~typing.Type[~iqm.benchmarks.benchmark_definition.Benchmark] = <class 'iqm.benchmarks.optimization.qscore.QScoreBenchmark'>, shots: int = 256, 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', num_instances: int, num_qaoa_layers: int = 1, min_num_nodes: int = 2, max_num_nodes: int | None = None, use_virtual_node: bool = True, use_classically_optimized_angles: bool = True, choose_qubits_routine: ~typing.Literal['naive', 'custom'] = 'naive', min_num_qubits: int = 2, custom_qubits_array: ~typing.Sequence[~typing.Sequence[int]] | None = None, qiskit_optim_level: int = 3, optimize_sqg: bool = True, seed: int = 1)#
Bases:
BenchmarkConfigurationBase
Q-score configuration.
- Parameters:
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']) –
num_instances (int) –
num_qaoa_layers (int) –
min_num_nodes (int) –
max_num_nodes (int | None) –
use_virtual_node (bool) –
use_classically_optimized_angles (bool) –
choose_qubits_routine (Literal['naive', 'custom']) –
min_num_qubits (int) –
qiskit_optim_level (int) –
optimize_sqg (bool) –
seed (int) –
- choose_qubits_routine#
The routine to select qubit layouts. * Default is “custom”.
- Type:
Literal[“custom”]
- custom_qubits_array#
The physical qubit layouts to perform the benchmark on. * Default is None.
- Type:
Optional[Sequence[Sequence[int]]]
- optimize_sqg#
Whether Single Qubit Gate Optimization is performed upon transpilation. * Default is True.
- Type:
Attributes
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
shots
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.optimization.qscore.QScoreBenchmark'>), 'calset_id': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'choose_qubits_routine': FieldInfo(annotation=Literal['naive', 'custom'], required=False, default='naive'), 'custom_qubits_array': FieldInfo(annotation=Union[Sequence[Sequence[int]], NoneType], required=False, default=None), 'max_gates_per_batch': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'max_num_nodes': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'min_num_nodes': FieldInfo(annotation=int, required=False, default=2), 'min_num_qubits': FieldInfo(annotation=int, required=False, default=2), 'num_instances': FieldInfo(annotation=int, required=True), 'num_qaoa_layers': FieldInfo(annotation=int, required=False, default=1), '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), 'routing_method': FieldInfo(annotation=Literal['basic', 'lookahead', 'stochastic', 'sabre', 'none'], required=False, default='sabre'), 'seed': FieldInfo(annotation=int, required=False, default=1), 'shots': FieldInfo(annotation=int, required=False, default=256), 'use_classically_optimized_angles': FieldInfo(annotation=bool, required=False, default=True), 'use_virtual_node': FieldInfo(annotation=bool, required=False, default=True)}#
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.