Skip to content

qoolqit.program

source module qoolqit.program

Classes

  • QuantumProgram A program representing a Sequence acting on a Register of qubits.

source class QuantumProgram(register: Register, drive: Drive)

A program representing a Sequence acting on a Register of qubits.

Parameters

  • register : Register the Register of qubits.

  • sequence the Sequence of waveforms.

Attributes

  • register : Register The register of qubits.

  • drive : Drive The driving waveforms.

  • is_compiled : bool Check if the program has been compiled.

  • compiled_sequence : PulserSequence The Pulser sequence compiled to a specific device.

Methods

  • compile_to Compiles the given program to a device.

  • draw

  • run Run the compiled sequence on selected backend.

source property QuantumProgram.register: Register

The register of qubits.

source property QuantumProgram.drive: Drive

The driving waveforms.

source property QuantumProgram.is_compiled: bool

Check if the program has been compiled.

source property QuantumProgram.compiled_sequence: PulserSequence

The Pulser sequence compiled to a specific device.

source method QuantumProgram.compile_to(device: Device, profile: CompilerProfile = CompilerProfile.DEFAULT)None

Compiles the given program to a device.

Parameters

  • device : Device the Device to compile to.

  • profile : CompilerProfile the compiler profile to use during compilation.

source method QuantumProgram.draw(n_points: int = 500, compiled: bool = False, return_fig: bool = False)plt.Figure | None

Raises

  • ValueError

source method QuantumProgram.run(backend_name: BackendName = BackendName.QUTIP, result_type: ResultType = ResultType.STATEVECTOR, runs: int = 100, evaluation_times: list[float] = [1.0], **backend_params: Any)OutputType

Run the compiled sequence on selected backend.

Raises

  • ValueError