ZKSF logo, a neon quantum brainZKSF
← All applications

Finance and trading

Portfolio optimisation: QAOA against the provable optimum

Choose exactly k assets from a universe of N to minimise risk against expected return. It is the Markowitz objective under a cardinality constraint, it is what a desk actually faces when a mandate caps the number of holdings, and unlike the unconstrained continuous version it is genuinely hard.

The problem

Minimise x'Sx - lambda*mu'x over binary x with exactly k assets selected, where S is the covariance matrix and mu the vector of expected excess returns. The binary selection is what makes this NP-hard in general: the continuous version has a closed-form solution and needs no quantum computer, or indeed any solver.

Instances come from a seeded single-factor market model, so every asset loads on a common factor plus idiosyncratic noise, which reproduces the correlation structure real equity covariance has rather than an unrealistic random matrix. Seed 20260902, lambda = 1.0.

The classical baseline

Exhaustive enumeration of every k-subset. This is deliberately the strongest possible baseline rather than a heuristic: it returns the provable optimum, so the quantum method is measured against the best answer that exists. It also yields the full distribution of feasible portfolios, which lets us score the quantum result on a scale that stays meaningful when the optimum sits near zero.

The quantum method

QAOA at depth p = 1, 2 and 3, with the cardinality constraint imposed as a quadratic penalty, run on our exact statevector engine at 512 shots. Variational parameters were optimised by COBYLA with three restarts of 150 iterations each. Every circuit evaluation inside that loop is counted below, because the optimiser is the real cost of a variational algorithm and a benchmark that reports only the final circuit understates it by two orders of magnitude.

Results

Measured 2 September 2026. norm is where the answer sits between the best and worst feasible portfolio, so 0.0000 is the optimum. beats is the percentage of all feasible portfolios it beats.

NkpPortfoliosClassicalTimeQAOATimeEvalsnormbeats
1031120-0.1747160.001 s-0.1220696.2 s500.077298.3%
1032120-0.1747160.002 s-0.17471615.5 s1090.000099.2%
1033120-0.1747160.002 s-0.17471622.5 s1410.000099.2%
12414950.1997960.006 s0.20103111.2 s800.001799.6%
12424950.1997960.006 s0.19979618.2 s1130.000099.8%
12434950.1997960.011 s0.20103126.5 s1580.001799.6%
14411,0010.0004950.007 s0.00049510.2 s780.000099.9%
14421,0010.0004950.007 s0.00049516.5 s1100.000099.9%
14431,0010.0004950.006 s0.03852031.8 s1570.042799.8%
16514,368-0.0162670.056 s0.19113215.4 s850.099599.7%
16524,368-0.0162670.054 s0.19165823.1 s1060.099799.6%
16534,368-0.0162670.062 s-0.01626738.1 s1530.0000100.0%

What the numbers say

QAOA found the provable optimum in 6 of 12 runs, and in every single run it returned a portfolio in the top 2 percent of all feasible portfolios. As a heuristic it works.

It is also roughly a thousand times slower. At N = 16 exhaustive enumeration returns the proven optimum in 0.06 seconds. QAOA takes 15 to 38 seconds and between 85 and 153 circuit evaluations to reach an answer that is sometimes optimal and sometimes 10 percent of the way toward the worst portfolio available.

And it cannot prove anything. This is the distinction that matters most for a mandate. Enumeration returns the optimum and a proof that nothing better exists. QAOA returns a good portfolio with no certificate of optimality, so a risk committee asking "is this the best allocation available" gets an answer from one method and a shrug from the other.

Depth did not reliably help. Higher p contains lower p as a special case, so p = 3 scoring worse than p = 2 at N = 12 and N = 14 is the classical optimiser failing to converge in a larger parameter space, not a property of the algorithm. That fragility is itself a finding: QAOA quality here is governed by parameter optimisation rather than by circuit depth.

Where the classical method stops

The interesting question is not who wins at N = 16, because classical wins decisively. It is how far enumeration goes before it becomes impossible.

