iqm.iqm_client.models.QuantumArchitectureSpecification#

class iqm.iqm_client.models.QuantumArchitectureSpecification(*, name: str, operations: dict[str, list[list[str]]], qubits: list[str], qubit_connectivity: list[list[str]])#

Bases: BaseModel

Quantum architecture specification.

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.

name

Name of the quantum architecture.

operations

Operations supported by this quantum architecture, mapped to the allowed loci.

qubits

List of qubits of this quantum architecture.

qubit_connectivity

Qubit connectivity of this quantum architecture.

Methods

compare_operations(ops1, ops2)

Compares the given operation sets.

has_equivalent_operations(other)

Compares the given operation sets defined by the quantum architecture against another architecture specification.

Parameters:
name: str#

Name of the quantum architecture.

qubits: list[str]#

List of qubits of this quantum architecture.

qubit_connectivity: list[list[str]]#

Qubit connectivity of this quantum architecture.

operations: dict[str, list[list[str]]]#

Operations supported by this quantum architecture, mapped to the allowed loci.

has_equivalent_operations(other: QuantumArchitectureSpecification) bool#

Compares the given operation sets defined by the quantum architecture against another architecture specification.

Returns:

True if the operation and the loci are equivalent.

Parameters:

other (QuantumArchitectureSpecification) –

Return type:

bool

static compare_operations(ops1: dict[str, list[list[str]]], ops2: dict[str, list[list[str]]]) bool#

Compares the given operation sets.

Returns:

True if the operation and the loci are equivalent.

Parameters:
Return type:

bool

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]] = {'name': FieldInfo(annotation=str, required=True), 'operations': FieldInfo(annotation=dict[str, list[list[str]]], required=True), 'qubit_connectivity': FieldInfo(annotation=list[list[str]], required=True), 'qubits': FieldInfo(annotation=list[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.