wai-quantum 0.3.25: error correction at circuit level, sampled, modelled and decoded exactly #143
Loading…
Reference in a new issue
No description provided.
Delete branch "wai-quantum-qec"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
wai-quantum0.3.25 handles error correction at the circuit level. An experiment is what it physically is: a noisy Clifford circuit with detectors and observables. The crate can now sample it, derive its detector error model, decode it exactly, and measure the code model that resource estimates otherwise take on trust.quantum_frameparsereads the ecosystem's circuit text:REPEAT.Anything else is an error, not a skipped line.
sampleis bit-packed Pauli-frame simulation, 64 shots per word, with geometric skipping between noise hits. It is reproducible from(circuit, shots, seed).error_modeluses backward sensitivity propagation.surface_code_memorygenerates the rotated surface-code memory experiment.quantum_matchmemory_experimentandfit_code_modelmeasureP(d) = a·(p/p*)^((d+1)/2). Under uniform circuit noise the result is a ≈ 0.023, p* ≈ 0.0100.CodeFit::surface_codeturns that fit into a resource-estimate model.CLI
wai-quantum qec [-d --rounds --p --shots --seed --json] | --file | --circuit | --dem | --fitwai-quantum estimate … --prefactor A --threshold Pestimates on a measured code.Evidence
Against an independent implementation:
tests/frame_reference.rskeeps one circuit and one model from that implementation as in-repo fixtures. The X-basis fixture covers parser paths that our generator never emits.Inside the crate:
Mutations. Each of these fails a named test:
Determinism.
bit_identitypins sampling, decoding and the fit; all 10 pins pass natively and underwasm32-wasip2.reprogains an in-crateexp, within an ulp of the platform on 400k inputs.qecoutput is byte-identical natively and as a WASI component, including an ingested circuit.Suite.
cargo test --locked --features full --lib --tests: 354 + 10 + 2 + 3 passed. Every feature builds alone with zero warnings, and clippy is clean on the new code.Honest boundary
The decoder is exact first and fast second. At d = 9 a fired detector's boundary cap still spans much of the lattice, so a shot costs about half a millisecond. A region-growing matcher is the next step. Sampling is not the bottleneck: over a million d = 9 shots per second.
🤖 Generated with Claude Code