GateInfo#
- class GateInfo(*, implementations, default_implementation, override_default_implementation)#
Bases:
PydanticBase
Information 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_architecture
Attributes
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_implementation
for those loci.Methods
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_implementation
for those loci.
- classmethod override_default_implementation_validator(value)#
Converts locus keys to tuples if they are encoded as strings.
- 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].