
Portfolio optimization is one of the premier enterprise use cases for quantum algorithms. Yet, in practice, running a Constrained Quadratic Model or QUBO on quantum hardware involves massive guesswork: guessing penalty weights, guessing circuit depth, and blindly hunting for starting angles across non-convex landscapes.
Qoro’s Characterize And Validate service completely eliminates this trial-and-error tax. With a single pre-flight classical call, it returns the mathematically guaranteed penalty window, the optimal circuit depth, and pre-converged starting angles before you spend a single cent on quantum hardware.
Below, we study an industrial portfolio of ten assets subject to an exact three-asset cardinality constraint, benchmarked against real executions on Maestro, Qoro’s high-performance simulation engine.
The Three Guesses That Drain Quantum Credits
Restricting the decision to binary variables, , if asset is held, 0 otherwise, turns weight allocation into asset selection, and lets the practical mandate be written directly as a cardinality constraint: hold exactly assets, . To run it with QAOA or an annealer, that constraint has to be absorbed into the objective as a penalty term , at which point the whole problem is a QUBO.
At this transition point, researchers are forced into three blind choices that customarily consume the majority of experimental credits:
- The penalty weight λ: Set it too low, and the quantum optimizer violates your own mandate, returning portfolios with 1, 5, or 8 assets. Set it too high, and the objective landscape is drowned out by constraint noise, forcing the sampler into random, low-return valid sets.
- The circuit depth p: Every additional QAOA layer introduces two more variational angles, extends circuit duration, and accumulates hardware noise and decoherence. Adding layers without knowing if the problem structure supports a quantum advantage is pure waste.
- The variational starting angles: Cold-starting an optimizer with random angles on quantum hardware is an expensive lottery. Optimizers frequently get trapped in zero-gradient saddle points or barren plateaus, burning tens of thousands of quantum shots without converging.
Every one of these properties is a classical feature of the Hamiltonian you already own. Yet researchers routinely discover them the hard way: one expensive quantum run at a time.
Built into Divi is a new feature-addition called Characterize and Validate for QUBO and HUBO type problems. We used this feature in our recent submission to QOBLIB, running on the largest problem instances available and outperforming traditional solvers on real quantum hardware with significantly faster convergence.
Finding the right penalty term
Because QAOA cannot natively enforce hard constraints, the portfolio mandate (hold exactly 3 assets) must be absorbed into the objective via a penalty term: .
Tuning lambda is a delicate trap:
- Too low ( < 0.10): The penalty is too weak; the optimizer ignores the mandate, returning invalid portfolios and dropping the Approximation Ratio to 0.83.
- Too high ( > 1.0): Penalty scale drowns out the financial return signal, collapsing the feasibility rate down to ~1%.
Traditionally, finding this viable window required burning quantum executions on trial-and-error sweeps. With a single classical call to characterize_and_validate, the service computes the exact bounds analytically beforehand in seconds:
- Minimum Feasible Penalty (penalty_lambda_min_feasible): 0.1044
- Safe Guaranteed Penalty (penalty_lambda_safe): 0.9347
- Recommended Operating Point (penalty_recommendation): 0.4843
Sweeping across this window confirms the report’s precision: at the recommended lambda = 0.4843, the Approximation Ratio peaks at 0.985, cleanly balancing portfolio return against constraint compliance.

Choosing the number of QAOA layers
Hardware coherence is scarce. Determining how deep your circuit needs to be should never be decided by running increasingly noisy circuits on a QPU until performance collapses.
The validator’s ar_vs_depth engine calculates the theoretical quality ceiling for each depth layer analytically using a light-cone expectation engine:
- Layer 1 (p = 1): Predicted Approximation Ratio = 0.9769
- Layer 2 (p = 2): Predicted Approximation Ratio = 0.9848 (closing 34.2% of the remaining gap)
- Layer 3 & Deeper: Marginal gain drops below diminishing return thresholds. The report explicitly warns: “Low-depth QAOA advantage is not expected for this structure. Treat QAOA parameters as optional diagnostics, not as a recommendation to run deeper circuits.”
The service explicitly recommended recommended_min_layers = 2. When benchmarked against real multi-seed QAOA simulations executed on Maestro:
- p = 1: Stalls at the random baseline (AR = 0.867) due to classical optimizer traps.
- p = 2: Surges cleanly to a median AR of ~0.897 (IQR reaching 0.932).
- p = 3 & 4: Performance plummets to 0.815 as parameter dimensionality increases optimizer noise.
The validator pinpointed the exact peak of achievable performance (p = 2) analytically, preventing the user from wasting execution budget on deeper, noisier layers.

