wai-quantum 0.3.25: error correction at circuit level, sampled, modelled and decoded exactly #143

Merged
dcharlot merged 1 commit from wai-quantum-qec into main 2026-10-04 20:39:11 -04:00

2026-10-04

Transaction Science
wai-quantum 0.3.25: error correction at circuit level, sampled, modelled and decoded exactly
All checks were successful
no-vanity-metrics / WAI public text names no comparison (pull_request) Successful in 3s
no-vanity-metrics / WAI public text names no company or product (pull_request) Successful in 3s
standards workspaces build + test / eoc-rs (pull_request) Successful in 1m54s
standards workspaces build + test / jcp-rs (pull_request) Successful in 1m26s
standards workspaces build + test / openpay (pull_request) Successful in 4m53s
standards workspaces build + test / proof-rs (pull_request) Successful in 1m12s
standards workspaces build + test / sandbox-rs (pull_request) Successful in 2m11s
standards workspaces build + test / smart-byte-rs (pull_request) Successful in 3m38s
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Successful in 7m57s
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Successful in 54s
WAI conformance / cargo-class corpora · linux (pull_request) Successful in 3m59s
WAI conformance / v2 vocabulary · manifests validate as stated (pull_request) Successful in 12s
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Successful in 2m15s
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Successful in 2m10s
WAI conformance / cross-arch byte-equality · linux (pull_request) Successful in 26s
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Successful in 48s
WAI energy receipts / energy receipts · linux (pull_request) Successful in 1m13s
WAI JPEG-AI whole decode (pinned inputs, required) / fetch pinned JPEG-AI inputs → whole decode + pixel hash, required (pull_request) Successful in 1m2s
WAI neural sink gates / model-free refusals of the neural sink (pull_request) Successful in 1m3s
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Successful in 3m55s
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Successful in 1m44s
standards workspaces build + test / arl-rs (pull_request) Successful in 22m23s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 20m55s
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 19m6s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 10m16s
standards workspaces build + test / sense-rs (pull_request) Successful in 7m52s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 9m59s
WAI conformance / cargo-class corpora · macos (pull_request) Successful in 6m11s
WAI conformance / cross-arch byte-equality · macos (pull_request) Successful in 31s
WAI energy receipts / energy receipts · macos (pull_request) Successful in 2m21s
quantum_frame takes an error-correction experiment as what it is: a noisy
Clifford circuit with detectors and observables.

- parse reads the ecosystem's circuit text (resets and measurements in Z and
  X, H/S/sqrt(X)/Paulis/CX/CZ/SWAP, flip and depolarizing noise, detectors,
  observables, REPEAT), and refuses anything else rather than skipping it.
- sample is bit-packed Pauli-frame simulation, 64 shots per word, with
  geometric skipping between noise hits; reproducible from
  (circuit, shots, seed).
- error_model derives the detector error model by backward sensitivity
  propagation. It converts depolarizing channels to equivalent independent
  mechanisms exactly, XOR-merges identical ones, and refuses non-deterministic
  detectors. A graphlike mechanism stays one matching edge; otherwise it splits
  into X and Z halves, then into per-qubit parts.
- surface_code_memory generates the rotated surface-code memory experiment.

quantum_match decodes by exact minimum-weight perfect matching: Dijkstra on
integer weights, with boundary paths computed once and dominated pairs cut,
then Edmonds' blossom. memory_experiment and fit_code_model measure
P(d) = a(p/p*)^((d+1)/2): a = 0.023, p* = 0.0100 under uniform circuit
noise, and CodeFit::surface_code feeds that into a resource estimate.

Checked against an independent implementation:
- generated circuits identical byte for byte (135 configurations, d 2-15,
  1-8 rounds);
- error models identical mechanism for mechanism, to 1e-12 in probability
  (41 circuits: rotated and unrotated surface codes in both bases,
  repetition codes);
- decoded logical error rates within 1.4 standard errors on all 12 grid
  points.

tests/frame_reference.rs keeps a circuit and a model from that implementation
as fixtures. Blossom equals brute force on 3000 random graphs. A mirrored
random Clifford circuit over every gate type ties the sampler's forward rules
to the model's backward ones. Mutating the depolarizing conversion, any gate
rule on either side, the determinism check or the decomposition fails a named
test. bit_identity pins sampling, decoding and the fit natively and under
wasm32-wasip2; repro gains an in-crate exp, within an ulp.

CLI: wai-quantum qec [-d --rounds --p --shots --seed --json] | --file |
--circuit | --dem | --fit, and estimate --prefactor/--threshold for a
measured code. Byte-identical natively and under wasm32-wasip2.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-04 14:21:56 -04:00