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

model_computed_fields

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

implementations

mapping of available implementation names to information about the implementations

default_implementation

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 using Instruction.implementation

override_default_implementation

mapping of loci to implementation names that override default_implementation for those loci

Methods

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 using Instruction.implementation

override_default_implementation: dict[Locus, str]#

mapping of loci to implementation names that override default_implementation for those loci

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.