UniversePortfolios to checkEnumeration time
N = 30, k = 85,852,9250.59 s
N = 40, k = 10847,660,5281.4 min
N = 50, k = 12121,399,651,1003.4 h
N = 60, k = 1553,194,089,192,72062 days
N = 80, k = 203.5 x 10^1811,000 years

Estimated at 10 million subset evaluations per second.

The honest caveat, and it is a large one

Enumeration dying around N = 50 does not mean quantum computing has an opening at N = 50. No desk enumerates. Production practice is mixed-integer quadratic programming with branch and bound, which prunes the search tree and handles universes in the hundreds or thousands routinely, returning either the optimum or a bound on how far from it you are.

We use enumeration here precisely because it proves optimality at sizes we can also run on a quantum engine, which makes the comparison exact. The real classical frontier sits far beyond it. Any argument that quantum computing is about to become useful for portfolio construction has to beat Gurobi or CPLEX at N in the hundreds, not enumeration at N = 50.

Meanwhile the quantum side has its own ceiling. QAOA at N = 50 needs 50 qubits, which is past exact statevector simulation, and hardware at that width today carries error rates that would swamp the objective differences we are resolving here at the fifth decimal place.

What would have to change

For this to become a real decision rather than an experiment, three things need to happen together: hardware wide enough for the universe you actually trade, error rates low enough that the objective function survives the circuit, and a parameter optimisation strategy that does not degrade as the problem grows. None of the three is close today, and the third is a software problem that could be solved before the hardware arrives.

The number to watch is not qubit count. It is two-qubit gate fidelity, because that is what determines whether a deep enough QAOA circuit returns signal or noise. On that measure the field has moved: the best reported two-qubit fidelity is now 99.99 percent, and 96 logical qubits have been demonstrated from 448 physical ones.

Even so, more qubits alone do not produce a win here, and this is the part worth being clear about. The 2029 roadmaps target hundreds of logical qubits, which would allow QAOA on a few hundred assets. A few hundred assets is a size mixed-integer solvers handle comfortably today. Unlike chemistry, where the classical cost grows exponentially and hardware progress eventually crosses it, portfolio optimisation has a classical method that scales with the problem. The quantum side has to overtake a moving target rather than a stationary one.

For context: where the hardware actually is

Gaps on this page are quoted against the devices ZKSF can run, which are Amazon Braket’s public processors. That is not the frontier. Quantinuum, IBM, QuEra and Atom Computing are not resellable through us, and their machines are considerably further along. As of September 2026:

Physical qubits built

Infleqtion Sqale1,600Neutral atom
Atom Computing1,180Neutral atom, 1,225 sites
IBM Condor1,121Superconducting, 2023
IBM Heron R2156Superconducting, ~99.5% two-qubit fidelity
Rigetti Cepheus108The largest available through ZKSF

Two-qubit gate fidelity

The number that actually governs what a circuit can do.

IonQ99.99%Trapped ion, first past four nines
Silicon Quantum Computing99.99%Silicon spin
Quantinuum99.97%Trapped ion, all-to-all
IQM99.91%Superconducting, available through ZKSF

Logical qubits demonstrated

Published results, not roadmap targets.

QuEra96 logical / 448 physicalNeutral atom
Quantinuum48 logical / 98 physicalTrapped ion, iceberg code
Atom Computing24 logicalOn the 1,180-qubit system
Google1 logical / 105 physicalSurface code, below threshold

Announced roadmap

Targets. Roadmaps slip, and these are not results.

Quantinuum Sol, 2027192 physical, ~100 logicalIceberg code, distance 2. Error detection with postselection, not correction
IBM Starling, 2029~200 logicalBivariate bicycle qLDPC, 100 million gates
Quantinuum Apollo, 2029hundreds of logicalThousands of physical, logical error 1e-6 or better

Run this on your own universe.

Load the QAOA template into the console, replace the instance with your own covariance and returns, and export a certificate for your own run. The estimate is free and shows the cost before anything executes.

Related reading: QAOA explained, QAOA at 100 qubits, and what a quantum run actually costs.