wai-quantum 0.3.41: the fabric — members, parity against the CPU reference, certificates, placement by joules, and the gate kernel in 32-bit lanes #195
Loading…
Reference in a new issue
No description provided.
Delete branch "wai-quantum-fabric"
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-quantum 0.3.41: the fabric,
wai.quantum.fabric.The algorithm is the product; the fabric is where it runs. A quantum processor is one accelerator among others: CPU, GPU, neural, tensor or dataflow processor, FPGA, or analog Ising machine. This PR is the contract every member is held to, plus the first port held to it.
Member,FabricClass,Presence): what silicon, and how sure we are it is there. Only detected members are placed.BitExact,Within { max_ulp, max_abs },Statistical { fidelity, shots }, orUncertified.Parity::meetsorders requirements, and a bound never stands in for a fidelity.certifycompares the reference's and the member's outputs case by case; the parity is the worst case.certify_samplingfolds the classical fidelity of a sampling device's counts.Certificatenames its kernel, implementation, member and corpus generator (with the seed), so whoever holds it can draw the corpus again and check the digest.place): the detected member whose certificate is its own, earned on a corpus unless it is a CPU's reference, and whose parity meets the requirement. Among those, the fewest nanojoules per operation; ties are deterministic.FabricReceipt): a signed statement that a result was computed by a kernel on a member.wai:quantum-fabric-id, is in §6.1, the Rust profiles, the Python verifier and anEnergyFiguresview.lanes): the fixed-point core's gate application, written with only wrapping 32-bit add, subtract and multiply, shifts and compares, which is what a WebGPU or Metal shader or an FPGA's DSP slices have.certify_lanescertifies it against the native simulator: bit-exact.wai-quantum fabric [--circuits N] [--seed S] [--json]lists the detected member, certifies the lane port, and places.wai.quantum.fabricjoins the unregistered receipt labels (REGISTRY.md, capabilities.json, the equality test).Numerics decide how much parity a fabric can earn. Most accelerators carry no 64-bit float, and some no 64-bit integer. The core's gate kernel needs neither, so an integer-only fabric can reproduce it bit for bit. The floating-point modules can earn bit-exactness only where 64-bit floats and the same order of operations exist; elsewhere their parity is a measured bound.
Reviewed
Two adversarial review rounds, five lenses each (lane arithmetic, parity and placement, receipt encoding, documentation claims, integration), with three skeptics per finding.
Round one: 37 findings upheld, 7 refuted. Fixed:
statisticalnormalises and checks for overflow;comparerefuses a 64-bit scale;lanes::simulatevalidates;Round two: 11 upheld, 14 refuted. Fixed:
certify_sampling;Found and left for its own PR: the core's pinned dyadic phase table loses precision through cancellation in
(1 − cos θ)/2at 30 bits. P(12) to P(16) are off by more than a hundred units, P(17) and P(18) by 10–27 % in angle, and P(19) to P(32) carry no phase at all. The table is pinned byextensions/quantum-sim.md§3, so the fix is a corrected table under a new gateset version (cosines unchanged, sines fromsin θ / (2 cos θ/2)), with new conformance vectors.Gates
cargo test --locked --release --features full --lib --testsin wai-quantum: 468 library tests, the 22 bit-identity pins and the other test files, all passed.--features quantum_fabric: 11 passed in debug (0.8 s) and in release.cargo test --locked --features full --lib --tests --no-run(debug) compiles. Clippy is clean in the module.x86_64-apple-darwin; CI's Linux x86-64 leg runs it.cargo check --lockedpasses for thewai-quantumbin, wai-quantum-serve and wai-web.claim_verify.pypasses all 567 vectors.wai-quantum fabricCLI, native aarch64 and wasm32-wasip2 under wasmtime: the same parity, generator, cases and corpus digest for the same seed.--lockedresolves in all five lockfiles that pin wai-quantum.scripts/check-comparative-prose.shandscripts/check-no-vanity-metrics.share clean.🤖 Generated with Claude Code