Backends
Divi programs take a backend= argument. Switching between a laptop, Qoro’s cloud simulators, and real QPUs only means changing that argument.
| Backend | Runs on | Notes |
|---|---|---|
MaestroSimulator |
Your machine | The default. Uses Maestro in-process. Supports all of Maestro’s simulation methods, native expectation values, and Maestro noise models. |
QiskitSimulator |
Your machine | Qiskit Aer, including fake-backend noise profiles (aer extra). |
QoroService |
Qoro’s cloud (Composer) | Simulator clusters or QPU systems, selected per job. |
Local: MaestroSimulator
Runs circuits through Maestro’s Python bindings. It defaults to the CPU statevector method. A MaestroConfig selects another method, such as MPS for wide low-entanglement circuits, a density matrix or MPO for exact noise channels, or a GPU backend if the plugin is installed. A maestro.NoiseModel can be attached for noisy simulation. See Maestro.
Cloud: QoroService
QoroService reads an API token (QORO_API_KEY, created at dash.qoroquantum.net) and talks to the Composer API. Per job, a JobConfig chooses:
- The target. A
simulator_clusteror aqpu_system. Every account can use both the CPU and the GPU simulator clusters; the dashboard’s Clusters page lists their names, and the default isqoro_maestro. Any account can also target a QPU system registered with its own IBM, IQM, or Braket credentials. - Shots, and whether to use circuit packing on QPUs.
- Simulator settings through a
MaestroConfig, such as a fixed simulation method or noise, or device settings through aDeviceConfigwith vendor-specific options, such as IBM layout and mitigation settings. A job uses one or the other, never both.
What happens on the cloud side:
- On simulator clusters, expectation values are computed by Maestro, so Divi sends Pauli observables instead of measurement circuits. You can force sampling with
JobConfig(force_sampling=True). QPU targets always sample. - Variational programs upload a single parametric template and many parameter sets, which are bound on the server.
- Divi uploads in chunks, polls job status, pages through results, and maps platform errors (insufficient credits, timeouts, failures) to typed exceptions.
The divi-config-helper command saves default targets and settings, so scripts don’t have to repeat them.
📖 Code examples and the full configuration reference: divi.readthedocs.io.