wai-quantum 0.6.4: Pauli frames, the GPU state vector, the density matrix to 16 qubits, an OpenQASM writer that keeps every gate; the service for agents and browsers #320

Merged
dcharlot merged 21 commits from wai/quantum-0.6.4-pr into main 2026-10-18 15:44:15 -04:00
Owner

wai-quantum 0.6.4 and the job service's usability round. Additive: every pinned digest is unchanged, and the state vector, the trajectories and the sparse-Pauli engine give the same bits as before. The CHANGELOG entry has the measurements.

wai-quantum

  • Noisy Clifford circuits by Pauli frames (quantum_tableau::frame_counts, frame_expectations): one noiseless reference outcome, frames sampled 64 shots to a word with a random-Z gauge. 10,000 qubits, 100,000 gates and 100,000 shots in 1.6 s. Mutants (a dropped two-qubit partner, a dropped gauge) are caught.
  • The state vector on the GPU (quantum_sv_metal, macOS): single precision, tiled in threadgroup memory, one pipeline per group size up to sixteen members; checked against the CPU state vector.
  • The density matrix by superoperators (DensityMatrix::evolve) to 16 qubits: 12 qubits in 0.53 s against 158 s for run, which stays as the referee.
  • quantum_spd::expectation_capped: a term cap that doubles the threshold and keeps the bound.
  • Faster, same bits: state-vector kernels at compile-time sizes (two to five qubits); the tensor-network executor's products blocked for the cache and threaded over rows.
  • The OpenQASM writer keeps every gate. A gate with three or more controls (Grover's search past three qubits) was written as a comment, so the exported program was not the circuit. It is now written as OpenQASM 3's ctrl(n) @ g, and from_qasm reads the modifiers back.
  • Word-sized counters where 64-bit atomics are absent on some targets.

wai-quantum-service (not published; live at /quantum-jobs/)

  • An MCP endpoint (five tools, summaries written for models), OpenAPI 3.1, worked examples and a root index.
  • Receipts sign the RFC 8785 canonical text of the request and the result, so a result verifies after any JSON reader has carried it, a browser's included (numbers checked against a JavaScript engine on 2 million doubles); receipts made before still verify. A job carries its request, so its id alone verifies.
  • Numbers are read correctly rounded: before, a result could change in its last bit between the job's process and the reply.
  • OpenQASM 3 control modifiers, written exactly as standard gates (a phase on m qubits as 2^m − 1 cx and as many p), checked amplitude by amplitude against the gate applied directly.
  • The stabilizer method takes Pauli noise; statevector_single on the GPU; density_matrix to 16 qubits; the pauli method held to the job's memory by a term cap; fix-it hints on the commonest program errors.

The live IDE's package is already built from this branch's rehearsal (fbaa1cda); its row moves to the merge commit when this lands.

🤖 Generated with Claude Code

wai-quantum 0.6.4 and the job service's usability round. Additive: every pinned digest is unchanged, and the state vector, the trajectories and the sparse-Pauli engine give the same bits as before. The CHANGELOG entry has the measurements. **wai-quantum** - **Noisy Clifford circuits by Pauli frames** (`quantum_tableau::frame_counts`, `frame_expectations`): one noiseless reference outcome, frames sampled 64 shots to a word with a random-Z gauge. 10,000 qubits, 100,000 gates and 100,000 shots in 1.6 s. Mutants (a dropped two-qubit partner, a dropped gauge) are caught. - **The state vector on the GPU** (`quantum_sv_metal`, macOS): single precision, tiled in threadgroup memory, one pipeline per group size up to sixteen members; checked against the CPU state vector. - **The density matrix by superoperators** (`DensityMatrix::evolve`) to 16 qubits: 12 qubits in 0.53 s against 158 s for `run`, which stays as the referee. - **`quantum_spd::expectation_capped`**: a term cap that doubles the threshold and keeps the bound. - **Faster, same bits:** state-vector kernels at compile-time sizes (two to five qubits); the tensor-network executor's products blocked for the cache and threaded over rows. - **The OpenQASM writer keeps every gate.** A gate with three or more controls (Grover's search past three qubits) was written as a comment, so the exported program was not the circuit. It is now written as OpenQASM 3's `ctrl(n) @ g`, and `from_qasm` reads the modifiers back. - Word-sized counters where 64-bit atomics are absent on some targets. **wai-quantum-service** (not published; live at `/quantum-jobs/`) - An MCP endpoint (five tools, summaries written for models), OpenAPI 3.1, worked examples and a root index. - Receipts sign the RFC 8785 canonical text of the request and the result, so a result verifies after any JSON reader has carried it, a browser's included (numbers checked against a JavaScript engine on 2 million doubles); receipts made before still verify. A job carries its request, so its id alone verifies. - Numbers are read correctly rounded: before, a result could change in its last bit between the job's process and the reply. - OpenQASM 3 control modifiers, written exactly as standard gates (a phase on m qubits as 2^m − 1 `cx` and as many `p`), checked amplitude by amplitude against the gate applied directly. - The stabilizer method takes Pauli noise; `statevector_single` on the GPU; `density_matrix` to 16 qubits; the pauli method held to the job's memory by a term cap; fix-it hints on the commonest program errors. The live IDE's package is already built from this branch's rehearsal (fbaa1cda); its row moves to the merge commit when this lands. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A browser's JSON.parse and JSON.stringify turn 1.0 into 1, so a receipt over
serde_json's own text could not be checked from JavaScript (the console, or
any JS agent). The digest now covers the canonical text of the request and
the result: keys sorted by UTF-16 code units, no whitespace, every number as
ECMAScript's Number::toString writes the double, ties between equally near
shortest digits going to the even one, as the standard asks. The receipt
names the form ("canon": "rfc8785"); receipts issued before it still
verify. serde_json reads numbers correctly rounded (float_roundtrip), and a
request whose whole numbers a double cannot hold is refused. Checked against
a JavaScript engine: RFC 8785's appendix B and 3,385 vectors in the tests,
and 2 million random doubles in an opt-in test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A gate with three or more controls (Grover's oracle and diffusion past three
qubits) was written as a comment, so the exported program was not the
circuit. to_qasm now writes ctrl(n) @ g for every controlled gate without a
standard name (ch included), and from_qasm reads ctrl, ctrl(n), negctrl and
negctrl(n). Gates exact here only up to a global phase (rz, rx, ry, sx, u) are
refused under a modifier, since a control makes that phase observable.
Checked: each base gate under zero to five controls reads back op for op;
Grover on five and seven qubits keeps its state.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
ctrl @, ctrl(n) @, negctrl @ and negctrl(n) @ on x y z h s sdg t tdg p and on
cx cy cz ch cp ccx ccz. A gate the standard names is read as that gate, so a
Clifford program keeps the stabilizer method. A phase on m qubits is written
from x1...xm = 2^(1-m) sum over nonempty S of (-1)^(|S|+1) parity(S): each
subset's parity gathered on its highest qubit by cx in Gray-code order and
turned by p(+-theta/2^(m-1)), 2^m - 1 of each, exact with no global phase.
x, y and h become a phase by a change of basis on the target. Checked on a
6-qubit state against the 2x2 gate applied directly where the controls hold,
every amplitude within 1e-12; the test fails when the expansion's signs or its
releases are broken. Grover as the IDE exports it finds its item on the exact
and statevector methods.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
wai-quantum-service: the MCP and OpenAPI descriptions of the program name the control modifiers, ch, and reset before a qubit's first gate
All checks were successful
WAI conformance / cargo-class corpora · macos (pull_request) Successful in 19m39s
WAI conformance / cross-arch byte-equality · macos (pull_request) Successful in 1m1s
WAI conformance / codec wrappers · fuzz smoke, text decode limits, C entry points, provenance, the semantic path (pull_request) Successful in 1m37s
WAI conformance / v2 vocabulary · manifests validate as stated (pull_request) Successful in 36s
WAI conformance / delivery telemetry · CMCD and CMSD against an independent library (pull_request) Successful in 29s
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Successful in 1m8s
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Successful in 3m39s
WAI energy receipts / energy receipts · macos (pull_request) Successful in 10m16s
wai-pack / wai-pack · macos (pull_request) Successful in 1m29s
wai-quantum dataflow member / member · dataflow device absent (macos) (pull_request) Successful in 17s
wai-quantum FPGA member / member · FPGA datapath, simulated (macos) (pull_request) Successful in 1m41s
wai-quantum Metal member / member · Metal (macos) (pull_request) Successful in 48s
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Successful in 8m40s
wai-pack / wai-pack · linux-arm64 (pull_request) Successful in 2m22s
wai-quantum neural-processor member / member · neural processor (macos) (pull_request) Successful in 7m43s
wai-quantum OpenCL member / member · OpenCL GPU (macos) (pull_request) Successful in 39s
wai-quantum service / service · macos (pull_request) Successful in 1m11s
wai-quantum matrix-extension member / member · matrix extension absent (macos) (pull_request) Successful in 22s
wai-quantum portable tensor program / tensor program · Metal and the arm64 CPU (macos) (pull_request) Successful in 32s
wai-quantum CPU vector units / member · vector unit absent (macos) (pull_request) Successful in 29s
wai-pack / wai-pack · independent verifier (Python) (pull_request) Successful in 7m26s
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Successful in 25m10s
wai-pack / wai-pack · the floor through a media prober (pull_request) Successful in 58s
wai-quantum HIP member / member · HIP absent (linux-arm64) (pull_request) Successful in 1m1s
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Successful in 27m36s
wai-quantum npu-cores member / member · npu-cores absent (linux-arm64) (pull_request) Successful in 1m9s
wai-pack / wai-pack · dependency licences (pull_request) Successful in 2m37s
wai-quantum tensor-engine member / member · tensor engine absent (linux-arm64) (pull_request) Successful in 47s
wai-quantum WebGPU member / member · Metal (macos) (pull_request) Successful in 5m20s
wai-quantum WebGPU member / member · browser WebGPU (macos) (pull_request) Successful in 2m18s
f004c9c258
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Merge origin/main into wai/quantum-0.6.4-pr; CHANGELOG keeps every entry
Some checks failed
wai-quantum Metal member / member · Metal (macos) (pull_request) Successful in 46s
wai-quantum CPU vector units / member · vector unit, sve 2048-bit (aarch64, emulated) (pull_request) Successful in 10s
wai-quantum CPU vector units / member · vector unit, avx2 (x86_64 silicon) (pull_request) Successful in 16s
wai-quantum CPU vector units / member · vector unit, sve 512-bit (aarch64, emulated) (pull_request) Successful in 19s
wai-quantum WebGPU member / member · software Vulkan (linux) (pull_request) Successful in 3m1s
wai-quantum WebGPU member / shader checks · browser build · wasip2 inertness · MSRV (pull_request) Successful in 5m2s
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Successful in 4m37s
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Successful in 8m19s
wai-quantum neural-processor member / member · neural processor (macos) (pull_request) Failing after 2h39m39s
wai-quantum OpenCL member / member · OpenCL GPU (macos) (pull_request) Successful in 24s
wai-quantum service / service · macos (pull_request) Successful in 33s
wai-quantum matrix-extension member / member · matrix extension absent (macos) (pull_request) Successful in 10s
wai-quantum portable tensor program / tensor program · Metal and the arm64 CPU (macos) (pull_request) Successful in 15s
wai-quantum CPU vector units / member · vector unit absent (macos) (pull_request) Successful in 14s
wai-quantum WebGPU member / member · Metal (macos) (pull_request) Successful in 2m44s
wai-quantum WebGPU member / member · browser WebGPU (macos) (pull_request) Successful in 1m44s
WAI conformance / v2 vocabulary · manifests validate as stated (pull_request) Successful in 18s
WAI conformance / delivery telemetry · CMCD and CMSD against an independent library (pull_request) Successful in 13s
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Successful in 26s
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Successful in 57s
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Successful in 8m8s
wai-pack / wai-pack · linux-arm64 (pull_request) Successful in 1m50s
wai-pack / wai-pack · independent verifier (Python) (pull_request) Successful in 4m0s
wai-pack / wai-pack · the floor through a media prober (pull_request) Successful in 24s
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Successful in 17m12s
wai-quantum HIP member / member · HIP absent (linux-arm64) (pull_request) Successful in 21s
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Successful in 17m3s
wai-pack / wai-pack · dependency licences (pull_request) Successful in 1m9s
wai-quantum tensor-engine member / member · tensor engine absent (linux-arm64) (pull_request) Successful in 17s
wai-quantum npu-cores member / member · npu-cores absent (linux-arm64) (pull_request) Successful in 20s
ae3f6eedf1
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!320
No description provided.