wai-quantum
A deterministic quantum stack in pure Rust. Byte-exact circuit simulation, the operational layer around it, and signed energy-accounted receipts binding every stage.
No QPU, no cloud service, no vendor SDK, and no system libraries — so the same source runs natively, in the browser via wasm, and as a WASI component at the edge, producing byte-identical results and receipts on all three.
[]
= "0.3"
use Circuit;
use quantum_toolchain as qt;
let mut c = new;
c.h.cx.cx; // GHZ
let sv = c.simulate.unwrap;
println!; // |000> 0.5, |111> 0.5
// a portable identity for the reconstruction — same on every machine
let h: = sv.statevector_hash;
What's in it
| Feature | What it gives you |
|---|---|
quantum |
byte-exact statevector simulation (dyadic Clifford+T+P(k)) |
quantum_toolchain |
algorithm library, backend recommendation, OpenQASM 3.0 in-and-out, Bloch / entanglement / purity analysis |
quantum_stabilizer |
stabilizer (CHP) tableau — O(n²), scales far past statevector |
quantum_mps |
tensor-network (matrix-product-state) backend |
quantum_pauli |
sparse-Pauli / Heisenberg observable propagation |
quantum_receipt |
signed, energy-accounted receipt over a reconstruction |
quantum_ops |
the operations/attestation layer |
quantum_cal, quantum_control, quantum_noise |
calibration, filter-function robust control, DD noise spectroscopy, Cycle-Benchmarking noise learning |
quantum_mitigate |
zero-noise extrapolation, readout M3, classical shadows |
quantum_qec |
Relay-BP qLDPC decoder (toric, bivariate-bicycle) |
quantum_compile |
Clifford routing + stabilizer-tableau equivalence proof |
quantum_atom |
neutral-atom register preparation (Hungarian / LSAP) |
quantum_qir |
QIR export — emit the circuit as QIR (the QIR Alliance's LLVM-based IR), validated with llvm-as |
quantum_qbom |
Quantum Bill of Materials — stage receipts into one manifest |
quantum_vml, quantum_phasor, quantum_qfhrr, quantum_kernel, quantum_qdata, quantum_phasor_meter |
the interference / phasor ML layer |
full |
everything |
Default features are quantum, quantum_toolchain, quantum_receipt.
Determinism
Simulation is byte-exact: amplitudes are dyadic fixed-point, so a circuit
reconstructs to the same statevector_hash on every machine and every target.
The approximate methods (MPS truncation, the phasor/ML layer) are
reproducible f64 — IEEE-754-strict, identical given the same inputs and seed —
and are documented as such rather than claimed byte-exact.
A receipt separates the two halves of a cost honestly: work is
portable-exact (n_ops · 2^n amplitude updates, recomputed by the verifier, so a
sink cannot inflate it) and energy is measured-attested (only the signer can
vouch for its own silicon). Signatures travel between substrates because the
computation is reproducible — not because two runtimes agreed to trust each other.
Also available
- A CLI (
wai-quantumin thewaicrate) — run circuits, emit OpenQASM, seal and verify receipts, native or underwasmtime. - A WASI-HTTP component serving the stack as an ordinary HTTP handler.
- Browser demos and a course: https://wai.transaction.science/quantum-ide
License
Apache-2.0