Quantum Portfolio Optimization Studio

QAOA & VQE Engine

Variational Quantum Eigensolver & Ising Spin-Glass Combinatorial Arbitrage

At1uri Hub
Simulator: In-Browser Exact $\mathbb{C}^{2^n}$
Quantum Algorithm
QAOA ($p=2$)
Alternating Unitary Layers
Quantum Energy $\langle \mathcal{H}_C \rangle$
-0.4285
Error $\Delta E$: 0.0412
Ground State $E_0$
-0.4697
Target: |1010⟩
Approximation Ratio $\alpha$
94.8%
$\frac{\langle \mathcal{H} \rangle - E_{\max}}{E_0 - E_{\max}}$
Bipartite Entanglement
0.842 bits
Von Neumann $S(\rho_A)$

Quantum Engine Setup

Risk Aversion ($q$) 0.50
Target Cardinality ($K$) 2 assets
Budget Penalty ($\lambda_{\text{pen}}$) 1.20
Circuit Depth ($p$ layers) 2 layers
Learning Rate ($\eta$) 0.08

Variational Energy Convergence

$\langle \mathcal{H}_C \rangle \to E_0$

Basis State Probabilities $|\langle x | \psi \rangle|^2$

Optimum: |1010⟩

Parameterized Quantum Circuit Schematic

4 Qubits | Depth: 2 | Cost $U_C(\gamma)$ + Mixer $U_B(\beta)$

Single-Qubit Bloch Vector Projections

$\mathbf{r}_i = (\langle X \rangle, \langle Y \rangle, \langle Z \rangle)$

Ising Spin-Glass Coupling Matrix ($J_{ij}$)

$\mathcal{H}_C = \sum h_i Z_i + \sum J_{ij} Z_i Z_j$

§ Rigorous Quantum Mechanical Formulation & Spin Mapping

Mathematical mapping of Markowitz portfolio optimization onto quantum transverse-field Ising Hamiltonians

1. QUBO to Ising Transformation

Each binary portfolio decision variable $x_i \in \{0, 1\}$ is represented as a spin operator on the 2-dimensional Hilbert space $\mathcal{H}_2 \cong \mathbb{C}^2$:

$$x_i \mapsto \frac{I - \sigma_i^z}{2}, \quad \sigma^z = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}$$

Eigenstate $|0\rangle \to x_i = 0$ (unallocated) and $|1\rangle \to x_i = 1$ (allocated).

2. QAOA Alternating Operators

QAOA prepares the state $|\boldsymbol{\gamma}, \boldsymbol{\beta}\rangle = \prod_{l=1}^p e^{-i \beta_l \mathcal{H}_M} e^{-i \gamma_l \mathcal{H}_C} |+\rangle^{\otimes n}$.

$$\mathcal{H}_M = \sum_{i=1}^n \sigma_i^x, \quad \mathcal{H}_C = \sum_i h_i \sigma_i^z + \sum_{i

By Farhi et al. (2014), as $p \to \infty$, the state adiabatically converges to the exact ground state with approximation ratio $\alpha \to 1$.

3. Rayleigh-Ritz Variational Principle

The Variational Quantum Eigensolver evaluates expectation values through the hardware-efficient ansatz $|\psi(\boldsymbol{\theta})\rangle$:

$$\langle \mathcal{H}_C \rangle_{\boldsymbol{\theta}} = \sum_{x \in \{0, 1\}^n} |\langle x | \psi(\boldsymbol{\theta}) \rangle|^2 E(x) \ge E_0$$

Analytical parameter-shift gradients $\nabla_{\theta_k} \langle \mathcal{H} \rangle = \frac{\langle \mathcal{H} \rangle_{\theta_k + \frac{\pi}{2}} - \langle \mathcal{H} \rangle_{\theta_k - \frac{\pi}{2}}}{2}$ allow gradient descent without classical finite-difference truncation error.