Composer
Composer
What Composer does
Composer is the part of the stack between “a user submitted a batch of circuits” and “those circuits are running on a simulator or a QPU”. It does three jobs:
- Scheduling. It decides how a job’s circuits are laid out on the target: which device each circuit runs on, which circuits share a device, how shots are split into rounds, and how work is divided across simulator workers.
- Getting work to the execution platform. It accepts and stores jobs, moves circuits through queues to Maestro workers or QPU interface workers, warms up capacity, tracks progress, and gathers the results back.
- Automating decisions in bulk. A single job can hold thousands of circuits. Composer makes the per-circuit decisions (predicted cost, simulation method, packing, batching) automatically, so neither the user nor Divi has to make them.
Divi is the main client. It submits jobs through QoroService, polls, and pulls results without the user handling any of the transport. Composer also runs underneath Qoro’s dashboard, and it is the platform deployed in Solo and Dedicato.
The decisions Composer automates
| Decision | How it is made |
|---|---|
| Can this job run here? | Checked when the job is created: access tier, permission on private targets, target availability, and credit balance. A job that cannot be paid for is held as INSUFFICIENT_CREDITS instead of failing part-way through. |
| What will each circuit cost? | A runtime cost model scores each circuit as it is uploaded, from structural features such as qubit count, depth, gate mix, and whether it is Clifford. The predictions drive batching. |
| How should simulator work be split? | Circuits are grouped into batches up to a predicted-cost ceiling and a count cap, so that each Maestro worker gets a similar amount of work. Large jobs then spread evenly across the fleet. |
| Which simulation method? | Unless the job fixes one, Maestro Auto chooses a simulator and method for each circuit. It uses runtime estimators benchmarked on the actual engines: Clifford circuits go to the stabilizer engine, low-entanglement circuits to MPS, and the rest to statevector. See Maestro. |
| Which QPU, and with which other circuits? | Circuits are assigned to the online devices in the chosen QPU system by best fit. With packing enabled, several small circuits are placed side by side on disjoint qubits of one device, in rounds that share a shot count. This turns many small vendor submissions into a few large ones. Results are split back per circuit afterwards. |
| What noise should a simulation see? | For noisy-device simulation, a Maestro noise model is built from the target device’s calibration data: thermal relaxation, gate depolarisation, readout error, and crosstalk. |
| Is this QUBO a good fit for QAOA? | A characterisation job analyses a QUBO before any quantum resources are spent. It returns hardness and structure metrics, a classical baseline, suggested penalty weights, and initial QAOA parameters. |
How a job flows through Composer
flowchart LR
C["Client<br/>(Divi / REST)"] --> A["API<br/>admission · storage<br/>cost model"]
A --> Q["Job queue"]
Q --> O["Orchestrator"]
O -->|"cost-balanced batches"| M["Maestro fleet<br/>(per tier)"]
O -->|"packed schedule, one batch per device"| I["QPU Interfaces"]
M -->|"results"| A
I -->|"counts"| O
O -->|"aggregated results"| A
Job Lifecycle follows this flow step by step.
The Composer engine
The decisions above rely on the Composer engine, a C++ library with Python bindings. It started as a framework for distributed quantum computing, and many of its parts now feed the cloud platform and Maestro:
- Runtime estimators. Per-backend cost models for statevector, MPS, and stabilizer simulation, for both sampling and expectation values. They are fitted from benchmarks of the real engines and are the basis of Maestro Auto.
- Circuit-packing scheduler. Packs independent circuits onto the free qubits of a set of hosts and shares shot rounds between them, accepting a placement only if it reduces idle-qubit cost.
- Calibration-to-noise bridge. Turns device calibration data into Maestro noise models, validated against real IBM and IQM hardware.
It also contains a distributed quantum computing toolkit, offered in Dedicato:
- Circuit distribution. Remaps a monolithic circuit onto a network of smaller QPUs. Qubit-to-host placement is optimised to minimise cross-host gates, and the remaining ones are implemented with entanglement and classical communication.
- Network simulation. A discrete-event simulator models a network of QPUs with timing and communication delays. Hosts can run NetQASM programs.
- Circuit cutting. Splits a circuit into fragments at the gates that cross hosts, runs the fragments in parallel, and recombines the results with tensor contraction.
- HPC integration. Maestro-backed simulator plugins for CUNQA, the distributed-QPU emulator used at CESGA.