GateInfo#
- class GateInfo(*, implementations, default_implementation, override_default_implementation)#
Bases:
PydanticBaseInformation about a quantum gate/operation.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Module:
iqm.station_control.interface.models.dynamic_quantum_architectureAttributes
Returns all loci which are available for at least one of the implementations.
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Mapping of available implementation names to information about the implementations.
Default implementation for the gate.
Mapping of loci to implementation names that override
default_implementationfor those loci.Methods
Default implementation of this gate for the given locus.
Converts locus keys to tuples if they are encoded as strings.
- 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 usingiqm.cocos.app.api.request_models.Instruction.implementation.
- override_default_implementation: dict[tuple[str, ...], str]#
Mapping of loci to implementation names that override
default_implementationfor those loci.
- classmethod override_default_implementation_validator(value)#
Converts locus keys to tuples if they are encoded as strings.
- 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’),
- get_default_implementation(locus)#
Default implementation of this gate for the given locus.
- model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'ser_json_inf_nan': 'constants', 'validate_assignment': True, 'validate_default': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].