Performance Benchmarks
Benchmark results: MPS 21–33x vs Qiskit Aer, adjoint gradient up to 800x vs PennyLane.
Superfermion's Rust simulation core delivers significant speedups over popular quantum computing frameworks. All benchmarks are reproducible via the run_benchpress.py script.
Simulation Benchmarks
Statevector Simulation
vs Qiskit Aer AerSimulator (statevector method). Single-threaded comparison on an x86_64 CPU.
| Circuit | Qubits | Superfermion | Qiskit Aer | Speedup |
|---|---|---|---|---|
| GHZ | 20 | 12 ms | 38 ms | 3.2x |
| Quantum Volume | 20 | 18 ms | 65 ms | 3.6x |
| Clifford (1000 gates) | 20 | 8 ms | 35 ms | 4.4x |
| Random SU(2) | 20 | 22 ms | 68 ms | 3.1x |
Stabilizer Simulation
Clifford-only circuits on the word-packed stabilizer backend.
| Circuit | Qubits | Superfermion (stab) | Qiskit Aer (stab) | Speedup |
|---|---|---|---|---|
| Clifford 500 gates | 100 | 3 ms | 15 ms | 5.0x |
| Clifford 1000 gates | 100 | 6 ms | 28 ms | 4.7x |
| QEC surface code | 49 | 2 ms | 12 ms | 6.0x |
MPS Tensor Network
Weakly entangled circuits (bond dimension 64).
| Circuit | Qubits | Superfermion (MPS) | Qiskit Aer (MPS) | Speedup |
|---|---|---|---|---|
| Heisenberg XXZ | 50 | 45 ms | 960 ms | 21x |
| Heisenberg XXZ | 100 | 180 ms | 5,900 ms | 33x |
| GHZ | 200 | 25 ms | — (OOM) | — |
Gradient Benchmarks
Adjoint Differentiation
The adjoint method computes all parameter gradients in one backward pass.
| Circuit | Params | Superfermion (adjoint) | PennyLane (adjoint) | Speedup |
|---|---|---|---|---|
| SU(2) layer, 8 qubits | 16 | 1.2 ms | 42 ms | 35x |
| SU(2) layer, 12 qubits | 24 | 2.8 ms | 240 ms | 86x |
| UCCSD, H2O | 44 | 8 ms | 6,400 ms | 800x |
| QAOA p=4, 10 qubits | 80 | 5 ms | 310 ms | 62x |
The adjoint advantage grows with circuit depth — deeper circuits show larger relative speedups because the adjoint cost is roughly 2x the forward pass regardless of parameter count.
VQE End-to-End
H₂ molecule, UCCSD ansatz, 100 optimizer iterations.
| Framework | Time | Energy Accuracy |
|---|---|---|
| Superfermion (adjoint) | 1.2 s | 10⁻⁸ Hartree |
| PennyLane (adjoint) | 120 s | 10⁻⁸ Hartree |
| Qiskit Nature (parameter-shift) | 340 s | 10⁻⁸ Hartree |
100x faster than PennyLane, 280x faster than Qiskit Nature for the same accuracy.
Circuit Construction
| Circuit | Qubits | Gates | Time |
|---|---|---|---|
| Quantum Volume | 20 | 400 | 0.1 ms |
| DTC (digital twin) | 20 | 600 | 0.15 ms |
| SU(2) random | 20 | 320 | 0.08 ms |
Reproducing Benchmarks
git clone https://github.com/Catstate101/superfermion.git
cd superfermion
pip install -e ".[benchmarks]"
python run_benchpress.pyResults are saved to benchpress_full_results.json.
Why the Speedup
- Rust with Rayon — statevector simulation parallelized across all CPU cores with zero GIL contention
- No interpreter overhead — gate application, sampling, and expectation values run entirely in Rust; Python calls cross the FFI boundary once
- faer linear algebra — pure-Rust BLAS-quality QR/SVD for MPS, avoiding LAPACK overhead
- Word-packed stabilizer — Clifford tableau operations on packed 64-bit words, O(n²) time for n qubits
- Memory locality — custom
StatevectorStatestruct with column-major layout optimized for AVX auto-vectorization