Project Showcase: Quantum Regime Radar
Alireza Khodaei built a tool that fingerprints live market behavior and scores it against five volatility regimes taken from real history, with quantum kernels on IonQ hardware.
A volatility model fitted in a calm market breaks in a crisis. Quantum Regime Radar asks the question a modeler needs answered first: which kind of market is this?
It classifies live equity returns against five volatility regimes taken from real market history, episodes like the 2017 melt-up or the buildup to the SVB collapse. Each regime's volatility fingerprint, estimated with the GARCH family of models, is encoded as a quantum state. At inference time a quantum kernel measures how strongly the live market's state overlaps each reference, and the result is a probability distribution over regimes, plus a recommendation for which modeling approach fits the moment.
It is a Spring 2026 challenge project from Alireza Khodaei, whose doctoral research put GARCH estimation on quantum hardware. His framing of the whole system fits in three sentences.
We have a bunch of known market regimes with respect to volatility, and we make a quantum fingerprint out of each. Then, given live data: how similar are these two days to the pre-crisis regime? There is no yes-or-no answer. There is a probability.
Built by
Five regimes, taken from history
The reference regimes are not synthetic labels. Each one is an empirically characterized market episode whose volatility behaviour was estimated and backtested with GARCH(1,1), the standard model that captures baseline variance, shock reactivity, and how long volatility persists. The current library holds five:
Five reference regimes, each anchored to a real market episode.
| Field | Detail |
|---|---|
| Complacency | SPY 2017, the low-volatility melt-up. |
| Pre-crisis | KRE 2023, the buildup to the SVB collapse. |
| Hyper-crisis | SPY 2020, the COVID crash. |
| Leverage crisis | SPY 2020, the long COVID grind that followed. |
| Recovery | SPY late 2022, the climb back from that year's rout. |
Getting to five was work. The project started from twenty known regimes across the S&P 500, each fingerprinted with its own qubit budget per GARCH parameter. That full set was too large for today's hardware, so the team distilled it to the most principal regimes by entropy contribution and focused the live test cases on Magnificent 7 stocks, with baked-in windows like NVDA 2022 and META 2020.
With the original regime set we were over the capacity of the hardware. We needed 80 to 100 qubits to represent one regime. So we compressed the set to a leaner version, but we did not want to lose entropy. That was the challenge of the past few weeks.
A kernel that compares histories
Each regime fingerprint is a probability distribution over the joint GARCH parameter space, and it is amplitude-encoded: the quantum state carries the square roots of those probabilities. That choice makes the physics do the statistics. The overlap between two encoded states works out to the Bhattacharyya coefficient between the two distributions, a similarity that compares where probability mass actually sits rather than the distance between point estimates. The playground cell ships with fitted twelve-qubit circuits baked in, so the whole pipeline runs self-contained.
# The playground cell: baked-in regime fingerprints, rebuilt as circuits,
# scored by a quantum-kernel inversion test on the selected backend.
def _build(params, n=N_QUBITS, L=N_LAYERS):
"""Rebuild a fitted fingerprint state (12 qubits, 8 layers)."""
qc = QuantumCircuit(n)
pidx = 0
for q in range(n):
qc.ry(float(params[pidx]), q); pidx += 1
for _ in range(L):
for q in range(n - 1):
qc.cx(q, q + 1)?Entangling the register. The CX ladder ties the qubit groups together, so the state can hold the regime's joint parameter structure (how shock reactivity couples to persistence) instead of three separate histograms. for q in range(n):
qc.ry(float(params[pidx]), q); pidx += 1
return qc
def _inversion(qc_live, qc_ref):
n = qc_live.num_qubits
qc = QuantumCircuit(n, n)
qc.compose(qc_live, inplace=True)
qc.compose(qc_ref.inverse(), inplace=True)?The inversion test. Prepare the live state, then run the reference circuit backwards. If the two states match, interference brings every amplitude back to the all-zeros outcome. qc.measure(range(n), range(n))
return qc
# Rank all five regimes offline first (exact overlaps from the baked
# params), then spend the run's single hardware job verifying the top match.
live = _build(DEMO_PARAMS[ci][REF_FAM[target]])
ref = _build(REF_PARAMS[target])
circuit = transpile(_inversion(live, ref), backend=backend, optimization_level=0)
counts = backend.run(circuit, shots=shots).result().get_counts()
K_meas = _zero_frac(counts)?The kernel is a probability. The fraction of all-zeros shots estimates K, the squared overlap between the live and reference states. For these amplitude-encoded fingerprints, that equals the squared Bhattacharyya overlap between the two distributions.print(f"Measured K = {K_meas:.4f} vs offline fitted K = {K_fit[target]:.4f}")
The playground permits one submitted job per run, so the cell works the way a careful experimentalist would: it prints the full five-regime ranking from exact offline overlaps first, then spends its single hardware job verifying one row of that ranking on the QPU, with shot-noise error bars on the measured kernel.
One entry point, three ways to score the same kernel.
| Field | Detail |
|---|---|
| Statevector | Exact analytic overlap, no shots, for baselines and offline ranking. |
| Sampler | Any Qiskit V2 sampler, from local simulation up to a real QPU. |
| IonQ | Transpiled to the native gate set; simulator, Aria, or Forte hardware. |
| Circuits | Inversion test on n qubits by default; a swap test when state preparation must stay a black box. |
Honest about the quantum
Before claiming anything for the quantum side, the team built the classical case against themselves. A plain correlation study of the live windows against the regime library, run in NumPy, topped out around 0.4 on its best sample and sat far lower on the rest: too weak to use in finance. That baseline ships with the project, in one picture.
With any quantum algorithm, especially in finance, the first question you get is: everything is fine with classical, why even bother with quantum? We wanted to show, in one picture, that classical is not delivering a tangible advantage here.
The quantum claim is deliberately modest. The project does not promise an exponential speedup, and it concedes that a classical computer can evaluate the same similarity on a moderate histogram. The argument is about fit: amplitude-encoded states give the right inner product for comparing distributions by construction, entanglement carries the joint parameter structure without hand-engineered interaction features, and the same primitive runs unchanged from a statevector simulation to a QPU as the library grows. The open risk is equally plainly stated.
My concern is the noise level on real hardware. We are talking about entropy here. If the noise is large, it easily overlays the entropy of the signal, and we lose the signal.
Make it yours
The playground cell is self-contained: the regime library and five live fingerprints, including META 2020, AMZN 2020, NVDA 2022, AAPL 2021, and META 2022, are baked in, so it runs with no accounts and no data setup. Pick a ticker and a year, run the offline ranking, then point the same cell at an IonQ backend to verify a kernel on hardware.
Pick a market. Ask which history it rhymes with.
Fork Quantum Regime Radar, score a live window against five regimes taken from real market history, and verify the top match on a QPU. Everything here is open and yours to build on.
More from the Qollab community
Browse all projectsStay in the loop.
Get the latest tutorials, demos, and project showcases straight to your inbox. No noise, just the good stuff.