wai-quantum: jobs placed on certified GPU members or split over several, byte for byte the CPU's; Clifford+T as sums of stabilizer states #557
Merged
dcharlot
merged 7 commits from 2026-10-31 14:53:38 -04:00
wai/quantum-scale-out into main 2026-10-31
wai-quantum-py: the getting-started notebook's method list names stabilizer_rank
All checks were successful
wai-quantum docs, course and locales / every command and snippet in the docs · linux (pull_request) Successful in 15m37s
wai-quantum signal processor / processor and member · signal processor, emulated (pull_request) Successful in 13m37s
wai-quantum CPU vector units / member · vector unit, sve 128-bit (aarch64, emulated) (pull_request) Successful in 37s
wai-quantum variational and algorithm library / parameters, gradients, optimisers, VQE, QAOA and builders · linux, release (pull_request) Successful in 1m37s
wai-quantum CPU vector units / member · vector unit, rvv 128-bit (riscv64, emulated) (pull_request) Successful in 24s
wai-quantum CPU vector units / member · vector unit, avx2 (x86_64 silicon) (pull_request) Successful in 23s
wai-quantum CPU vector units / member · vector unit, sve 2048-bit (aarch64, emulated) (pull_request) Successful in 35s
wai-quantum CPU vector units / member · vector unit, sve 512-bit (aarch64, emulated) (pull_request) Successful in 29s
wai-quantum studio and desktop / desktop app · linux (pull_request) Successful in 5m53s
WAI examples / WAI examples · android-app · linux-arm64 (pull_request) Successful in 7m3s
wai-quantum verdicts and repairs / the intent set and the verdict under wasm32-wasip2 (wasmtime) (pull_request) Successful in 1m15s
wai-quantum verdicts and repairs / verdicts, repairs and the intent set · linux (pull_request) Successful in 1m48s
wai-quantum HIP member / member · HIP absent (linux-arm64) (pull_request) Successful in 1m10s
wai-quantum npu-cores member / member · npu-cores absent (linux-arm64) (pull_request) Successful in 29s
WAI Studio / the catalogue's actions, the unit tests and the core · linux (pull_request) Successful in 1m5s
wai-quantum views in agent hosts / views · the page and its engine (pull_request) Successful in 3m16s
wai-quantum views in agent hosts / views · a scripted host (pull_request) Successful in 3m33s
wai-quantum WebGPU member / member · software Vulkan (linux) (pull_request) Successful in 2m24s
wai-quantum pulse and dynamics / the same bits · linux-arm64 (pull_request) Successful in 1m37s
wai-quantum WebGPU member / shader checks · browser build · wasip2 inertness · MSRV (pull_request) Successful in 3m39s
wai-quantum tensor-engine member / member · tensor engine, the kernel toolchain's simulator (linux) (pull_request) Successful in 8m12s
wai-quantum tensor-engine member / member · tensor engine absent (linux-arm64) (pull_request) Successful in 24s
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Successful in 13m18s
wai-web reach builds / wai-web reach builds · the package of record, every output as recorded (pull_request) Successful in 2m26s
wai-quantum variational and algorithm library / parameters, gradients, optimisers, VQE, QAOA and builders · linux-arm64, release (pull_request) Successful in 2m5s
wai-web reach builds / wai-web reach builds · this tree's wai-web, every rung on its engine line (pull_request) Successful in 4m35s
wai-sink-android native sink library / the JNI layer and the platform-free half on the host JVM · linux-arm64 (pull_request) Successful in 2m59s
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Successful in 6m10s
WAI Studio / Studio in WebKit · linux (pull_request) Successful in 10m37s
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Successful in 1h7m10s
The notebook prints every method with its accuracy, and the Python workflow holds each cell to its stored output. The stabilizer-rank method is new in this branch, so its line goes into the stored output, in the engine's order. Nothing else in any notebook's outputs changed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
wai-quantum: the agent docs blessed and the views page rebuilt with the fabric, the stabilizer-rank method and everything before them
All checks were successful
wai-quantum studio and desktop / studio · browser (pull_request) Successful in 4m28s
wai-quantum CPU vector units / member · vector unit, rvv 1024-bit (riscv64, emulated) (pull_request) Successful in 19s
wai-quantum CPU vector units / member · vector unit, sve 128-bit (aarch64, emulated) (pull_request) Successful in 15s
wai-quantum CPU vector units / member · vector unit, rvv 128-bit (riscv64, emulated) (pull_request) Successful in 19s
wai-quantum CPU vector units / member · vector unit, sve 2048-bit (aarch64, emulated) (pull_request) Successful in 13s
wai-quantum CPU vector units / member · vector unit, avx2 (x86_64 silicon) (pull_request) Successful in 8s
wai-quantum variational and algorithm library / parameters, gradients, optimisers, VQE, QAOA and builders · linux, release (pull_request) Successful in 1m29s
wai-quantum CPU vector units / member · vector unit, sve 512-bit (aarch64, emulated) (pull_request) Successful in 11s
wai-quantum docs, course and locales / every command and snippet in the docs · linux (pull_request) Successful in 16m10s
wai-quantum verdicts and repairs / the intent set and the verdict under wasm32-wasip2 (wasmtime) (pull_request) Successful in 1m10s
wai-quantum verdicts and repairs / verdicts, repairs and the intent set · linux (pull_request) Successful in 1m55s
wai-quantum studio and desktop / desktop app · linux (pull_request) Successful in 6m30s
wai-quantum tensor-engine member / member · tensor engine, the kernel toolchain's simulator (linux) (pull_request) Successful in 8m25s
WAI Studio / the catalogue's actions, the unit tests and the core · linux (pull_request) Successful in 1m0s
wai-quantum views in agent hosts / views · the page and its engine (pull_request) Successful in 3m28s
wai-quantum views in agent hosts / views · a scripted host (pull_request) Successful in 3m34s
wai-quantum WebGPU member / member · software Vulkan (linux) (pull_request) Successful in 2m4s
wai-quantum WebGPU member / shader checks · browser build · wasip2 inertness · MSRV (pull_request) Successful in 3m33s
wai-sink-swift native sink package / libwai slices, desktop tests, simulator tests · macos (pull_request) Successful in 27m7s
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Successful in 6m3s
WAI examples / WAI examples · android-app · linux-arm64 (pull_request) Successful in 11m6s
wai-quantum HIP member / member · HIP absent (linux-arm64) (pull_request) Successful in 1m9s
wai-quantum npu-cores member / member · npu-cores absent (linux-arm64) (pull_request) Successful in 30s
WAI Studio / Studio in WebKit · linux (pull_request) Successful in 9m41s
wai-quantum pulse and dynamics / the same bits · linux-arm64 (pull_request) Successful in 1m49s
wai-quantum tensor-engine member / member · tensor engine absent (linux-arm64) (pull_request) Successful in 36s
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Successful in 18m5s
wai-quantum variational and algorithm library / parameters, gradients, optimisers, VQE, QAOA and builders · linux-arm64, release (pull_request) Successful in 1m52s
wai-sink-android native sink library / the JNI layer and the platform-free half on the host JVM · linux-arm64 (pull_request) Successful in 2m44s
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Successful in 1h13m49s
The views page was rebuilt with wai/wai-quantum-views/build.sh in catthehacker/ubuntu:act-22.04 with Rust 1.98.0, as the views workflow rebuilds it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
quantum-studio: the stabilizer-rank sum by its plain name, and the views page rebuilt
The Studio's method names gain stabilizer_rank, "Stabilizer-rank sum" in English and its Simplified Chinese, so a plan or result made by it shows a name rather than the method's key. The Studio's words feed the bundled views page, so the page is rebuilt in the CI image (act-22.04, Rust 1.98.0, wasm32-unknown-unknown), where build-views --check holds it to its 48 sources; it carries this branch's engine too. Co-Authored-By: Claude Opus 5.5 <[email protected]>
wai-quantum: auto keeps the state vector on the CPU until a member is measured faster
With one launch per gate and the state copied to the device and back, a whole job measured about as fast, or slower on the GPU, between 18 and 22 qubits on the fleet's GPUs (22 qubits on the laptop GPU: 159 ms on the CPU, 202 ms placed). A planner must not route by default to a path that is not better, so `auto` now places on the CPU on every host and looks for no member: a job that does not ask runs as it always did, its result unnamed. A member runs a job only when the job asks: `accelerator` takes the first certified member that holds the state, and one that fails during the run hands the job to the next, the receipt listing each that failed (`fell_back_from`, now a list, each with how it failed); when every one fails the job is refused (J013). A member named by id or key is alone. Discovery, certification, the receipt's fabric block, the split and `wai-quantum fabric` are as they were; `fabric_members` states `auto` instead of a threshold. A test with stand-in devices holds the fall-back to the CPU's bits and to the schema. The hardware legs ask for `accelerator` and check that auto names nothing; both replayed on jetson-hub and framework-128gb. Docs, help, both MCP servers' descriptions, the guide and the changelog say so; agent docs re-blessed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
wai-quantum: a build without the fabric honours only auto placement, and says so
The engine without quantum_fabric (the desktop app, the browser engine, the contract's build) reads every `fabric` and refuses all but auto (J013), with a test of its own; the placement tests that need the fabric are gated on it, and the helpers only the fabric uses are compiled only with it, so those builds carry no dead code. Co-Authored-By: Claude Opus 5.5 <[email protected]>
wai-quantum: Clifford+T circuits as sums of stabilizer states (stabilizer_rank)
A T gate is (e^{iπ/8} I + e^{−iπ/8} S) / (2 cos π/8), and T† its conjugate,
so a circuit with t of them is a sum of 2^t Clifford circuits of equal
weight. quantum_stabrank walks every branch on the phased tableau, whose new
PhasedTableau::amplitudes gives every amplitude of a stabilizer state exactly
from one reduction of the stabilizers (d = x ⊕ r in the X span, the phase
read off the product of pivot rows). Every term is a power of 1/√2 at a whole
number of sixteenths of a turn, counted as a whole number (ExactSum), so the
sum does not depend on how the branches are split between threads and is
evaluated once in double precision. An expectation value is the amplitude
⟨0|U†PU|0⟩ of one circuit with twice the T gates.
Exact mode: terms grow as 2^t (4^t for an expectation value). Sampled mode
(terms, or epsilon, at confidence): branches drawn uniformly, seeded, each
from a stream of its own; the estimate is unbiased with mean squared distance
(sec²(π/8)^t − 1)/terms, so each value is within
sqrt((sec²(π/8)^t − 1)/(terms·(1 − confidence))) with the stated probability,
computed from t, terms and confidence and stated beside each value.
Program::clifford_t lowers t, tdg, p/rz/rx/ry at odd multiples of π/4, cp at
odd multiples of π/2, ccz and ccx, with the global phase kept exactly.
Ground truth first: every amplitude of random Clifford+T circuits (up to 7
qubits, 10 T gates) and of random programs through the job engine equals the
dense state vector's, phase and all, within 1e-12, by fidelity; expectation
values likewise; the sampled bound holds in at least its stated fraction of
seeds, measured on the whole state. The planner names stabilizer_rank and
auto chooses it by T count (amplitudes or expectation values past the dense
state vector, its branches within one job's work, calibrated at about 4e10
tableau word operations a second on a 16-core host). Optional t_count, terms,
bound and confidence in the result schema; the methods list, both MCP
servers, the service and the docs name it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
wai-quantum: the state vector placed on the fabric's members, and split over several
A job's new `fabric` says where the statevector method's state runs: auto (the default), cpu, accelerator, a member's id or key, or a list of members (a power of two), the state split by its top qubits into one partition on each. The CUDA, HIP and OpenCL members' f64 state vectors are discovered once per process and certified against the CPU on the pinned corpus; only a member certified bit-exact is placed, so a placed job's answers are the CPU's byte for byte. A placement the host cannot honour is refused (J013), never made elsewhere. With no member asked for and none placed, the plan and the result are what they always were: the existing pins hold. The partitioned run (sv64::run_split) runs the launches the CPU plans on each partition's amplitudes; a gate on a partition qubit first has that qubit exchanged with a local one through the host's copy. Ground truth first: CPU partitions equal the CPU's state vector bit for bit over the pinned corpus at every partition count and on wide states with exchanges. On the fleet, one state split four ways over a laptop GPU (by two backends), the CPU by OpenCL and the CPU reference gives the CPU's answers byte for byte, as does the integrated GPU by HIP beside OpenCL. The result carries `fabric` (member, parity tier, certificate digest, corpus, energy unmetered with the reason), sealed by the job's receipt, and its provenance names the members: optional members of the job request, job result and provenance schemas, and fabric_members in the tools schema. Surfaces: `wai-quantum run --fabric` and `wai-quantum fabric`, the CLI's cuda, hip and opencl features, `fabric` in both MCP servers' job tools and `list_fabric` on the command line's, the service reading it. Members gain run_launches and max_qubits. Hardware legs in the CUDA and HIP workflows, absent legs and the CPU-partition tests by name in containers. Co-Authored-By: Claude Opus 5.5 <[email protected]>