How Divi Works

How Divi Works

Divi automates the entire workflow of splitting a principal problem into independently executable components. We provide a collection of applications that have a structure that allows them to be parallelized. A user selects their problem and their parameters.

Divi’s Built-in Programs

Divi provides two types of programs. The first is compromised of the self-contained quantum routines, such as VQE for a single molecule, or QAOA for some QUBO or graph problem. For such programs, the parallelization is low-level. For example, quantum algorithms that require the computation of an expectation value of a Hamiltonian can be parallelized by sending each term of the Hamilonian to a separate backend, to maximize utilization. These are the ones currently implemented in Divi:

Quantum Program Main Parallelization Main use
Variational Quantum Eigensolver (VQE) Hamiltonian splitting Quantum chemistry
Quantum Approximate Optimization Algorithm (QAOA) Hamiltonian splitting Combinatorial optimization
Maximum-Likelihood Amplitude Estimation (MLAE) Number of oracle evaluations Monte-Carlo Integration

The second type of programs, which we refer to in the code as a ProgramBatch, contains a set of the aforementioned quantum programs, whose solutions are then aggregated to provide an answer to a bigger main problem. Here, the parallelization is on more of a high-level scale, generating a separate program for each subproblem.

Quantum Program Main Parallelization
VQE Hyperparameter Sweep One VQE instance per hyperparameter set
Graph-partitioning QAOA One QAOA instance per graph partition

We are continuously expanding our portfolio of programs, and we are always happy to hear suggestions about what would constitute a good addition to it.

From Blueprint to Backend: The Divi Workflow

The following outlines the core stages Divi follows to transform a high-level quantum program into executable workloads, handling everything from ahead-of-time circuit generation to result visualization.

Meta Circuits as Ahead-of-Time Scaffolds

Divi employs advanced parallelization strategies to generate a set of meta circuits, which act as immutable scaffolds for all subsequent circuit instantiations. These meta circuits are compiled ahead-of-time, meaning that decomposition into low-level QASM occurs once during the initial setup—rather than repeatedly during execution.

This design significantly reduces runtime overhead by offloading costly transformations early in the workflow. Each problem typically results in a fixed number of such scaffolds, capturing the circuit’s static structure. For example, any parametrized quantum algorithm would have a cost circuit. Parameterized gates are left symbolic, with their parameters only grounded just before execution.

To illustrate, the following circuit is the base Pennylane circuit of some QAOA task:

>>> qaoa_problem.meta_circuits["cost_circuit"].main_circuit.operations
[ApproxTimeEvolution(..., β_0, wires=[0, 1, 2, 3, 4]),
 ApproxTimeEvolution(..., γ_0, wires=[0, 4, 3, 1, 2])]

You can see how the symbols β_0 and γ_0 are used as temporary values—in transitu, awaiting resolution during execution.If you were to inspect the generated QASM, you would also find them:

>>> qaoa_problem.meta_circuits["cost_circuit"].compiled_circuits_bodies
['OPENQASM 2.0;\n'
 'include "qelib1.inc";\n'
 'qreg q[5];creg c[5];\n'
 'rz(2.0*β_0) q[0];\n'
 'rz(2.0*β_0) q[1];\n'
 'rz(2.0*β_0) q[2];\n'
 'rz(2.0*β_0) q[3];\n'
 'rz(2.0*β_0) q[4];\n'
 ...
 'rz(0.5*γ_0) q[0];\n'
 'rz(1.0*γ_0) q[1];\n'
 'rz(1.0*γ_0) q[2];\n'
 ...
]

Circuit Generation and Execution

In each optimization loop, the meta circuits are populated with the current parameter values and dispatched to the execution backend—either a local simulator or Qoro’s cloud infrastructure via API. Divi tracks job execution and collects the results asynchronously. The symbolic QASM shown above would then look something like this:

>>> job_circuits["0_NoMitigation:0_0"]
('OPENQASM 2.0;\n'
 'include "qelib1.inc";\n'
 'qreg q[5];creg c[5];\n'
 'rz(2.0*5.96177609) q[0];\n'
 'rz(2.0*5.96177609) q[1];\n'
 'rz(2.0*5.96177609) q[2];\n'
 'rz(2.0*5.96177609) q[3];\n'
 'rz(2.0*5.96177609) q[4];\n'
 ...
)

Depending on the chosen optimizer, Divi may also generate auxiliary circuits, such as those required for gradient estimation via the parameter-shift rule or similar techniques.

Aggregation

Once execution results are retrieved, Divi performs the final aggregation step, provided no jobs have failed. If partial failures occur, Divi can optionally re-submit only the missing jobs. The exact aggregation strategy depends on the nature of the quantum program being run. For instance, in hyperparameter sweep tasks, Divi selects the best-performing hyperparameter configuration across all evaluations, effectively surfacing the optimal solution without manual intervention. In more intricate workflows, such as graph partitioning, the aggregation phase involves stitching together the solutions of subproblems to reconstruct a global solution—preserving the structure and semantics of the original problem when possible.

Visualization

Once the aggregation is complete, Divi includes visualization tools to analyze the results.

Parallel Optimization

Divi is built for performance at scale. To accelerate the optimization of quantum-classical hybrid workloads, it supports parallel execution strategies tailored to parameter space exploration.

  • Parallel Monte Carlo Sampling: Randomized parameter sets are evaluated in parallel, enabling rapid exploration of the search space. This approach is especially effective in high-dimensional or noisy cost landscapes.

  • Local Optimizers with Update Tracking: Algorithms like Nelder-Mead and L-BFGS-B are orchestrated by Divi in a stepwise fashion, with each iteration tracked and managed. This supports hybrid optimization workflows where broad sampling is followed by local refinement.

Quantum workloads are frequently bottlenecked by latency and queue times. Parallel execution helps saturate quantum pipelines while overlapping classical processing to reduce overall optimization time.