Skip to main content

Module process

Module process 

Source
Expand description

Quantum process: the top-level unit of compilation and execution.

A Process holds a BasicBlock of gate instructions together with measurement requests and drives them through compilation (qubit mapping, gate decomposition) and execution on a QuantumExecution backend.

§State machine

A Process advances through the following states:

AcceptingGate
  ├── append_block / alloc / param      (stays AcceptingGate)
  ├── exp_value (batch, no gradient)  → AcceptingHamiltonian
  ├── exp_value (batch, with gradient)→ ReadyToExecute
  └── sample (batch)                  → ReadyToExecute
AcceptingHamiltonian
  ├── exp_value (batch, no gradient)     (stays AcceptingHamiltonian)
  └── execute                          → Terminated
ReadyToExecute
  └── execute                          → Terminated
Terminated
  └── (no further mutations allowed)

In live mode (QuantumExecution::Live) gates are dispatched to the QPU backend immediately; execute is not used. In batch mode (QuantumExecution::Batch) the full circuit is compiled and sent at once when Process::execute is called.

Structs§

Process
A quantum process: the top-level compilation and execution unit.
QPUConfig
Configuration of the quantum processing unit (QPU) available to this process.

Enums§

ProcessState
Internal state machine for a Process.