Circuit#

Module: iqm.pulse.circuit_operations

class iqm.pulse.circuit_operations.Circuit(name, instructions, metadata=None)#

Bases: object

Quantum circuit.

Used e.g. for client-server communication.

Consists of a sequence of native quantum operations, each represented by an instance of the CircuitOperation class.

Attributes

metadata

optional metadata for the circuit

name

name of the circuit

instructions

operations comprising the circuit

Methods

all_locus_components

Return the names of all locus components (typically qubits) in the circuit.

validate

Validate the circuit against the supported quantum operations.

Parameters:
name: str#

name of the circuit

instructions: tuple[CircuitOperation, ...]#

operations comprising the circuit

metadata: dict[str, Any] | None = None#

optional metadata for the circuit

all_locus_components()#

Return the names of all locus components (typically qubits) in the circuit.

Return type:

set[str]

validate(supported_operations)#

Validate the circuit against the supported quantum operations.

Parameters:

supported_operations (dict[str, QuantumOp]) – mapping of supported quantum operation names to their definitions

Raises:

ValueError – circuit is not valid

Return type:

None

Inheritance

Inheritance diagram of iqm.pulse.circuit_operations.Circuit