PLAIN QUANTUM
Search

Quantum computing for portfolio optimisation: annealers, QAOA and the classical bar

How a portfolio choice with yes/no rules becomes a problem a quantum machine can take, what annealers and QAOA have shown so far, and what a fair comparison with classical solvers must hold constant.

  • Level: Intermediate
  • 17 min read
  • Quantum in Finance

What you’ll learn

  • Describe a portfolio-selection problem as an optimisation problem: an objective, constraints and yes/no choices.
  • Tell a quantum annealer's approach from a gate-based variational one (QAOA), and say what each one is given to run.
  • Explain why "the quantum machine found a good portfolio" is not evidence of advantage on its own.
  • Read a benchmark claim: problem size, embedding overhead, time to solution, solution quality, and who chose the instances.

Recommended background: Evaluating a quantum pilot, Quantum-inspired methods

In one paragraph. Choosing a portfolio means trading expected return against risk under rules such as "hold exactly this many assets". When those choices are yes/no, the problem can be written in the one mathematical form a quantum annealer accepts, and in a form a gate-based algorithm called QAOA can attack. Published studies have run small versions of these problems on quantum hardware and simulators. In the sources reviewed for this article, none shows a quantum method beating a well-tuned classical solver on portfolio problems of commercial size, and the strongest comparisons find results that depend on the problem type. The useful skill for a reader is not predicting when that will change. It is knowing what a fair comparison has to hold constant.

1. The financial problem

A portfolio is a set of holdings. Choosing one involves two things that pull against each other:

  • Expected return: how much the holdings are expected to earn, according to the bank's model.
  • Risk: how much that return could vary (often measured as volatility). Risk depends not just on each asset but on how assets move together, which is measured by their covariance (or, scaled, their correlation). Two assets that tend to fall at the same time add more risk together than two that don't.

Harry Markowitz set out this trade-off in 1952 [1]. In its classic form, called mean-variance optimisation, you pick how much to hold of each asset to get the most expected return for a given level of risk, or the least risk for a given return.

The classic form, with weights that can be any fraction, is a well-understood calculation that ordinary computers solve quickly. Two kinds of rule make it much harder:

  • Yes/no choices. "Hold at most 30 names." "Either buy a minimum lot or none at all." Each asset is now in or out, a binary choice.
  • Many periods. Rebalancing over time with transaction costs, so today's choice changes tomorrow's cost [5].

With yes/no choices, the number of possible portfolios doubles with every asset added. Ten assets give 1,024 combinations. Fifty give about a thousand million million (10¹⁵). A hundred give about 10³⁰. Checking them all stops being possible very quickly, so practitioners use solvers that search cleverly rather than exhaustively.

Yes/no choices multiply possible portfolios, log scale 1 10¹⁰ 10²⁰ 10³⁰ 50 assets: about 10¹⁵ 100 assets: about 10³⁰ 10 assets: 1,024 4 assets: 16 0 50 100 number of assets Each extra asset doubles the count. Yes/no choices multiply possible yes/no portfolios 4 assets 16 10 assets 1,024 50 assets about 10¹⁵ 100 assets about 10³⁰ Each extra asset doubles the count.
With yes/no choices the number of possible portfolios is 2 to the power of the number of assets: 16 for 4 assets, 1,024 for 10, about 10¹⁵ for 50 and about 10³⁰ for 100. Real solvers search cleverly rather than check every option; at 100 assets no machine, quantum or classical, could check them all.

This is where quantum optimisation is pitched. Before asking whether it helps, the problem has to be written down in a form the machine can take.

2. A small worked example

This example is invented for teaching. The numbers are not market data and are not a view on any asset.

Four assets, A to D. The rule: hold exactly two, half your money in each. The score we want to make as high as possible is:

score = expected return − 2 × variance

The "2" is a risk-aversion setting: how much expected return the investor will give up to reduce risk. A different setting can change the answer.

Asset Expected return Volatility
A 8% 20%
B 6% 15%
C 5% 10%
D 3% 5%

