Quantum Optimization for Finance - Portfolio Construction, Derivatives, and Where QAOA Earns Its Keep

Quantum Optimization for Finance - Portfolio Construction, Derivatives, and Where QAOA Earns Its Keep

A working engineer’s tour of three quantum-finance use cases — mean-variance portfolio optimization, derivative pricing via quantum amplitude estimation, and credit-risk analysis.

  1. The Hook
  2. What You Will Know By The End
  3. Prerequisites
  4. The Core Idea
  5. Portfolio Optimization as QUBO
  6. Quantum Amplitude Estimation for Monte Carlo
  7. One Counterintuitive Detail: The Classical Baseline Keeps Improving
  8. Limitations and Open Questions
  9. Further Reading

The Hook

Finance has been the most concrete commercial pitch for quantum computing for nearly a decade. The vendor pattern is familiar: walk through portfolio optimization on a quantum computer, declare a “speedup,” and move on. The reality is more interesting and more disciplined. There are at least two distinct quantum-finance pipelines — QAOA-style combinatorial optimization and QPE-style amplitude estimation for Monte Carlo — and they have radically different prospects for advantage. This article works through both, runs honest comparisons against classical heuristics, and is explicit about where 2026 hardware actually earns its keep and where it does not yet.

What You Will Know By The End

  • The mathematical reduction from Markowitz mean-variance optimization to a QUBO suitable for QAOA or quantum annealing, including where the reduction loses information.
  • How quantum amplitude estimation delivers a provable quadratic speedup over Monte Carlo for derivative pricing — and the qubit-count bottleneck that delays its practical use.
  • Honest benchmark results: where QAOA matches or slightly trails simulated annealing on 2026 problem sizes, and where the actual quantum advantage in finance will first appear.

Prerequisites

Familiarity with QAOA at the level of Farhi, Goldstone & Gutmann (arXiv:1411.4028, 2014). Comfort with quadratic programming and Lagrangian duality. The Markowitz mean-variance framework. Basic Ising/QUBO equivalences. Orús, Mugel & Lizaso, “Quantum computing for finance: overview and prospects” (Reviews in Physics 4, 2019) is the best single-paper entry point and worth reading before this article.

The Core Idea

Three classical finance problems map cleanly to quantum primitives:

Classical problemQuantum approachProvable speedup?
Mean-variance portfolio optimization (cardinality-constrained)QAOA, VQE, quantum annealingNone proved; heuristic
Derivative pricing via Monte CarloQuantum amplitude estimation (QAE)Quadratic (Brassard et al. 2002)
Credit-risk / VaR via Monte CarloQAEQuadratic

The first is where most demos live and where the advantage is unproven. The second and third have rigorous quadratic speedup but require thousands of clean logical qubits we do not yet have.

Portfolio Optimization as QUBO

Mean-variance Markowitz minimizes risk for a target return: \[\min_{w \in \mathbb{R}^n} \; w^\top \Sigma w \;-\; q \, \mu^\top w, \qquad \text{s.t. } \sum_i w_i = 1, \; w_i \ge 0.\]

This is a convex quadratic program and is solved exactly by classical methods in microseconds. The interesting version is cardinality-constrained: pick exactly $K$ of $N$ assets (e.g., for a transaction-cost-limited fund). The cardinality constraint makes the problem NP-hard.

Reformulate with binary variables $x_i \in {0,1}$ indicating asset selection: \[\min_{x \in \{0,1\}^n} \; x^\top \Sigma x \;-\; q \, \mu^\top x \;+\; \lambda \left(\sum_i x_i - K\right)^2.\]

The penalty term enforces the cardinality. Expanding the squared constraint yields a quadratic unconstrained binary optimization (QUBO) problem. The Ising map $x_i = (1 - z_i)/2$ with $z_i \in {-1, +1}$ converts QUBO to a transverse-field Ising Hamiltonian, which is exactly what QAOA optimizes.

import numpy as np
import pennylane as qml

rng = np.random.default_rng(0)
n_assets, K = 6, 3
mu = rng.uniform(0.05, 0.15, n_assets)              # expected returns
A = rng.standard_normal((n_assets, n_assets))
Sigma = A @ A.T / n_assets + 0.01 * np.eye(n_assets)  # PSD covariance
q, lam = 0.5, 1.0

def qubo_cost(x):
    return float(x @ Sigma @ x - q * mu @ x + lam * (x.sum() - K) ** 2)

# QUBO -> Ising: x^T Q x + c^T x with x_i = (1 - z_i) / 2
def qubo_to_ising(Q, c):
    n = len(c)
    h = np.zeros(n); J = np.zeros((n, n)); const = 0.0
    for i in range(n):
        h[i] -= c[i] / 2; const += c[i] / 2
        for j in range(n):
            J[i, j] += Q[i, j] / 4
            h[i]   -= Q[i, j] / 4
            h[j]   -= Q[i, j] / 4
            const  += Q[i, j] / 4
    return h, J, const

# Linear part comes from -q*mu and from expanding lam*(sum-K)^2.
c = -q * mu + 2 * lam * (-K) * np.ones(n_assets)
Q = Sigma + lam * np.ones((n_assets, n_assets))
h, J, const = qubo_to_ising(Q, c)

