wai-quantum 0.3.24: fault-tolerant resource estimation, reproducible and signed #141

Merged
dcharlot merged 1 commit from wai-quantum-resource into main 2026-10-04 14:04:22 -04:00
Owner

What

wai-quantum 0.3.24 adds fault-tolerant resource estimation. It takes a program's logical counts and computes the code distance, the T-state factories, the physical qubits and the wall-clock time. The estimate is a deterministic function of its inputs, and it can be sealed as a signed receipt that anyone can re-run and check.

  • quantum_resource covers the full estimate:
    • Logical layout and step count, plus the cost of synthesizing rotations.
    • Planar codes: surface code on gate-based and measurement-based qubits, and the Floquet honeycomb code.
    • Factories found by exhaustive search. The search covers the 15-to-1 unit type, physical or logical rounds, non-decreasing distances and binomially sized copy counts. It keeps the factory with the smallest space-time volume, and picks the code the same way.
    • The qubits-versus-time frontier.
  • quantum_resource_receipt seals an estimate over its whole job, to the bit. verify_computation re-runs the job and demands every figure back, down to each factory round.
  • CLI:
    • wai-quantum estimate [factoring|chemistry|--qubits …] [--qubit …] [--frontier] [--json] [--receipt] prints or seals an estimate.
    • verify accepts the receipt.

Evidence

Reproduction. The model is held to the published planar-ISA tables (arXiv:2211.07629):

  • every distance and factory in the per-qubit factoring table, including the copy counts;
  • the distance, factory count, qubits and runtime of all 12 factoring and chemistry summary rows;
  • all 12 dynamics factory counts.

For example, factoring on the (ns, 1e-4) qubit gives d = 13, 18 factories, 8,716,258 qubits and 17 h 43 min.

Mutations. Each of these breaks those tests:

  • the logical Reed–Muller step count;
  • the per-round binomial quantile;
  • a physical unit duration;
  • the rule that chooses the code.

A pruning rule that no published row depended on was removed.

Where the source disagrees with itself. Four places where its prose and its numbers disagree:

  • a Toffoli count;
  • two unit durations;
  • a runtime printed in minutes that is really days.

Separately, one printed factory is not the minimum of the source's own model; the search here finds one with about a sixth of the volume. Each case is documented in the module and settled by the tables.

Determinism. Receipts and estimate output are byte-identical natively and under wasm32-wasip2. I checked 8 commands with SHA-256 over non-empty output. A native receipt verifies under wasmtime. Tampering with the headline or with one round's copy count makes verify print INVALID and exit 1.

Pins. tests/bit_identity.rs now pins every figure of 12 estimates. All 9 pins pass natively and under wasm32-wasip2.

Test suite. cargo test --locked --features full --lib --tests: 338 + 9 + 3 passed. Every feature still builds alone with zero warnings. repro's sin/cos moved to a gated submodule so that the estimator, which needs only ln, builds without dead code.

Next

This PR reproduces the 2022 planar model as the baseline. Next on top of it:

  • magic-state cultivation and yoked surface codes;
  • block (qLDPC) codes;
  • reaction-time-limited scheduling;
  • error-model constants fitted from this crate's own circuit-level QEC Monte Carlo, so an estimate can rest on measured rather than assumed code behaviour.

🤖 Generated with Claude Code

