iqm.iqm_client.models.Circuit#
- class iqm.iqm_client.models.Circuit(*, name, instructions, metadata=None)#
Bases:
BaseModel
Quantum circuit to be executed.
Consists of native quantum operations, each represented by an instance of the
Instruction
class.Attributes
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
name of the circuit
instructions comprising the circuit
arbitrary metadata associated with the circuit
Methods
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:
- instructions: tuple[Instruction, ...]#
instructions comprising the circuit
- 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_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]] = {'instructions': FieldInfo(annotation=tuple[Instruction, ...], required=True), 'metadata': FieldInfo(annotation=Union[dict[str, Any], NoneType], required=False, default=None), 'name': FieldInfo(annotation=str, required=True, examples=['test circuit'])}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.