| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
All checks were successful
wai-quantum WebGPU member / member · DX12 and Vulkan (cbio-windows) (pull_request) Successful in 12m5s
wai-quantum on every processor / emulated · aarch64-unknown-linux-gnu (pull_request) Successful in 1m41s
wai-quantum on every processor / emulated · armv7-unknown-linux-gnueabihf (pull_request) Successful in 1m45s
wai-quantum on every processor / emulated · loongarch64-unknown-linux-gnu (pull_request) Successful in 2m13s
wai-quantum on every processor / emulated · powerpc64-unknown-linux-gnu (pull_request) Successful in 4m47s
wai-quantum on every processor / emulated · powerpc64le-unknown-linux-gnu (pull_request) Successful in 5m51s
wai-quantum on every processor / emulated · riscv64gc-unknown-linux-gnu (pull_request) Successful in 3m57s
wai-quantum on every processor / emulated · s390x-unknown-linux-gnu (pull_request) Successful in 3m47s
wai-quantum on every processor / emulated · sparc64-unknown-linux-gnu (pull_request) Successful in 5m52s
wai-web reach builds / wai-web reach · does this change touch it (pull_request) Successful in 5s
wai-quantum on every processor / emulated · i686-unknown-linux-gnu (pull_request) Successful in 3m51s
standards workspaces build + test / which workspaces this change touches (pull_request) Successful in 8s
WAI conformance / does this change touch it (pull_request) Successful in 8s
standards workspaces build + test / macOS energy backends (pull_request) Has been skipped
WAI energy receipts / does this change touch it (pull_request) Successful in 8s
WAI JPEG-AI whole decode (pinned inputs, required) / does this change touch it (pull_request) Successful in 7s
WAI neural sink gates / does this change touch it (pull_request) Successful in 8s
wai-pack / wai-pack · does this change touch it (pull_request) Successful in 7s
wai-quantum dataflow member / does this change touch it (pull_request) Successful in 10s
wai-quantum CUDA member / does this change touch it (pull_request) Successful in 13s
wai-quantum signal processor / does this change touch it (pull_request) Successful in 15s
wai-quantum FPGA member / does this change touch it (pull_request) Successful in 14s
wai-quantum Metal member / does this change touch it (pull_request) Successful in 17s
wai-quantum HIP member / does this change touch it (pull_request) Successful in 17s
repository checks / lockfiles, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Successful in 1m22s
wai-quantum npu-cores member / does this change touch it (pull_request) Successful in 8s
wai-quantum neural-processor member / does this change touch it (pull_request) Successful in 12s
wai-quantum OpenCL member / does this change touch it (pull_request) Successful in 12s
wai-quantum-qpu / does this change touch it (pull_request) Successful in 12s
wai-quantum service / does this change touch it (pull_request) Successful in 10s
wai-quantum HIP member / member · HIP (framework-128gb) (pull_request) Successful in 24s
wai-quantum CUDA member / member · CUDA (jetson-hub) (pull_request) Successful in 27s
wai-quantum matrix-extension member / does this change touch it (pull_request) Successful in 10s
wai-quantum tensor-engine member / does this change touch it (pull_request) Successful in 10s
wai-quantum portable tensor program / does this change touch it (pull_request) Successful in 9s
wai-quantum CPU vector units / does this change touch it (pull_request) Successful in 7s
wai-quantum WebGPU member / does this change touch it (pull_request) Successful in 7s
WAI mbt2018_mean integer decode (regenerated vectors) / does this change touch it (pull_request) Successful in 7s
wai-web wasm32 / does this change touch it (pull_request) Successful in 6s
wai-quantum OpenCL member / member · OpenCL GPU and CPU (jetson-hub) (pull_request) Successful in 32s
wai-quantum portable tensor program / tensor program · GPUs (jetson-hub) (pull_request) Successful in 19s
wai-quantum npu-cores member / member · npu-cores, neural processor (framework-128gb silicon) (pull_request) Successful in 1m14s
wai-quantum OpenCL member / member · OpenCL GPU (framework-128gb) (pull_request) Successful in 13s
wai-quantum portable tensor program / tensor program · integrated GPU (framework-128gb) (pull_request) Successful in 7s
wai-quantum CPU vector units / member · vector units, avx2 and avx512 (framework-128gb silicon) (pull_request) Successful in 9s
wai-quantum WebGPU member / member · integrated GPU, Vulkan (framework-128gb) (pull_request) Successful in 7m39s
wai-quantum WebGPU member / member · discrete GPU, Vulkan (jetson-hub) (pull_request) Successful in 22m25s
wai-web reach builds / wai-web reach builds · the package of record, every output as recorded (pull_request) Successful in 2m51s
wai-web reach builds / wai-web reach builds · this tree's wai-web, every rung on its engine line (pull_request) Successful in 4m49s
WAI conformance / quantum core and corpus under wasm32-wasip2 (wasmtime) (pull_request) Successful in 2m11s
WAI conformance / cross-arch byte-equality · linux (pull_request) Successful in 26s
WAI energy receipts / energy receipts · linux (pull_request) Successful in 9m14s
WAI JPEG-AI whole decode (pinned inputs, required) / fetch pinned JPEG-AI inputs → whole decode + pixel hash, required (pull_request) Successful in 2m48s
WAI neural sink gates / model-free refusals of the neural sink (pull_request) Successful in 1m26s
WAI conformance / cargo-class corpora · linux (pull_request) Successful in 18m3s
wai-pack / wai-pack · linux (pull_request) Successful in 1m20s
wai-quantum dataflow member / member · dataflow device, simulated (pci 1e52:b140) (pull_request) Successful in 3m44s
wai-quantum CUDA member / member · CUDA absent (linux) (pull_request) Successful in 21s
wai-quantum dataflow member / member · dataflow device, simulated (pci 1e52:401e) (pull_request) Successful in 3m39s
wai-quantum FPGA member / member · FPGA simulation absent (linux) (pull_request) Successful in 18s
wai-quantum Metal member / member · Metal absent (linux) (pull_request) Successful in 22s
wai-quantum neural-processor member / member · neural processor absent (linux) (pull_request) Successful in 19s
wai-quantum OpenCL member / member · OpenCL absent (linux) (pull_request) Successful in 23s
wai-quantum-qpu / clients against their contracts (linux) (pull_request) Successful in 20s
wai-quantum service / service · linux (pull_request) Successful in 37s
wai-quantum matrix-extension member / member · matrix extension, emulated (aarch64 Linux) (pull_request) Successful in 19s
wai-quantum tensor-engine member / member · tensor engine, the kernel toolchain's simulator (linux) (pull_request) Successful in 7m44s
wai-quantum portable tensor program / tensor program · CPU, mutants, GPU builds (pull_request) Successful in 34s
wai-quantum CPU vector units / member · vector unit, rvv 1024-bit (riscv64, emulated) (pull_request) Successful in 17s
wai-quantum CPU vector units / member · vector unit, sve 128-bit (aarch64, emulated) (pull_request) Successful in 25s
wai-quantum CPU vector units / member · vector unit, rvv 128-bit (riscv64, emulated) (pull_request) Successful in 12s
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 12s
wai-quantum signal processor / processor and member · signal processor, emulated (pull_request) Successful in 13m24s
wai-quantum CPU vector units / member · vector unit, sve 512-bit (aarch64, emulated) (pull_request) Successful in 12s
wai-quantum WebGPU member / member · software Vulkan (linux) (pull_request) Successful in 2m13s
wai-quantum WebGPU member / shader checks · browser build · wasip2 inertness · MSRV (pull_request) Successful in 3m15s
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Successful in 3m21s
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Successful in 5m22s
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
Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
| .. | ||
| src | ||
| testdata | ||
| Cargo.lock | ||
| Cargo.toml | ||
| README.md | ||
| smoke.sh | ||
wai-quantum-service
The WAI quantum stack as a public job service. Send an OpenQASM program; get back measurement counts, Pauli expectation values or amplitudes. Each result names the method that produced it and how accurate it is, and carries a signature you can check.
No account and no key. The public instance is at https://wai.transaction.science/quantum-jobs/v1.
# A Bell pair, 1000 shots.
curl -s https://wai.transaction.science/quantum-jobs/v1/run \
-H 'content-type: application/json' \
-d '{"qasm": "OPENQASM 3.0; qubit[2] q; bit[2] c; h q[0]; cx q[0], q[1]; c = measure q;", "shots": 1000}'
Jobs
A job is JSON:
| field | meaning |
|---|---|
qasm |
the program: OpenQASM 3, or OpenQASM 2 (required) |
method |
auto (the default) or a method below |
shots |
measurement shots (default 1024 when nothing else is asked for; at most 1,000,000) |
seed |
the sampling seed (default 1); the same job and seed give the same counts |
observables |
Pauli strings such as "Z0 Z1", or {"pauli": "X3 Y4", "coeff": 0.5} |
amplitudes |
bit strings, one character per qubit, qubit n − 1 first |
noise |
{"depolarizing_1q", "depolarizing_2q", "amplitude_damping", "dephasing", "readout"}, each a probability |
options |
per method: threshold, max_weight and ladder (pauli), max_bond and cutoff (mps), fusion (statevector), trajectories, memory_gb |
Counts are keyed by the program's classical bits, the highest bit first. With no measurement in the program, every qubit is measured into the bit of its own index.
The program may use the standard gates, user gate definitions, and the control modifiers ctrl @, ctrl(n) @, negctrl @ and negctrl(n) @ (on x y z h s sdg t tdg p and cx cy cz ch cp ccx ccz). Classical control, inv @, pow @ and gates after a qubit's measurement are refused, each with its line and what to write instead (src/qasm.rs lists everything read).
Methods
| method | takes | answers | accuracy |
|---|---|---|---|
exact |
angles that are dyadic multiples of 2π, up to 26 qubits | counts, expectations, amplitudes, a state hash | bit-exact |
statevector |
any circuit, up to 32 qubits | counts, expectations, amplitudes | exact |
statevector_single |
any circuit with gates on at most four qubits, up to 33 qubits, where the host has a GPU | counts, expectations, amplitudes | single |
stabilizer |
Clifford circuits (rotations by whole quarter turns), up to 32768 qubits, optionally with depolarizing, dephasing and readout noise | counts, expectations | exact; with noise, an estimate |
pauli |
any circuit, up to 1024 qubits | expectations | bounded |
mps |
any circuit, up to 4096 qubits, at bond dimension up to 256; best when entanglement stays low | counts, expectations, amplitudes | exact when nothing is truncated, otherwise heuristic |
tensor_network |
any circuit | amplitudes | exact |
density_matrix |
noisy circuits, up to 16 qubits within a job's memory | counts, expectations | exact |
trajectories |
noisy circuits, up to 32 qubits | counts, expectations | estimate |
How the methods run:
- statevector groups consecutive gates into passes over the state. Each pass applies its gates tile by tile, in a buffer that fits a core's cache. The grouping never changes a bit of the result.
- pauli reports each value with its truncation
bound. It holds at most as many Pauli terms as the job's memory allows; a sum that would outgrow it raises its threshold until it fits (threshold_reached), and the bound covers everything that dropped. Unlessladderisfalse, it also reports aladder: the value and bound at up to three thresholds a decade above the one asked for, so you can see the value settle as the threshold drops. - stabilizer, with noise, samples by Pauli frames against one noiseless outcome of the tableau, 64 shots to a machine word. Its counts have the law of independent noisy shots. Its expectation values are estimates with standard errors, from at least 10,000 shots unless
trajectoriessets the number. Amplitude damping is not a Pauli channel and is refused. - trajectories treats every shot as an independent noisy trajectory in law. Shots that took the same errors share one state, so the error-free part of a circuit, and the error-free majority of the shots, run once.
historiesin the result counts the distinct error histories that ran.
auto picks the first method that takes the job. With noise, it tries density_matrix, then stabilizer, then trajectories. For counts, it tries stabilizer, exact, statevector, statevector_single, then mps. For expectations alone, it tries stabilizer, exact, statevector, statevector_single, pauli, then mps. For amplitudes alone, it tries exact, statevector, statevector_single, tensor_network, then mps. The job's why names the method chosen and the ones that could not take it.
The accuracy classes:
- bit-exact: the same bits on every machine. Amplitudes are held in 30-bit fixed point, and every output is an exact function of them.
- exact: no approximation beyond double-precision rounding.
- single: no approximation beyond single-precision rounding, about 10⁻⁷ relative per gate; sums are taken in double precision.
- bounded: an approximation, with a rigorous bound on the error (
bound) beside each value. - estimate: a statistical estimate, with its standard error (
stderr). - heuristic: an approximation, reported with the standard estimate of its error but not a bound. A matrix product state that truncated reports its discarded weight and its fidelity estimate, and a
warningwhen the estimate is below 0.9.
Counts are always seeded samples.
Endpoints
GET /v1 |
the service: its methods, limits, load and receipt key |
POST /v1/run |
submit a job and wait up to 25 s: the finished job, or 202 and the job if it is still running |
POST /v1/jobs |
submit a job: 202 and the job, with its id |
GET /v1/jobs/{id} |
the job: its status, the request as submitted, and its result when it is done |
DELETE /v1/jobs/{id} |
cancel a queued or running job |
POST /v1/verify |
{"request": ..., "result": ...}: whether the result's receipt seals that request and that result |
Every refusal says why: 400 for a program or job that does not read, 422 for one larger than a job may be, 429 past the per-client limits, 503 when the queue is full. GET /v1 states the limits.
Receipts
Every finished result carries a receipt: an Ed25519 signature, by the key GET /v1 publishes, over the BLAKE3 digest of the request as submitted and the result as returned. POST /v1/verify checks one, and so can any Ed25519 implementation:
- digest = BLAKE3(
wai:quantum-service-receipt‖ 0x02 ‖ len(R) ‖ R ‖ len(S) ‖ S), each len a big-endian u64; - R and S are the RFC 8785 canonical texts (
"canon": "rfc8785") of the request and of the result without itsreceipt: keys sorted, no whitespace, every number written as ECMAScript writes the double it reads.
So a result verifies after any JSON reader has carried it, a browser's included. Whole numbers in a request must be within ±(2^53 − 1), so that every reader reads them alike. Receipts issued before the canonical form carry no canon and still verify (see src/receipt.rs).
Running it
cargo build --release
WAI_QSVC_ADDR=127.0.0.1:8241 ./target/release/wai-quantum-service serve
bash smoke.sh http://127.0.0.1:8241
Each job runs in a child process of the same binary (worker), at a lower scheduling priority than the host's other work, and is watched for its resident memory and its time.
These variables set the limits:
| variable | default | meaning |
|---|---|---|
WAI_QSVC_BUDGET_GB |
96 | memory all running jobs share |
WAI_QSVC_JOB_GB |
72 | memory one job may take |
WAI_QSVC_WORKERS |
4 | jobs running at once |
WAI_QSVC_MIN_FREE_PCT |
15 | share of the host's memory a starting job must leave free |
WAI_QSVC_JOB_SECS |
900 | the longest a job may run |
WAI_QSVC_CLIENT_ACTIVE |
3 | queued or running jobs one client may hold |
WAI_QSVC_CLIENT_BURST |
30 | submissions one client may make per window |
WAI_QSVC_CLIENT_WINDOW_SECS |
600 | the window |
WAI_QSVC_MAX_QUEUE |
256 | jobs waiting at once |
WAI_QSVC_RETAIN_SECS |
86400 | how long results are kept |
WAI_QSVC_TRUSTED_PROXIES |
127.0.0.1,::1 |
peers whose X-Forwarded-For names the client |
WAI_QSVC_KEY |
~/.config/wai-quantum-service/signing.key |
the signing key, created on first start |
wai-quantum-service run job.json runs one job in the current process and prints its plan and its result.