
In this portfolio-selection task, the investment decision is encoded as a binary vector (\mathbf{x}\in\{0,1\}^N), where (x_i=1) means asset (i) is included and (x_i=0) otherwise, with a cardinality requirement (\sum_i x_i=K). The algorithm estimates the per-asset mean returns (\boldsymbol{\mu}) and the return covariance matrix (\Sigma). These statistics define a QUBO objective that trades off risk and return while enforcing the (K)-of-(N) constraint via a penalty:
The first (quadratic) term penalizes portfolio variance; the second (linear) term rewards expected return; the third expands to linear and pairwise terms that embed the constraint into the unconstrained binary objective.
Quantum annealing is a hybrid optimization method that starts from an easy "mixing" Hamiltonian (the driver, often a transverse field) and gradually shifts to the problem Hamiltonian that encodes the cost you want to minimize:
with A(t) \downarrow and B(t)\!\uparrow. If the change is slow enough relative to the minimum spectral gap, the system stays near the best (lowest-energy) solution. Intuitively, quantum tunneling helps escape narrow energy traps that stall classical heuristics. In practice, Quantum Annealing is used in hybrid workflows: classical steps do embedding and small local improvements; the annealer supplies low-energy candidates. Problems are written as Ising models, which are algebraically equivalent to QUBO.
A quadratic unconstrained binary optimization problem seeks a binary vector \mathbf{x}\in\{0,1\}^n that minimizes a quadratic objective:
It is equivalently expressed as a binary quadratic model with linear and pairwise terms. This QUBO formulation is NP-hard and subsumes many classical combinatorial problems such as max-cut, set packing, and facility location.
Expanding a penalty function F(\mathbf{x}) with x_i^2 = x_i gives:
with:
Using spins s_i = 2x_i - 1 \in \{-1,+1\}, the QUBO maps to an Ising Hamiltonian:
where:
This H_1 is the problem term used by the annealer.
The device evolves under H(t) = A(t)\cdot H_0 + B(t)\cdot H_1, where H_0 is a transverse-field driver and H_1 encodes the Ising instance above. Forward annealing decreases A(t) while increasing B(t); sufficiently slow evolution relative to the minimum spectral gap favors low-energy (good) solutions. Reverse annealing can refine a candidate by temporarily increasing quantum fluctuations before re-annealing. Because hardware connectivity is sparse, logical variables are embedded into chains of physical qubits; chain strength, spin-reversal (gauge) transforms, anneal time, and schedule shape act as practical controls that affect success rates and chain-break behavior.
Task: Cardinality‑constrained portfolio construction (K = 6 of N = 10 assets to choose and invest in).
| Relevant Parameter | Value | Notes |
|---|---|---|
| Universe | {AAPL, MSFT, GOOGL, AMZN, META, NVDA, JPM, XOM, V, PG} | Daily prices, 2018‑01‑01 to 2024‑12‑31 |
| Constraint | K = 6 (cardinality) | Penalty‑encoded in QUBO |
Execution
Simulator
Logical qubits for QUBO
10
Sharpe
0.12
Annual return
0.40
Annual volume
0.18
The QUBO portfolio optimizer enforces an exact K-of-N selection while jointly balancing return and risk, producing auditable allocations with targeted diversification. The approach replaces manual screening with a single tunable solver, reducing research time and enabling faster rebalance cycles.
Annual projected value add vs. Equal‑Weight benchmark (assumes $5M AUM).
Return on investment based on alpha uplift vs. TCO.
Efficiency gains in candidate selection and rebalancing cycles.
Simple and transparent: from your brief to quantum results, code, and a paper
Map your problem to the right quantum use case
Confirm the quantum-classical hybrid approach and key assumptions
Download ready-to-run code; execute on simulator
Review reproducible results — iterate as needed
Compare against classical baseline; prepare for quantum hardware
Run your first portfolio optimization task with QUBO formulation and get transparent results within a clear report.
Try Your First Use Case for Free