Variance is volatility squared. The correlations are A–B 0.6 (they tend to move together), A–C 0.2, A–D 0 (they don't), B–C 0.3, B–D 0.1 and C–D 0.2.

There are six ways to choose two from four. We can score them all:

Portfolio Expected return Volatility Score (×100)
A + C 6.50% 12.04% 3.600 (best)
B + C 5.50% 10.19% 3.425
A + D 5.50% 10.31% 3.375
C + D 4.00% 6.02% 3.275
B + D 4.50% 8.14% 3.175
A + B 7.00% 15.69% 2.075 (worst)

For A + C, half in each: variance = ¼ × 0.20² + ¼ × 0.10² + 2 × ¼ × 0.2 × 0.20 × 0.10 = 0.0145, so the score is 0.065 − 2 × 0.0145 = 0.036 (3.600 in the table).

Notice that A + B, the pair with the highest expected return, scores worst. A and B move together, so holding both adds a lot of risk. That is the whole point of the covariance term.

Return against risk, six choices Expected return 4% 6% 8% 5% 10% 15% 20% Volatility (risk) 3.600 2.075 B + C, A + D A + C A + B B + D C + D best score equal score Return against risk Expected return 4% 6% 8% 5% 10% 15% 20% Volatility (risk) 3.600 2.075 B + C, A + D A + C A + B B + D C + D best score equal score
The six two-asset portfolios from the table above, half the money in each (invented teaching example). Score = expected return − 2 × variance, shown ×100; the 2 is a risk-aversion setting, and a different setting can change the ranking. Every point on a dotted curve has the same score; higher scores lie to the upper left. A + B has the highest return but the lowest score: A and B move together (correlation 0.6). With yes/no choices there are only these six points; there are no in-between mixes to draw a curve through.

With four assets we just checked every option. The methods below are for when that's impossible.

3. Writing the problem for a quantum machine

One form: QUBO

A quantum annealer accepts one kind of problem, called QUBO (quadratic unconstrained binary optimisation), or its physics twin, the Ising form [2, 3]. In plain terms:

  • every variable is a 0 or a 1 (here: asset out or in);
  • the cost is built only from single variables and pairs of variables (here: each asset's return, and each pair's covariance);
  • there are no separate rules. "Unconstrained" means the machine is simply asked for the lowest-cost combination.

Our rule, "exactly two assets", is a constraint, so it has to be folded into the cost. The standard way is a penalty: add a term that is zero when exactly two assets are chosen and grows when the count is wrong [3]:

cost = −score + P × (number of assets chosen − 2)²

P sets how much a broken rule costs.

Why the penalty matters

Without a penalty, the formula doesn't know about the rule. We checked all 16 combinations of four yes/no choices:

Penalty P Lowest-cost combination Follows the rule?
0 A + C + D (three assets) No
0.01 A + C + D No
0.05 A + C Yes, and it is the best valid portfolio

For this example, any P of about 0.0128 or more makes the best valid portfolio the lowest-cost combination. Below that, the machine would be correctly solving the wrong problem.

The penalty picks the answer Cost (×100) against the penalty P; the lower line wins −5 −2.5 0 about 0.0128 A + C: valid A + C + D: breaks the rule 0 0.01 0.05 penalty P The penalty picks the answer Cost (×100) against penalty P −5 −2.5 0 about 0.0128 A + C: valid A + C + D:breaks rule 0 0.01 0.05 penalty P
Cost = −score + P × (number of assets − 2)², shown ×100; the machine picks the lower line (solid). Dots: the three P values in the table. Below about 0.0128 (exactly 51/4000, our arithmetic), the cheapest answer is a three-asset combination that breaks the hold-exactly-two rule; from there it is A + C, the best valid portfolio. A + C + D isn't a real portfolio: each asset keeps a half weight, so its weights add up to 1.5, which is why it is not in the return-and-risk chart. The threshold is for this example only.

The point carries over to real cases. Turning business rules into penalties is part of the work, and it is where results can quietly go wrong. An independent study of a commercial hybrid annealing service found that it reached the optimum on some problem types. But on a test problem with a quadratic constraint, its answers were about a factor of two from the optimum in most runs [4]. The authors suggest the solver got stuck in a local minimum: an answer that no small change can improve, but that isn't the best overall. They left the solver's default penalty weights for the constraint unchanged and don't rule out that tuning them would give better answers. Either way, a claim should say how constraints were handled and how often the answers broke them.

4. Two kinds of machine, two approaches

How to evaluate a quantum computing pilot explains the difference between annealers and general-purpose (gate-based) machines. Here is what each does with a portfolio problem.

Quantum annealers

An annealer is built to search for low-cost answers to a QUBO or Ising problem [2]. Its qubits are connected in a fixed physical pattern, and not every qubit is connected to every other.

That matters for portfolios, because covariance links almost every pair of assets, and the penalty term links every pair too. In our example all four variables interact with all the others. A problem like that has to be embedded: each problem variable is represented by a chain of several physical qubits made to act together, so that the chain can reach all the variables it needs to [3].

The cost is large. The study cited above, published in 2025, tested D-Wave's Advantage annealer [4]. On that chip, the largest fully connected QUBO it could take directly was far smaller than its qubit count: roughly 32 qubits on the chip for every fully connected variable (see the table below). Not all of them end up in the chains, but the rest can't be used to make that problem any larger. The authors also note that as problems grow, embedding leaves less to work with and solution quality falls [4].

Dated figures. As reported in the studies; newer machines differ, so check the figures for the machine a proposal names.

Figure As reported Machine and source
Qubits in the chip's design (some may be faulty) 5,760 D-Wave Advantage; study published 2025 [4]
Largest fully connected QUBO the chip could take directly 180 variables D-Wave Advantage; study published 2025 [4]
Largest dynamic portfolio problem solved by a hybrid annealing service 1,272 fully connected binary variables (the paper says "qubits") D-Wave's hybrid service; study published 2022 [5]

So an annealer's qubit count is not the size of portfolio it can handle. For a problem where everything interacts, the usable size is much smaller.

Qubit count is not problem size D-Wave Advantage, as reported in 2025 [4] Chip qubits: 5,760 Largest fully connected problem: 180 variables About 32 chip qubits per variable Qubit count is not problem size D-Wave Advantage, reported 2025 [4] Chip qubits: 5,760 Largest fully connected problem: 180 variables About 32 chip qubits per variable
Figures for D-Wave's Advantage annealer as reported in a study published in 2025 [4]: the qubits in the chip's design, and the largest problem it could take directly in which every variable interacts with every other. Each such variable needs a chain of chip qubits. Not all qubits end up in the chains, but the rest can't make that problem any larger. Some of the 5,760 qubits may be faulty. About 32 chip qubits per fully connected variable is our arithmetic (5,760 ÷ 180). Bars on a linear scale, starting at zero. Dated figures; newer machines differ.

Commercial services usually wrap the annealer in classical processing (a hybrid solver) to take larger problems. The same study compared such a service with leading classical solvers on several problem types. On purely binary quadratic test problems, the kind a portfolio becomes, it found the optimal answers faster than the classical solvers. But the authors call it competitive only "for a limited set of real-world problems": its competitiveness fell for problems that are not purely binary and quadratic, and on a real energy-planning problem its performance "has not yet matched that of its classical counterparts" [4]. None of the test problems was a portfolio.

QAOA on gate-based machines

The Quantum Approximate Optimisation Algorithm (QAOA) is a hybrid method for gate-based machines [6]. In outline:

  1. A circuit alternates between a step that encodes the cost (the same QUBO) and a "mixing" step that moves between candidate answers.
  2. The circuit has dials (angles). An ordinary computer sets them, the quantum computer runs the circuit and returns sample answers, and the ordinary computer scores them and adjusts the dials.
  3. The loop repeats. The number of alternating rounds is the circuit's depth, written p.

A benchmarking study published in 2023 applied several QAOA variants to portfolio selection with a fixed number of assets [7]:

  • The problems were small: 5 assets choosing 2, and 10 assets choosing 5, drawn from a German stock index.
  • All results came from simulators, including simulated noise. No real hardware runs were reported.
  • Mixing steps designed to stay within the "exactly k assets" rule did better than the standard one in noise-free simulation. At 10 assets and depth 7, the best variants scored up to about 0.98 on the study's quality scale, where 1 is the best valid portfolio and 0 the worst valid one (or an invalid one), and found the best portfolio about 60% of the time. That is not "98% of the best score": in §2, even the worst pair scores 58% of the best one, so a plain ratio to the best is easy to push towards 1.
  • With added noise, those better-designed circuits were more sensitive, and the simpler standard one did better above quite low noise levels.
  • The study did not compare against classical portfolio solvers. It used brute force only to find the exact answer for instances small enough to enumerate.
  • It found that some instances were easier than others, and suggested that instance selection should be considered when benchmarking.

That last point is important for any reader of a results slide. If a team chooses the instances, a method can look better or worse depending on which instances were chosen.

Proposed algorithms with bigger promised speed-ups

A different line of work proposes quantum algorithms for the classic mean-variance problem with continuous weights. Rebentrost and Lloyd describe one that, given quantum access to the historical record of returns, could in principle run in a time that grows far more slowly than the number of assets (as a power of its logarithm), where direct classical methods slow down as a power of the number of assets itself [8]. The authors themselves discuss the potential speed-up "in light of efficient classical sampling approaches" [8].

Two things to note:

  • This is a proposal, analysed on paper. It has not been run at a useful size.
  • The phrase "quantum access to the data" hides a hard engineering requirement: loading a large data set into a quantum computer in a usable form. That is the problem described in What quantum computers are good at. Classical methods inspired by these algorithms are covered in Quantum-inspired methods.

5. What the evidence shows

Approach What has been done Evidence type What it does not show
Hybrid annealing service Binary and mixed problems compared with leading classical solvers [4]; large dynamic portfolio problems solved by the hybrid service (size in the dated figures table in §4) [5] Demonstrated on hardware (with heavy classical processing) Better results than tuned classical solvers outside purely binary quadratic problems [4]; any portfolio-specific advantage
QAOA Portfolios of 5 and 10 assets [7] Demonstrated in simulation Hardware performance; comparison with classical solvers; behaviour at commercial size
Variational methods on gate-based hardware Up to 12 qubits on IBM machines. On the smallest data set, the basic version gave a lower risk-adjusted return (Sharpe ratio) than the other methods, while a version with the rule built in matched the best answer [5] Demonstrated on hardware, small Usefulness at commercial size; the authors say such machines "still struggle" with problems of commercially relevant size [5]
Quantum algorithms for mean-variance (continuous weights) Analysis and proofs on paper [8] Proposed Any run; whether the data can be loaded efficiently; whether classical sampling methods close the gap
Tensor networks (quantum-inspired, classical hardware) Same dynamic portfolio study, run on a laptop [5] Classical method Anything about quantum hardware

Two review papers sum up the wider field. A 2024 review by a large working group on quantum optimisation states that more tools are needed to reach quantum advantage in optimisation, and calls for systematic, reproducible benchmarks against classical methods [9]. A review of annealing for industry found no industrial application where annealing unquestionably outperforms classical heuristic algorithms [2].

One more finding deserves attention. The dynamic portfolio study compared annealing, gate-based, tensor-network and conventional classical solvers on real price data. It found no single best method: which came out on top depended on whether you measured risk-adjusted return, profit or computing time. The performance of a classical solver was "quite remarkable, sometimes even better than quantum and quantum-inspired solutions depending on the metric" [5]. The same paper notes that the answer with the lowest cost is not always the one with the best profit or risk-adjusted return [5]. The cost the machine minimises is a model of what the business wants, not the business outcome itself.

6. What a fair benchmark holds constant

Every one of these must be the same for the quantum method and the classical one it is compared with. If any differs, the comparison doesn't support an advantage claim.

Hold constant Why it matters
The instance Same assets, data, return and risk estimates. And say who chose the instances, and how, because some are easier than others [7].
The objective and the rules Same score, same risk aversion, same constraints. A method that breaks constraints hasn't solved the problem.
The quality target Compare time to reach the same quality (for example, within 1% of the best known answer), or quality reached in the same time. "Found a good portfolio" sets no target.
The full time Wall-clock time from data in to answer out: embedding, queueing, repeated runs, and the classical processing in a hybrid loop, not just time on the quantum chip.
The classical opponent A leading commercial or academic solver, set up and tuned by people who know it, plus simple fast heuristics. "We beat the default settings" is not a benchmark.
The size that matters A result on 10 assets says little about 500 unless the scaling is shown.

7. Questions to ask about a quantum portfolio claim

The general approval questions are in How to evaluate a quantum computing pilot. These are the ones specific to portfolio claims.

  1. How big was the problem after embedding? How many problem variables were there, and how many physical qubits did the embedding use?
  2. How were the rules handled? Penalties or built-in constraints? How often did answers break the rules, and what happened to those answers?
  3. Was the classical solver given the same portfolio problem? The same rules, the same risk-aversion setting and the same return and risk estimates?
  4. Which quality measure? The cost the machine minimised, or a business measure such as risk-adjusted return? The two can rank methods differently [5].
  5. Who chose the instances, and how many were there? Would a random draw of instances give the same picture?
  6. Hardware or simulator, and at what size? If simulated, was noise included? If on hardware, how much of the work did the classical side do?

None of these questions argues against running a pilot. As How to evaluate a quantum computing pilot explains, learning can be a legitimate goal. The questions make sure a learning result isn't reported as an advantage.

What you’ve learned

  • Portfolio selection with yes/no choices becomes a QUBO: binary variables, a cost built from single terms and pairs, and rules folded in as penalties.
  • Annealers take QUBOs directly, but for problems where everything interacts, embedding uses many physical qubits per variable. A qubit count is not a problem size.
  • QAOA has been studied on small portfolio problems (in the study reviewed here, in simulation only), with results sensitive to noise and to which instances were chosen.
  • Proposed algorithms with larger speed-ups assume efficient quantum access to data, which hasn't been shown at scale.
  • In the sources reviewed, no quantum method has been shown to beat well-tuned classical solvers on portfolio problems of commercial size.
  • A fair benchmark holds the instance, objective, quality target, full time, classical opponent and size constant.

This article is educational and isn't investment, trading or procurement advice.

Written by Muhammad Atif · Reviewed 26 November 2026 · How sources are chosen and checked · Report a correction

Sources and further reading

Tags show the kind of source (how sources are chosen and checked). Dates and figures were checked against these sources on 12 November 2026. Spotted an error? Report a correction.

  1. Peer-reviewed paperPortfolio selectionHarry Markowitz, Journal of Finance 7(1), 1952
  2. Peer-reviewed paperQuantum annealing for industry applications: introduction and reviewYarkoni, Raponi, Bäck and Schmitt, Reports on Progress in Physics, 2022
  3. Peer-reviewed paperIsing formulations of many NP problemsAndrew Lucas, Frontiers in Physics, 2014
  4. Peer-reviewed paperQuantum annealing applications, challenges and limitations for optimisation problems compared to classical solversQuinton, Myhr, Barani, Crespo del Granado and Zhang, Scientific Reports, 2025
  5. Peer-reviewed paperDynamic portfolio optimization with real datasets using quantum processors and quantum-inspired tensor networksMugel et al., Physical Review Research, 2022
  6. PreprintA quantum approximate optimization algorithmFarhi, Goldstone and Gutmann, arXiv:1411.4028, 2014
  7. Peer-reviewed paperBenchmarking the performance of portfolio optimization with QAOABrandhofer et al., Quantum Information Processing, 2023
  8. Peer-reviewed paperQuantum computational finance: quantum algorithm for portfolio optimizationPatrick Rebentrost and Seth Lloyd, KI – Künstliche Intelligenz, 2024
  9. Peer-reviewed paperChallenges and opportunities in quantum optimization (Quantum Optimization Working Group)Abbas et al., Nature Reviews Physics, 2024