open-standards/wai/quantum-conformance/expected_hashes.json
Transaction Science c7ee572241 wai-quantum: Add wai.quantum.circuit — deterministic quantum-simulation transport
Quantum enters WAI the way worlds/films/scores do (instructions-at-the-sink),
never as hardware: the wire carries a compact gate op-log (WQC container), the
sink CLASSICALLY simulates it in a fixed-point complex floor (Amp = i64 re/im at
2^30), and the reconstructed 2^n statevector is byte-identical on every machine
(statevector-equivalence). Measurement is sampled by a pinned splitmix64, so a
shot histogram at a pinned (seed, shots) converges too (shot-histogram-
equivalence). Clifford+T + dyadic phase gives the QFT ("quantum FFT") transported
as a circuit and reconstructed byte-exact. Pure i64, no float/ONNX, wasm-clean.

Real quantum hardware is deliberately absent: NISQ noise + stochastic measurement
break the cross-machine determinism the whole standard rests on. No speedup is
claimed — this makes a quantum COMPUTATION transportable and receiptable.

Also lands StateVector::fidelity_fx (fixed-point state fidelity) — the quantum-
information-theory conformance metric, and the native similarity metric for this
class.

- wai-rs/src/quantum.rs        core: Amp/gates/QFT/WQC/sample/fidelity
- wai-rs/src/bin/wai_quantum_vectors.rs  gen/verify conformance corpus
- extensions/quantum-sim.md     sub-spec (statevector/shot-histogram-equivalence)
- quantum-conformance/          committed vectors (bell, ghz3, qft3, qft5)
- SPEC.md registry row; codecs registry class; lib.rs + Cargo `quantum` feature
- include/wai.h regenerated (union of encryption + quantum FFI surface)

Tests: 10 quantum + 4 registry-coherence green; corpus verifies.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-30 23:10:18 -04:00

31 lines
1.1 KiB
JSON

{
"bell.wqc": {
"n_qubits": 2,
"n_ops": 2,
"circuit_hash": "894d9a9582b19f27b8d08d06938357237fc00f7f30bf4bfc2be0c04fa5e47a4e",
"statevector_hash": "bd5df69662f4e61878d17baee1f3cf5705c3726d6740d1a4bf7be5133c099efb",
"measure": {
"seed": 12648430,
"shots": 100000,
"histogram_hash": "0893f48ef32ca9f2865f6617537f0a4a5334f67e3c944bba845beb2f377acdb3"
}
},
"ghz3.wqc": {
"n_qubits": 3,
"n_ops": 3,
"circuit_hash": "34e44f7d68037cbb3aee677f56b894dc48df6d408aa068a16d3b18076e5e7c5c",
"statevector_hash": "08c5e6fb50b91a00d28795506cc5d99ce1e9a3a8b4c41e4bfd05f5d829af9542"
},
"qft3.wqc": {
"n_qubits": 3,
"n_ops": 9,
"circuit_hash": "7e8414be4410557a05b52bcc1084e1c5f93b6caa0f28fa45f4d2ab661efd2a60",
"statevector_hash": "0fe1e5b8e2ac8e9afbfa926b3877967ebfead92efb7ed8e1ff6b117668926d6e"
},
"qft5.wqc": {
"n_qubits": 5,
"n_ops": 21,
"circuit_hash": "f36a9af99a251cae6f42144b2be3c57523f15e1e2ab3492cf15cac709fc048be",
"statevector_hash": "c268d77f2ddf84fecb028e80ce989123912870f04e5b9a1e3d885c9ce235c27d"
}
}