QPRIMORA · QUANTUM COMPUTING DEMO

Portfolio Optimization

Portfolio Optimization

Given several assets with different expected returns, risks and correlations, which combination should be selected to balance return and risk?

This example demonstrates how a financial decision problem can be converted into binary optimization and mapped toward a quantum optimization workflow.
01 · YOUR PROBLEM

Set the investment objective

6
3
50%
Return focused Risk focused
Synthetic market
This page uses synthetic assets for education only. It does not provide investment recommendations.
02 · QPRIMORA TRANSFORMATION

From investment objective to quantum representation

REAL-WORLD OBJECTIVE Choose a portfolio
↓
DECISION VARIABLES xi ∈ {0,1} Select asset i or not
↓
OBJECTIVE Return − Risk Penalty
↓
CONSTRAINT Σ xi = K Select exactly K assets
↓
REPRESENTATION QUBO
↓
QPRIMORA PRIMITIVE Risk-Return Combinatorial Optimization
QPRIMORA · INSIDE THE TRANSFORMATION

See how the financial problem is encoded

A · DECISION VARIABLES

Each candidate asset is represented by one binary variable.

xi = { 0, 1 }

x(i)=1 means the asset is included in the portfolio.

B · EXPECTED RETURN

Portfolio return is derived from the expected returns of the selected assets.

Return(x) = Σ μixi
C · PORTFOLIO RISK

Risk depends not only on individual volatility, but also on correlations between assets.

Risk²(x) = xᵀΣx

Σ = covariance matrix

D · RISK–RETURN OBJECTIVE

The optimization balances expected return against portfolio risk.

min E(x) = λ · Risk(x) − Return(x)

λ represents the user's risk preference.

E · QUBO

The risk-return objective and asset-count constraint can be combined into a quadratic binary model.

E(x) = λxᵀΣx − μᵀx + A(Σxi − K)²
Portfolio → Binary Variables → QUBO
F · COST HAMILTONIAN + QAOA
QUBO → Ising Form → Cost Hamiltonian → QAOA → Virtual QPU
The optimization process attempts to increase the measurement probability of lower-energy portfolio states.
03 · COMPUTE

Compare classical and quantum paths

CLASSICAL

Exact enumeration

Candidate assets ↓ Enumerate portfolios ↓ Calculate return and risk ↓ Select minimum-energy portfolio
QUANTUM PATH

Virtual QPU

QUBO ↓ Cost Hamiltonian ↓ QAOA ↓ Measurement ↓ Portfolio distribution
QPRIMORA ARCHITECTURE

The domain changes. The architecture does not.

Financial objective → Representation → Primitive → Algorithm → Virtual QPU → Real QPU

The same architecture used for route optimization can also represent a financial combinatorial optimization problem.