Quantum recurrent neural networks for chaotic time-series prediction — and a new quantum language-model direction (QLRNN). Q# circuits mirrored by numpy/torch statevector simulations, trained with parameter-shift or autograd.
Chaotic systems (Lorenz) punish models with short memories. QuantumNN explores whether small unitary recurrent memories (10s of parameters, not 10,000s) can match or beat classical baselines at long-horizon prediction.
| Model | θ | Simulation | Status |
|---|---|---|---|
| sQRNN (staggered QRNN) | 66 | numpy statevector + parameter-shift | benchmarked |
| Q-Transformer (SASQuaTCh-Lite) | 24 | torch statevector, autograd | implemented |
| QuantumSeq2Seq (hybrid) | 562 | sQRNN encoder + Q-Transformer decoder | implemented |
| CV-QRNN (Gaussian) | 45 | symplectic phase-space, autograd | implemented |
| QLRNN (language model) | 48+ | numpy / PennyLane backends | experimental |
pip install -e .
python -m pytest tests/ -q
# Lorenz benchmarks
PYTHONPATH=src/python python -m benchmarks.run_multiseed_benchmark --seeds 0,1 --epochs 8 --max-samples 8
PYTHONPATH=src/python python -m benchmarks.lstm_baseline
# QLRNN char-level language model
PYTHONPATH=src/python python -m benchmarks.run_qlrnn_lm
| Model | Params | Lorenz test MSE (autoregressive) |
|---|---|---|
| sQRNN | 66 θ | 0.215 ± 0.102 |
| LSTM (hidden=64, 2 layers) | ~50k | 0.123 ± 0.008 |
High seed variance at smoke scale (sQRNN per-seed: 0.318 / 0.113 — the best quantum seed edges out the best LSTM seed with 750× fewer parameters).
Full 5-seed production benchmark: python -m benchmarks.run_multiseed_benchmark --production.
Topic-based docs live under docs/: design philosophy, mathematical theory, per-architecture deep dives, the Lorenz task spec, NISQ hardware notes, and a pitfalls know-how repository. Roadmap: docs/overview/roadmap.md.
The demo above is rendered with Remotion from
video/ — regenerate with python scripts/export_video_data.py && cd video && npm install && npm run render.
