wai-quantum 0.3.22: sparse Pauli dynamics at utility scale, and identical bits on every platform #137

Merged
dcharlot merged 2 commits from wai-quantum-sota into main 2026-10-01 20:30:28 -04:00
Owner

wai-quantum 0.3.22. Two changes, both measured before they were fixed.

Sparse Pauli dynamics at utility scale (quantum_spd)

Every backend took the dyadic circuit type: Clifford, T and 2π/2^k phases only. Sparse-Pauli propagation stopped at 64 qubits. The stack could not run continuous-angle circuits at 100+ qubits. quantum_spd can:

  • arbitrary Pauli rotations on up to 1024 qubits;
  • exact Clifford and quarter-turn rotations;
  • a rigorous truncation bound;
  • the 127-qubit heavy-hex kicked-Ising circuits;
  • an adapter that runs every dyadic circuit too.
Check Result
Every Clifford × every two-qubit Pauli, against matrices agree to 1e-12
300 random continuous-angle circuits, against an independent dense simulator < 1e-10
Truncation bound holds in every case; the test requires more than 50 where the bound is not vacuous
Dyadic adapter, against the byte-exact core 150 random circuits (up to 3 controls) agree to 1e-6, the core's fixed-point resolution
127-qubit 5-step magnetization at θ_h = π/32, exact propagation 0.995131 against the published exact 0.995131 (error 3.5e-7)
127-qubit 5-step magnetization, threshold 1e-7, k = 1–6 within 2.6e-5, 0.02–155 s
20-step ⟨Z62⟩ at 2π/32 0.97929, inside the published converged values (0.9776–0.9796)

tests/utility_reference.rs keeps the published references (arXiv:2308.05077) in the suite.

Honest limit: at intermediate angles, 20 steps does not converge at thresholds that run in minutes here. Published converged runs needed about 10⁹ Pauli operators.

quantum_spd_receipt seals a run under a meter. Its JSON stores floats as exact bits. verify_computation re-runs the job and demands identical bits. The CLI gains wai-quantum utility, and verify reads both receipt kinds. The utility receipt is byte-identical natively and under wasm32-wasip2 (same SHA-256), and so is the 20-step, 127-qubit result.

Identical bits on every platform, made true

  • quantum_pauli was not reproducible from run to run. It summed in HashMap order, which is seeded afresh per map: six runs gave six bit patterns. A test failing on the old code came first. The fix visits terms in key order.
  • Four f64 layers gave different bits natively and under wasm32-wasip2. These were vml, phasor, qfhrr and kernel, through the platform's cos, sin, ln and atan2. That contradicted the crate's headline claim.
    • src/repro.rs computes them in-crate: fdlibm's algorithms, + − × ÷ only, within an ulp, checked against an 80-digit series.
    • MPS used them as well, against its own contract.
    • After the fix, all seven f64 layers digest identically on both targets. tests/bit_identity.rs pins them.

Verification

  • Every feature builds and tests on its own, now with zero warnings. Main's unused-merkle and unused-rref warnings on single features are fixed by gating.
  • --features full: 310 unit, 7 bit-identity and 2 published-reference tests pass natively, and the same under wasm32-wasip2.
  • The quantum conformance corpus passes.

🤖 Generated with Claude Code