The QAOA Ansatz alternates a cost Hamiltonian $H_C$ (encoding the QUBO) and a mixer Hamiltonian $H_M = \sum_i X_i$: \[|\psi(\boldsymbol{\gamma}, \boldsymbol{\beta})\rangle \;=\; \prod_{p=1}^{P} e^{-i\beta_p H_M} \, e^{-i\gamma_p H_C} \; |+\rangle^{\otimes n}.\]

Measuring in the computational basis and post-processing gives a candidate assignment. The variational parameters $(\boldsymbol{\gamma}, \boldsymbol{\beta})$ are tuned classically via an outer loop.

P = 3
dev = qml.device("default.qubit", wires=n_assets)

@qml.qnode(dev)
def qaoa_expval(params):
    gammas, betas = params[:P], params[P:]
    for w in range(n_assets):
        qml.Hadamard(w)
    for layer in range(P):
        # Cost layer: Z and ZZ rotations
        for i in range(n_assets):
            qml.RZ(2 * gammas[layer] * h[i], wires=i)
        for i in range(n_assets):
            for j in range(i + 1, n_assets):
                qml.IsingZZ(2 * gammas[layer] * J[i, j], wires=[i, j])
        # Mixer layer
        for i in range(n_assets):
            qml.RX(2 * betas[layer], wires=i)
    # Cost expectation: sum h_i <Z_i> + sum J_ij <Z_i Z_j>
    obs  = sum(h[i] * qml.PauliZ(i) for i in range(n_assets))
    obs += sum(J[i, j] * qml.PauliZ(i) @ qml.PauliZ(j)
               for i in range(n_assets) for j in range(i + 1, n_assets))
    return qml.expval(obs)

params = np.array([0.1] * P + [0.1] * P, requires_grad=True)
opt = qml.AdamOptimizer(0.05)
for _ in range(150):
    params = opt.step(qaoa_expval, params)

The fair comparison is against simulated annealing, which solves identical QUBOs in milliseconds on a laptop:

def simulated_annealing(qubo_fn, n, sweeps=10_000, T0=2.0, seed=1):
    rng = np.random.default_rng(seed)
    x = rng.integers(0, 2, n)
    best = x.copy(); best_E = qubo_fn(x)
    for s in range(sweeps):
        T = T0 * (1 - s / sweeps)
        i = rng.integers(0, n)
        x_new = x.copy(); x_new[i] = 1 - x_new[i]
        dE = qubo_fn(x_new) - qubo_fn(x)
        if dE < 0 or rng.uniform() < np.exp(-dE / max(T, 1e-9)):
            x = x_new
            if qubo_fn(x) < best_E:
                best, best_E = x.copy(), qubo_fn(x)
    return best, best_E

On problem sizes that fit on current NISQ devices (≤ 30 assets), simulated annealing typically matches or beats QAOA at $P = 3$ to $P = 5$ layers. This is not a flaw in the demonstration — it is the state of the field as of 2026. Brandhofer et al. (Quantum Inf. Process., 2021), Stilck França & García-Patrón (Nature Physics, 2021), and the systematic empirical surveys all find the same pattern: QAOA at constant depth on realistic QUBO instances does not exhibit advantage at sizes accessible to NISQ devices.

What QAOA does offer is a clear path to advantage with deeper circuits and better classical-quantum parameter optimization (Zhou et al., Phys. Rev. X, 2020 on parameter concentration). Whether that path closes the gap before fault tolerance arrives is the open empirical question.

Quantum Amplitude Estimation for Monte Carlo

This is the under-discussed and theoretically strongest quantum-finance application.

Classical Monte Carlo estimation of an expectation $\mathbb{E}_X[f(X)] = a$ to additive error $\epsilon$ requires $\mathcal{O}(1/\epsilon^2)$ samples — the inverse-square law of statistical error. Quantum amplitude estimation (QAE; Brassard, Hoyer, Mosca & Tapp, Quantum Computation and Information, 2002) estimates the same quantity to the same error with $\mathcal{O}(1/\epsilon)$ uses of a state-preparation oracle. That is a provable quadratic speedup, and it is structural, not heuristic.

For derivative pricing, $f$ is the discounted payoff, $X$ is the underlying’s path, and the expectation is the option price. Stamatopoulos et al. (Quantum 4:291, 2020) demonstrated quantum algorithms for European, Asian, and basket-option pricing using QAE; Egger et al. (IEEE Trans. Q. Eng., 2020) extended it to credit-risk VaR.

The implementation skeleton, using iterative QAE (Grinko, Gacon, Zoufal & Woerner, npj Quantum Information, 2021) to avoid the QPE register:

# Sketch only; a full IQAE implementation lives in qiskit-finance / pennylane-finance.
# 1. State-preparation oracle |0> -> sqrt(1-a)|psi_0>|0> + sqrt(a)|psi_1>|1>
#    where the amplitude on |1> equals the discounted payoff expectation.
# 2. Grover-style amplification: Q = -A S_0 A^{-1} S_chi, applied k times.
# 3. Likelihood-based estimator: from outcomes of multiple k values,
#    infer the amplitude a with ~ 1/N_oracle scaling instead of 1/sqrt(N).
#
# Key resource numbers (Stamatopoulos et al. 2020):
#   - 5-10 qubits for distribution loading
#   - 5-10 qubits for payoff register
#   - Comparable QPE / IQAE register
#   - Total ~30-50 qubits for a useful European option.

The catch is the qubit cost. A useful European-option pricing problem needs roughly 10 qubits for distribution loading, plus a comparable amplitude-estimation register, plus ancillas. That puts realistic problems at 30–50 logical qubits — far beyond what NISQ provides without error correction, but within the projected 2030s fault-tolerant regime. Chakrabarti et al. (Quantum 5:463, 2021) give resource-estimate tables placing a “useful” derivative-pricing computation at roughly $10^7$ T-gates after error correction — large, but no longer absurd.

This is where the actual quantum-finance advantage will first appear: not in optimization, but in structured Monte Carlo with rigorous quadratic speedup.

One Counterintuitive Detail: The Classical Baseline Keeps Improving

A frequently under-appreciated dynamic in quantum finance is that classical algorithms keep getting better while quantum hardware catches up. Tensor-network-based simulators (Patil et al., Quantum Sci. Tech., 2022; Termanini et al., 2024) now solve Markowitz-style cardinality-constrained optimization at scales QAOA cannot reach. Quantum-inspired classical algorithms — typically variants of tensor-network or low-rank approximation — close the gap on the very problems quantum methods were proposed for.

This is the moving goalpost: the quantum-advantage frontier in finance is not where quantum hardware reaches, it is where the classical baseline finally plateaus. As of 2026, that has not happened for portfolio optimization, and it is unclear whether it will. The published “quantum advantage on finance” results from 2018–2023 mostly do not survive a fair re-implementation of the classical state of the art.

This is a discipline worth internalizing for anyone working in QML more broadly: when a quantum paper claims advantage on a structured problem, the next step is to ask whether a tensor-network or randomized classical algorithm closes the gap. Often, it does.

Limitations and Open Questions

  • No proven QAOA advantage for finance problems. The literature has empirical wins on contrived instances and consistent ties or losses on realistic ones.
  • QAE qubit cost is the chokepoint. A useful derivative-pricing instance needs ~50 logical qubits and millions of T-gates — beyond near-term but reachable in the projected 2030s fault-tolerant regime.
  • Loading classical data into a quantum state is its own bottleneck. “QRAM” assumptions in many QML papers (including HHL-based finance proposals) are not realized in any current hardware. The fastest practical loaders are still polynomial in the data size.
  • Risk-regulator validation is undefined. A regulatory framework for “the quantum computer recommended this portfolio” does not yet exist. Basel-style validation of QAOA outputs is an open research question.
  • NISQ error rates eat the speedup. Even when QAE gives a quadratic speedup on paper, the constant-factor overhead from error mitigation can exceed the advantage at current noise rates. Stilck França & García-Patrón (2021) formalized this for variational algorithms; the analog for QAE is still being worked out.

Further Reading

  • Orús, Mugel & Lizaso, “Quantum Computing for Finance: Overview and Prospects” (Reviews in Physics 4, 2019). The best single-paper entry.
  • Rebentrost, Gupt & Bromley, “Quantum Computational Finance: Monte Carlo Pricing of Financial Derivatives” (Phys. Rev. A, 2018).
  • Stamatopoulos, Egger, Sun, Zoufal, Iten, Shen & Woerner, “Option Pricing Using Quantum Computers” (Quantum 4:291, 2020).
  • Egger et al., “Credit Risk Analysis Using Quantum Computers” (IEEE Trans. Q. Eng., 2020).
  • Chakrabarti, Krishnakumar, Mazzola, Stamatopoulos, Woerner & Zeng, “A Threshold for Quantum Advantage in Derivative Pricing” (Quantum 5:463, 2021).
  • Farhi, Goldstone & Gutmann, “A Quantum Approximate Optimization Algorithm” (arXiv:1411.4028, 2014).
  • Zhou, Wang, Choi, Pichler & Lukin, “QAOA: Performance, Mechanism, and Implementation on Near-Term Devices” (Phys. Rev. X 10, 2020).
  • Grinko, Gacon, Zoufal & Woerner, “Iterative Quantum Amplitude Estimation” (npj Quantum Information, 2021).
  • Stilck França & García-Patrón, “Limitations of Optimization Algorithms on Noisy Quantum Devices” (Nature Physics, 2021).
  • Brandhofer et al., “Benchmarking the Performance of Portfolio Optimization with QAOA” (Quantum Inf. Process., 2021).
  • Patil, Mugel et al., “Tensor-Network Methods for Portfolio Optimization” (Quantum Sci. Tech., 2022).
  • Companion repository for this article: https://github.com/<your-handle>/quantum-finance-q41 (Markowitz → QUBO → QAOA, simulated-annealing baseline, IQAE for European options).


© Gerald Oluoch 2026. All rights reserved.