iqm.iqm_client.models.Circuit#

class iqm.iqm_client.models.Circuit(*, name: str, instructions: tuple[Instruction, ...], metadata: dict[str, Any] | None = None)#

Bases: BaseModel

Quantum circuit to be executed.

Consists of native quantum operations, each represented by an instance of the Instruction class.

Attributes

model_config

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

name

name of the circuit

instructions

instructions comprising the circuit

metadata

arbitrary metadata associated with the circuit

Methods

all_qubits()

Return the names of all qubits in the circuit.

instructions_validator(value)

Check the container of instructions and each instruction within

name_validator(value)

Check if the circuit name is a non-empty string

Parameters:
name: str#

name of the circuit

instructions: tuple[Instruction, ...]#

instructions comprising the circuit

metadata: dict[str, Any] | None#

arbitrary metadata associated with the circuit

all_qubits() set[str]#

Return the names of all qubits in the circuit.

Return type:

set[str]

classmethod name_validator(value)#

Check if the circuit name is a non-empty string

classmethod instructions_validator(value)#

Check the container of instructions and each instruction within

model_config: ClassVar[ConfigDict] = {}#

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