wai-quantum 0.3.22. Two changes, both measured before they were fixed. ## Sparse Pauli dynamics at utility scale (`quantum_spd`) Every backend took the dyadic circuit type: Clifford, T and 2π/2^k phases only. Sparse-Pauli propagation stopped at 64 qubits. The stack could not run continuous-angle circuits at 100+ qubits. `quantum_spd` can: - arbitrary Pauli rotations on up to 1024 qubits; - exact Clifford and quarter-turn rotations; - a rigorous truncation bound; - the 127-qubit heavy-hex kicked-Ising circuits; - an adapter that runs every dyadic circuit too. | Check | Result | |---|---| | Every Clifford × every two-qubit Pauli, against matrices | agree to 1e-12 | | 300 random continuous-angle circuits, against an independent dense simulator | < 1e-10 | | Truncation bound | holds in every case; the test requires more than 50 where the bound is not vacuous | | Dyadic adapter, against the byte-exact core | 150 random circuits (up to 3 controls) agree to 1e-6, the core's fixed-point resolution | | **127-qubit 5-step magnetization at θ_h = π/32, exact propagation** | **0.995131 against the published exact 0.995131 (error 3.5e-7)** | | 127-qubit 5-step magnetization, threshold 1e-7, k = 1–6 | within 2.6e-5, 0.02–155 s | | 20-step ⟨Z62⟩ at 2π/32 | 0.97929, inside the published converged values (0.9776–0.9796) | `tests/utility_reference.rs` keeps the published references (arXiv:2308.05077) in the suite. Honest limit: at intermediate angles, 20 steps does not converge at thresholds that run in minutes here. Published converged runs needed about 10⁹ Pauli operators. `quantum_spd_receipt` seals a run under a meter. Its JSON stores floats as exact bits. `verify_computation` re-runs the job and demands identical bits. The CLI gains `wai-quantum utility`, and `verify` reads both receipt kinds. The utility receipt is byte-identical natively and under wasm32-wasip2 (same SHA-256), and so is the 20-step, 127-qubit result. ## Identical bits on every platform, made true - **`quantum_pauli` was not reproducible from run to run.** It summed in `HashMap` order, which is seeded afresh per map: six runs gave six bit patterns. A test failing on the old code came first. The fix visits terms in key order. - **Four f64 layers gave different bits natively and under wasm32-wasip2.** These were vml, phasor, qfhrr and kernel, through the platform's `cos`, `sin`, `ln` and `atan2`. That contradicted the crate's headline claim. - `src/repro.rs` computes them in-crate: fdlibm's algorithms, `+ − × ÷` only, within an ulp, checked against an 80-digit series. - MPS used them as well, against its own contract. - After the fix, all seven f64 layers digest identically on both targets. `tests/bit_identity.rs` pins them. ## Verification - Every feature builds and tests on its own, now with **zero** warnings. Main's unused-merkle and unused-`rref` warnings on single features are fixed by gating. - `--features full`: 310 unit, 7 bit-identity and 2 published-reference tests pass natively, and the same under wasm32-wasip2. - The quantum conformance corpus passes. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
wai-quantum 0.3.22: sparse Pauli dynamics at utility scale, and identical bits on every platform
Some checks failed
standards workspaces build + test / jcp-rs (pull_request) Has been cancelled
standards workspaces build + test / joule-code-rs (pull_request) Has been cancelled
standards workspaces build + test / joule-ui-rs (pull_request) Has been cancelled
standards workspaces build + test / joulecontract-rs (pull_request) Has been cancelled
standards workspaces build + test / jouledesk-rs (pull_request) Has been cancelled
standards workspaces build + test / joulehook-rs (pull_request) Has been cancelled
standards workspaces build + test / map-rs (pull_request) Has been cancelled
standards workspaces build + test / mesh-rs (pull_request) Has been cancelled
standards workspaces build + test / openpay (pull_request) Has been cancelled
standards workspaces build + test / proof-rs (pull_request) Has been cancelled
standards workspaces build + test / sandbox-rs (pull_request) Has been cancelled
standards workspaces build + test / sense-rs (pull_request) Has been cancelled
standards workspaces build + test / smart-byte-rs (pull_request) Has been cancelled
standards workspaces build + test / macOS energy backend (jcp-energy) (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · linux (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · macos (pull_request) Has been cancelled
WAI conformance / v2 vocabulary · manifests validate as stated (pull_request) Has been cancelled
WAI conformance / independent verifiers · claims, JWP and key discovery (Python) (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · linux (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · macos (pull_request) Has been cancelled
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Has been cancelled
WAI energy receipts / energy receipts · linux (pull_request) Has been cancelled
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Has been cancelled
WAI energy receipts / energy receipts · macos (pull_request) Has been cancelled
WAI JPEG-AI whole decode (pinned inputs, required) / fetch pinned JPEG-AI inputs → whole decode + pixel hash, required (pull_request) Has been cancelled
WAI neural sink gates / model-free refusals of the neural sink (pull_request) Has been cancelled
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Has been cancelled
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Has been cancelled
617075d387
quantum_spd computes observables of circuits up to 1024 qubits with
arbitrary rotation angles, in the Heisenberg picture. Until now every
backend took the dyadic circuit type, which allows only Clifford, T and
2π/2^k phases, and sparse-Pauli propagation stopped at 64 qubits. The
experiments that classical methods are known for reproducing were out of
reach.
- Clifford gates and quarter-turn rotations are exact.
- Continuous rotations merge in place, over an insertion-ordered term table,
  so every coefficient is added in the same order on every platform.
- Every dropped coefficient goes into a truncation bound, a rigorous limit on
  how far truncation can have moved the result.
- On the 127-qubit heavy-hex kicked-Ising circuits, it reproduces the exactly
  computed 5-step magnetization (arXiv:2308.05077 exact.csv) on all 127
  qubits: 0.995131 against 0.995131 at θ_h = π/32, exact propagation.
- 20-step ⟨Z62⟩ at 2π/32 falls inside the published converged classical
  values.

quantum_spd_receipt seals a run under a meter. The result is computed inside
the seal, floats are hashed and serialized as exact bits, and
verify_computation re-runs the job anywhere and demands the same bits. The
energy is attested, and can carry an energy-class label.

Defects fixed:
- quantum_pauli was not reproducible from run to run. It summed
  coefficients in std HashMap order, which is seeded afresh for every map, so
  six runs gave six bit patterns. It now visits terms in key order.
- Four f64 layers (vml, phasor, qfhrr, kernel) gave different bits natively
  and as a WASI component, through the platform's cos, sin, ln and atan2.
  That falsified the crate's identical-native-browser-edge claim. src/repro.rs
  computes them in-crate (fdlibm's algorithms, + − × ÷ only, within an ulp).
  The MPS backend, whose contract excludes transcendentals, used them too.
  tests/bit_identity.rs pins a digest per layer, confirmed natively and
  under wasm32-wasip2.

wai-rs:
- passthrough features quantum_spd and quantum_spd_receipt;
- `wai-quantum utility [--theta --steps --threshold -q --json --receipt]`;
- `verify` reads both receipt kinds.

The utility receipt is byte-identical natively and under wasm32-wasip2.
Dependent lockfiles were moved.

Every feature now builds on its own with no warnings. The merkle module is
compiled only for the receipt features that use it, and the QEC encoder's
row reduction only with the simulator it serves.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
ci: run wai-quantum's integration tests on every architecture in the matrix
Some checks failed
standards workspaces build + test / smart-byte-rs (pull_request) Successful in 3m39s
WAI conformance / cargo-class corpora · linux (pull_request) Successful in 3m22s
WAI conformance / v2 vocabulary · manifests validate as stated (pull_request) Successful in 13s
WAI conformance / independent verifiers · claims, JWP and key discovery (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 1m5s
WAI JPEG-AI whole decode (pinned inputs, required) / fetch pinned JPEG-AI inputs → whole decode + pixel hash, required (pull_request) Successful in 59s
WAI neural sink gates / model-free refusals of the neural sink (pull_request) Successful in 45s
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Successful in 3m48s
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Successful in 1m32s
standards workspaces build + test / jouleclaw-rs (pull_request) Successful in 13m7s
standards workspaces build + test / aac-rs (pull_request) Successful in 4m12s
standards workspaces build + test / joule-code-rs (pull_request) Failing after 1m37s
standards workspaces build + test / joulecontract-rs (pull_request) Successful in 1m36s
standards workspaces build + test / map-rs (pull_request) Successful in 2m12s
standards workspaces build + test / mesh-rs (pull_request) Successful in 1m29s
standards workspaces build + test / openpay (pull_request) Successful in 11m31s
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Successful in 6m53s
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Successful in 1m10s
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Successful in 2m34s
standards workspaces build + test / arl-rs (pull_request) Successful in 3m44s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 3m8s
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 4m26s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 5m1s
standards workspaces build + test / sense-rs (pull_request) Successful in 3m57s
standards workspaces build + test / macOS energy backend (jcp-energy) (pull_request) Successful in 4m25s
WAI conformance / cargo-class corpora · macos (pull_request) Successful in 4m47s
WAI conformance / cross-arch byte-equality · macos (pull_request) Successful in 28s
WAI energy receipts / energy receipts · macos (pull_request) Successful in 1m33s
ba653dac59
The energy-receipts workflow ran wai-quantum with --lib only, so the
integration tests never ran in CI: tests/bit_identity.rs, which pins one
result of each f64 layer and exists to make every architecture produce the
same bits, and tests/utility_reference.rs, which holds the 127-qubit
results to published values. --tests adds them on linux, linux-arm64 and
macos.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Transaction-Science/open-standards!137
No description provided.