## What `wai-quantum` 0.3.24 adds **fault-tolerant resource estimation**. It takes a program's logical counts and computes the code distance, the T-state factories, the physical qubits and the wall-clock time. The estimate is a deterministic function of its inputs, and it can be sealed as a signed receipt that anyone can re-run and check. - **`quantum_resource`** covers the full estimate: - Logical layout and step count, plus the cost of synthesizing rotations. - Planar codes: surface code on gate-based and measurement-based qubits, and the Floquet honeycomb code. - Factories found by exhaustive search. The search covers the 15-to-1 unit type, physical or logical rounds, non-decreasing distances and binomially sized copy counts. It keeps the factory with the smallest space-time volume, and picks the code the same way. - The qubits-versus-time frontier. - **`quantum_resource_receipt`** seals an estimate over its whole job, to the bit. `verify_computation` re-runs the job and demands every figure back, down to each factory round. - **CLI:** - `wai-quantum estimate [factoring|chemistry|--qubits …] [--qubit …] [--frontier] [--json] [--receipt]` prints or seals an estimate. - `verify` accepts the receipt. ## Evidence **Reproduction.** The model is held to the published planar-ISA tables (arXiv:2211.07629): - every distance and factory in the per-qubit factoring table, including the copy counts; - the distance, factory count, qubits and runtime of all 12 factoring and chemistry summary rows; - all 12 dynamics factory counts. For example, factoring on the `(ns, 1e-4)` qubit gives d = 13, 18 factories, 8,716,258 qubits and 17 h 43 min. **Mutations.** Each of these breaks those tests: - the logical Reed–Muller step count; - the per-round binomial quantile; - a physical unit duration; - the rule that chooses the code. A pruning rule that no published row depended on was removed. **Where the source disagrees with itself.** Four places where its prose and its numbers disagree: - a Toffoli count; - two unit durations; - a runtime printed in minutes that is really days. Separately, one printed factory is not the minimum of the source's own model; the search here finds one with about a sixth of the volume. Each case is documented in the module and settled by the tables. **Determinism.** Receipts and estimate output are byte-identical natively and under `wasm32-wasip2`. I checked 8 commands with SHA-256 over non-empty output. A native receipt verifies under `wasmtime`. Tampering with the headline or with one round's copy count makes `verify` print INVALID and exit 1. **Pins.** `tests/bit_identity.rs` now pins every figure of 12 estimates. All 9 pins pass natively and under `wasm32-wasip2`. **Test suite.** `cargo test --locked --features full --lib --tests`: 338 + 9 + 3 passed. Every feature still builds alone with zero warnings. `repro`'s sin/cos moved to a gated submodule so that the estimator, which needs only `ln`, builds without dead code. ## Next This PR reproduces the 2022 planar model as the baseline. Next on top of it: - magic-state cultivation and yoked surface codes; - block (qLDPC) codes; - reaction-time-limited scheduling; - error-model constants fitted from this crate's own circuit-level QEC Monte Carlo, so an estimate can rest on measured rather than assumed code behaviour. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
wai-quantum 0.3.24: fault-tolerant resource estimation, reproducible and signed
All checks were successful
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Successful in 3m14s
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Successful in 25s
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Successful in 1m8s
no-vanity-metrics / Scan committed Markdown for vanity metrics (pull_request) Successful in 3s
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 / proof-rs (pull_request) Successful in 1m12s
standards workspaces build + test / sandbox-rs (pull_request) Successful in 2m12s
standards workspaces build + test / smart-byte-rs (pull_request) Successful in 3m37s
WAI conformance / cargo-class corpora · linux (pull_request) Successful in 3m19s
WAI conformance / v2 vocabulary · manifests validate as stated (pull_request) Successful in 12s
WAI conformance / independent verifiers · claims, JWP and key discovery (Python) (pull_request) Successful in 2m9s
WAI conformance / cross-arch byte-equality · linux (pull_request) Successful in 22s
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Successful in 43s
WAI energy receipts / energy receipts · linux (pull_request) Successful in 1m4s
WAI JPEG-AI whole decode (pinned inputs, required) / fetch pinned JPEG-AI inputs → whole decode + pixel hash, required (pull_request) Successful in 58s
WAI neural sink gates / model-free refusals of the neural sink (pull_request) Successful in 46s
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Successful in 3m51s
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Successful in 1m30s
standards workspaces build + test / arl-rs (pull_request) Successful in 2m21s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 2m56s
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 2m44s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 2m43s
standards workspaces build + test / sense-rs (pull_request) Successful in 2m40s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 4m21s
WAI conformance / cargo-class corpora · macos (pull_request) Successful in 4m30s
WAI conformance / cross-arch byte-equality · macos (pull_request) Successful in 29s
WAI energy receipts / energy receipts · macos (pull_request) Successful in 1m38s
047e06b88d
Every claim about a fault-tolerant machine (so many physical qubits, so much
time) is a resource estimate, and the arithmetic behind one is usually a
script run once. quantum_resource makes it a deterministic function of its
inputs.

- Logical layout and step count by parallel-synthesis sequential Pauli
  computation; rotation synthesis cost; error budget shared over the parts the
  program uses.
- Planar codes (surface on gate-based and measurement-based qubits, Floquet
  honeycomb) with distance chosen against the logical budget.
- T-state factories by exhaustive search over 15-to-1 unit type, physical or
  logical rounds, non-decreasing distances and binomially sized copy counts,
  choosing the smallest space-time volume; the code itself chosen the same way.
- The qubits-versus-time frontier.

It is held to the planar-ISA model's published tables (arXiv:2211.07629):
every distance and factory of the per-qubit factoring table, the distance,
factory count, qubits and runtime of all twelve factoring and chemistry
summary rows, and all twelve dynamics factory counts. Factoring on the
(ns, 1e-4) qubit: d = 13, 18 factories, 8,716,258 qubits, 17 h 43 min.
Mutating the model's unit costs, copy-count rule or code selection breaks
those tests.

Holding it to the tables also showed where the source's prose and numbers
disagree (a Toffoli count, two unit durations, a runtime unit), and one
printed factory that is not the minimum of its own model; each is documented
and settled by the tables.

quantum_resource_receipt seals an estimate over its whole job, to the bit,
and verify_computation re-runs it and demands every figure back. Receipts and
estimate output are byte-identical natively and under wasm32-wasip2, and
tests/bit_identity.rs pins the figures of twelve estimates on both.

CLI: wai-quantum estimate [factoring|chemistry|--qubits ...] [--qubit ...]
[--frontier] [--json] [--receipt]; verify accepts the receipt.

repro's sin/cos moved to a gated submodule so the estimator, which needs only
ln, builds alone without warnings.

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!141
No description provided.