Where to start the optimizer: The Massive Win
Variational optimization is where quantum credits evaporate. Random initial angles (“cold starts”) routinely trap optimizers in zero-gradient plateaus, burning tens of thousands of shots without converging.
characterize_and_validate eliminates hardware parameter exploration by analytically pre-calculating optimal warm-start angles (qaoa_initial_params) during the pre-flight check.
We benchmarked this on MaestroSimulator against random cold starts across 10 independent seeds (depth p = 2, SPSA optimizer):
- Day Zero (Iteration 0): The warm start lands immediately at energy -4.70 with zero hardware shots spent on exploration. Cold starts begin in disordered territory above +1.0.
- Cold starts never catch up: Even after 60 iterations, cold starts stall at a median energy of -4.0—failing to reach where the warm start began on step zero.
- Outperforming classical: Warm-started SPSA smoothly refines to -5.68, beating the classical greedy baseline (-5.06).
Instead of burning weeks and credits hoping a quantum optimizer converges, you execute with pre-calculated parameters that deliver high quality from shot one.

Putting it all together
The three answers are meant to be used together. To demonstrate the full impact, we ran three configurations side by side on the same 10-asset QUBO at depth p = 2, each sampling 20,000 shots on MaestroSimulator:
Untrained QAOA (Cold Start)
Standard X-mixer QAOA initialized with random angles (averaged over 10 independent seeds). This is what a researcher gets on Day Zero without the validator—the standard starting point for any new quantum optimization project.
Result: Only 10.3% of sampled portfolios satisfy the three-asset mandate. Nearly 90% of the quantum shot budget is wasted on invalid, uninvestable portfolios. The cardinality distribution is essentially flat and disordered across all asset counts from 0 to 10.
Validated QAOA (Warm Start)
Standard X-mixer QAOA configured entirely by the validator report—recommended penalty , recommended depth p = 2, and pre-converged warm-start angles from qaoa_initial_params.
Result: 63.1% of sampled portfolios satisfy the mandate. Pre-flight validation delivers a 6x improvement in valid portfolio yield, concentrating the quantum state sharply into the feasible subspace without requiring any parameter exploration on hardware.
XY Mixer QAOA (Validator-Advised Architecture)
The validator report explicitly recommends switching to an XY mixer for cardinality constraints. Divi natively supports XY mixers via divi.hamiltonians.xy_mixer. The XY Hamiltonian commutes with the total particle number operator, meaning quantum evolution under this mixer strictly conserves Hamming weight. When initialized in a computational basis state with exactly 3 excitations, every measurement is mathematically guaranteed to select exactly 3 assets.
Result: 100.0% of sampled portfolios satisfy the mandate. Zero shots are wasted. The penalty term is no longer needed at all—the constraint is enforced by the circuit architecture itself, not by penalty tuning.

The progression from untrained (10.3%) to validated (63.1%) to architecturally correct (100.0%) demonstrates the full spectrum of value that characterize_and_validate delivers: not just parameter tuning, but structural guidance on how to formulate the quantum algorithm itself.
Is QAOA worth running at all? Honest certificiation
A truly useful validation tool must also have the integrity to tell you when NOT to spend money on quantum execution.
The report’s classical_baseline and hardness diagnostics provide immediate clarity:
- Classical Solvers: Greedy search and simulated annealing found the exact global minimum (-9.1172) in 40 milliseconds on a standard CPU.
- Problem Hardness: The cost-spectrum analysis reveals dense coupling and near-zero spectral gaps between top candidate portfolios.
- Direct Guidance: The report explicitly concludes that low-depth QAOA advantage is not expected for this problem structure.
Rather than letting an you burn tens of thousands of credits discovering this through failed QPU benchmark runs, the service delivers an unambiguous verdict classically in milliseconds.
The architectural shift: Validate before you run
The expensive part of quantum optimization was never the final production circuit—it was everything that came before it:
- The parameter sweeps,
- The failed cold-start restarts,
- The trial-and-error circuit depth hunts,
- The wasted QPU hours measuring guesses instead of answers.
Until now, navigating that maze was the algorithm scientist’s operational tax.
With Qoro characterize_and_validate, it is a single classical call:
- Validate your QUBO analytically.
- Obtain guaranteed penalty bounds, optimal depth, and Day-Zero warm-start angles.
- Receive architectural recommendations: if an XY mixer or alternative formulation can eliminate constraint violations entirely, the report tells you.
- The report also certifies the classical baseline—here, a CPU simulated annealing solver found the global optimum in 40 milliseconds, giving teams the honest data they need before spending hardware budget.
Read the report. Then run once.