Actual benchmark data from 46 VQE + hardening tests · 6.8 MB binary · zero dependencies
How CJC Simulates 50 Qubits in 6 KB
The pipeline that makes this possible — each box is a tested, verified component
Ry(θ) Layer
→
CNOT Chain
→
MPS Tensor Train
→
Sign-Stabilized SVD
→
Transfer Matrix ⟨ZZ⟩
→
Parameter Shift ∇E
→
Gradient Descent
Key insight: Instead of storing 250 complex amplitudes (16 petabytes),
MPS decomposes the state into 50 small tensors connected by bonds of dimension ≤ 8.
Each tensor is a 2×8×8 matrix. Total: 50 × 128 × 16 bytes ≈ 6,272 bytes.
This works because 1D quantum circuits produce states with limited entanglement — exactly the regime MPS excels at.
Test: VQE Energy Convergence
4-qubit Heisenberg model, 20 gradient descent iterations, seed=42
02.999
22.998
42.997
62.995
82.991
102.985
122.973
142.953
162.919
182.859
202.759
Ground state ≈ -3.0 · Started near +3.0 (product state) · Monotonically decreasing
Test: Memory — MPS vs Statevector
Why 50 qubits is impossible without MPS
| Qubits | MPS (χ=8) | Statevector (2N) | Ratio |
| 4 |
384 B |
256 B |
1.5× |
| 8 |
896 B |
4 KB |
4.6× smaller |
| 16 |
1.9 KB |
1 MB |
560× smaller |
| 25 |
3.1 KB |
512 MB |
170,000× smaller |
| 50 |
6.3 KB |
16 PB (impossible) |
2.7 trillion× |
| 100 |
12.4 KB |
20 nonillion bytes |
∞ |
MPS grows linearly O(N×χ²). Statevector grows exponentially O(2N).
Test: Bit-Identical Determinism
Same seed → identical IEEE 754 bits across every run, every iteration
seed = 123, 10 VQE iterations, two independent runs:
0 2.998043315202727 ≡ 2.998043315202727 ✓ bits match
1 2.997632612449279 ≡ 2.997632612449279 ✓ bits match
2 2.997135755367194 ≡ 2.997135755367194 ✓ bits match
3 2.996534694779020 ≡ 2.996534694779020 ✓ bits match
...
10 2.986866818009084 ≡ 2.986866818009084 ✓ bits match
11/11 iterations: bit-identical (f64.to_bits() == f64.to_bits())
Not just "close" — not ±1 ULP — exactly the same 64-bit pattern.
Enforced by: SplitMix64 PRNG, Kahan summation, no FMA, sign-stabilized SVD.
Test: 50-Qubit VQE Optimization
3 gradient descent iterations on a 50-qubit Heisenberg chain, seed=42
048.980 (initial)
148.978
248.976
348.973 ↓
| Parameters | 50 (one Ry angle per qubit) |
| Bond dimension | χ = 8 |
| Gradient evals | 100 per iteration (2 × 50 params) |
| Total time | 965 ms (release build) |
| Memory used | 6,272 bytes for the MPS |
| Ground state | ≈ -49 (thermodynamic limit: -1 per bond) |
Energy decreasing from +49 toward -49. With more iterations + higher bond dim, approaches ground state.
Test: Continuous Verification Gate
Cross-validates MPS, statevector, adjoint gradients, and parameter-shift — every seed must agree
For each seed, verify:
MPS amplitudes
≡
Statevector amplitudes
&&
Adjoint ∇
≡
Param-shift ∇
seed 0 ✓
seed 1 ✓
seed 2 ✓
seed 3 ✓
seed 4 ✓
seed 5 ✓
seed 6 ✓
seed 7 ✓
seed 8 ✓
seed 9 ✓
Tolerance: amplitudes < 10-10, gradients < 10-6. This is the
integration test that catches bugs across all subsystems simultaneously.
The Competitive Landscape: Size vs Capability
CJC does 50-qubit MPS simulation in a binary smaller than a single photo
All competitors require Python + NumPy + SciPy at minimum. cuQuantum requires CUDA toolkit.
CJC is a single static binary with zero external dependencies.
Realistic Applications
Where a 6.8 MB deterministic quantum simulator actually makes sense
Edge / Embedded Quantum Prototyping
Run VQE on Raspberry Pi, Jetson Nano, or inside a 32MB Docker container.
No Python stack needed. Pre-compute optimized parameters on-device for quantum-inspired control.
Reproducible Research
Bit-identical results across runs and machines. Share a seed, get the exact same
optimization trajectory. No "works on my machine" for quantum algorithm papers.
CI/CD Quantum Validation
Add quantum algorithm tests to your pipeline without inflating container images by 500MB+.
Sub-second test execution for verification gates.
Air-Gapped / Classified Environments
Single binary, no network calls, no package manager, no supply chain.
Auditable: 10 Rust source files, zero external dependencies.
Education
Students get a working VQE with MPS, adjoint differentiation, and parameter-shift gradients
in one download. No conda environments, no dependency conflicts.
Quantum-Inspired Optimization
The Heisenberg model maps to combinatorial optimization (MaxCut, Ising).
50-qubit MPS gives a 250-dimensional search space with O(N) memory.
What Each Test Category Validates
46 integration + 103 unit tests form a layered verification pyramid
| Layer | Tests | What It Proves | Why It Matters |
| VQE Convergence |
4 |
Energy decreases under gradient descent |
The optimizer actually finds lower-energy states |
| Determinism |
5 |
Same seed = bit-identical IEEE 754 output |
Results are reproducible across runs and machines |
| 50-Qubit Scale |
6 |
Memory < 500MB, bonds ≤ 8, energy finite, gradients finite |
MPS actually works at scale, doesn't silently diverge |
| Cross-Validation |
2 |
MPS amplitudes match statevector to 10-10 |
MPS implementation is mathematically correct |
| Gradient Sync |
1 (×10 seeds) |
Adjoint gradients match parameter-shift to 10-6 |
Two independent gradient methods agree — catches formula bugs |
| SVD / MPS Core |
20 |
Sign-stabilized SVD reconstruction, bond truncation, Bell/GHZ states |
The linear algebra foundation is correct |
| SIMD Parity |
9 |
AVX2 kernels match scalar fallback bit-for-bit |
Hardware acceleration doesn't break determinism |
| Wirtinger AD |
6 |
Complex derivatives match numerical finite-difference |
Automatic differentiation works for quantum loss functions |
CJC v0.2 Beta · All data from actual test runs on Windows 11 x86-64 · Release build · March 2026