iqm.iqm_client.quantum_architecture.QuantumArchitectureSpecification#

class iqm.iqm_client.quantum_architecture.QuantumArchitectureSpecification(*, name, operations, qubits, qubit_connectivity)#

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].

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.

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].

This replaces Model.__fields__ from Pydantic V1.

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

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

has_equivalent_operations(other)#

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) –

static compare_operations(ops1, ops2)#

Compares the given operation sets.

Returns:

True if the operation and the loci are equivalent.

Parameters:
Return type:

bool