iqm.iqm_client.models.GateInfo#
- class iqm.iqm_client.models.GateInfo(*, implementations: dict[str, GateImplementationInfo], default_implementation: str, override_default_implementation: dict[tuple[str, ...], str])#
Bases:
BaseModel
Information about a quantum gate/operation.
Attributes
Returns all loci which are available for at least one of the implementations.
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.
mapping of available implementation names to information about the implementations
default implementation for the gate, used unless overridden by
override_default_implementation
or unless the user requests a specific implementation for a particular gate in the circuit usingInstruction.implementation
mapping of loci to implementation names that override
default_implementation
for those lociMethods
- Parameters:
- implementations: dict[str, GateImplementationInfo]#
mapping of available implementation names to information about the implementations
- default_implementation: str#
default implementation for the gate, used unless overridden by
override_default_implementation
or unless the user requests a specific implementation for a particular gate in the circuit usingInstruction.implementation
- override_default_implementation: dict[Locus, str]#
mapping of loci to implementation names that override
default_implementation
for those loci
- property loci: tuple[tuple[str, ...], ...]#
Returns all loci which are available for at least one of the implementations.
The loci are sorted first based on the first locus component, then the second, etc. The sorting of individual locus components is first done alphabetically based on their non-numeric part, and then components with the same non-numeric part are sorted numerically. An example of loci sorted this way would be: (
(‘QB1’, ‘QB2’), (‘QB2’, ‘COMPR1’), (‘QB2’, ‘QB3’), (‘QB3’, ‘COMPR1’), (‘QB3’, ‘COMPR2’), (‘QB3’, ‘QB1’), (‘QB10’, ‘QB2’),
)
- 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]] = {'default_implementation': FieldInfo(annotation=str, required=True), 'implementations': FieldInfo(annotation=dict[str, GateImplementationInfo], required=True), 'override_default_implementation': FieldInfo(annotation=dict[tuple[Annotated[str, Strict(strict=True)], ...], str], required=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.