open-standards/wai/wai-quantum-qpu
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Transaction Science cfa797f856
All checks were successful
joule-moq-web browser client / joule-moq-web · does this change touch it (pull_request) Successful in 6s
joule-moq-room room service / joule-moq-room · does this change touch it (pull_request) Successful in 6s
WAI conformance / does this change touch it (pull_request) Successful in 16s
standards workspaces build + test / which workspaces this change touches (pull_request) Successful in 16s
WAI energy receipts / does this change touch it (pull_request) Successful in 14s
WAI JPEG-AI whole decode (pinned inputs, required) / does this change touch it (pull_request) Successful in 16s
WAI neural sink gates / does this change touch it (pull_request) Successful in 9s
wai-pack / wai-pack · does this change touch it (pull_request) Successful in 9s
wai-quantum CUDA member / does this change touch it (pull_request) Successful in 7s
wai-quantum dataflow member / does this change touch it (pull_request) Successful in 7s
wai-quantum signal processor / does this change touch it (pull_request) Successful in 7s
wai-quantum FPGA member / does this change touch it (pull_request) Successful in 6s
wai-quantum HIP member / does this change touch it (pull_request) Successful in 7s
wai-quantum Metal member / does this change touch it (pull_request) Successful in 7s
wai-quantum npu-cores member / does this change touch it (pull_request) Successful in 7s
wai-quantum neural-processor member / does this change touch it (pull_request) Successful in 7s
wai-quantum CUDA member / member · CUDA (jetson-hub) (pull_request) Successful in 25s
repository checks / lockfiles, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Successful in 1m20s
wai-quantum OpenCL member / does this change touch it (pull_request) Successful in 6s
wai-quantum-qpu / does this change touch it (pull_request) Successful in 5s
wai-quantum HIP member / member · HIP (framework-128gb) (pull_request) Successful in 20s
wai-quantum service / does this change touch it (pull_request) Successful in 6s
wai-quantum matrix-extension member / does this change touch it (pull_request) Successful in 6s
wai-quantum tensor-engine member / does this change touch it (pull_request) Successful in 6s
wai-quantum on every processor / emulated · aarch64-unknown-linux-gnu (pull_request) Successful in 1m25s
wai-quantum portable tensor program / does this change touch it (pull_request) Successful in 5s
wai-quantum CPU vector units / does this change touch it (pull_request) Successful in 5s
wai-quantum WebGPU member / does this change touch it (pull_request) Successful in 6s
WAI mbt2018_mean integer decode (regenerated vectors) / does this change touch it (pull_request) Successful in 5s
wai-web wasm32 / does this change touch it (pull_request) Successful in 5s
wai-quantum OpenCL member / member · OpenCL GPU and CPU (jetson-hub) (pull_request) Successful in 24s
WAI conformance / v2 vocabulary · manifests validate as stated (pull_request) Successful in 24s
wai-quantum portable tensor program / tensor program · GPUs (jetson-hub) (pull_request) Successful in 16s
wai-quantum npu-cores member / member · npu-cores, neural processor (framework-128gb silicon) (pull_request) Successful in 1m13s
joule-moq-room room service / joule-moq-room, every target (pull_request) Successful in 1m9s
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 on every processor / emulated · armv7-unknown-linux-gnueabihf (pull_request) Successful in 2m57s
WAI conformance / delivery telemetry · CMCD and CMSD against an independent library (pull_request) Successful in 21s
wai-quantum CPU vector units / member · vector units, avx2 and avx512 (framework-128gb silicon) (pull_request) Successful in 10s
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Successful in 32s
wai-quantum on every processor / emulated · loongarch64-unknown-linux-gnu (pull_request) Successful in 3m41s
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Successful in 2m3s
wai-quantum on every processor / emulated · powerpc64-unknown-linux-gnu (pull_request) Successful in 5m15s
standards workspaces build + test / joule-code-rs (joule-code/joule-code-rs, joule-code-rs, linux-arm64, true) (pull_request) Successful in 4m19s
wai-quantum WebGPU member / member · integrated GPU, Vulkan (framework-128gb) (pull_request) Successful in 7m18s
wai-quantum on every processor / emulated · powerpc64le-unknown-linux-gnu (pull_request) Successful in 5m53s
wai-quantum WebGPU member / member · DX12 and Vulkan (cbio-windows) (pull_request) Successful in 12m12s
wai-quantum on every processor / emulated · riscv64gc-unknown-linux-gnu (pull_request) Successful in 3m58s
wai-quantum on every processor / emulated · s390x-unknown-linux-gnu (pull_request) Successful in 3m50s
wai-quantum on every processor / emulated · sparc64-unknown-linux-gnu (pull_request) Successful in 5m55s
wai-web reach builds / wai-web reach · does this change touch it (pull_request) Successful in 6s
wai-quantum on every processor / emulated · i686-unknown-linux-gnu (pull_request) Successful in 3m56s
wai-quantum WebGPU member / member · discrete GPU, Vulkan (jetson-hub) (pull_request) Successful in 18m49s
WAI conformance / quantum core and corpus under wasm32-wasip2 (wasmtime) (pull_request) Successful in 2m30s
joule-moq-web browser client / joule-moq-web · browser end-to-end (macos) (pull_request) Successful in 6m20s
WAI conformance / cross-arch byte-equality · linux (pull_request) Successful in 33s
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Successful in 12m25s
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Successful in 22m27s
wai-pack / wai-pack · linux-arm64 (pull_request) Successful in 1m41s
wai-pack / wai-pack · the floor through a media prober (pull_request) Successful in 38s
wai-pack / wai-pack · dependency licences (pull_request) Successful in 1m18s
wai-quantum HIP member / member · HIP absent (linux-arm64) (pull_request) Successful in 24s
wai-quantum npu-cores member / member · npu-cores absent (linux-arm64) (pull_request) Successful in 32s
wai-quantum tensor-engine member / member · tensor engine absent (linux-arm64) (pull_request) Successful in 24s
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Successful in 26m33s
wai-pack / wai-pack · independent verifier (Python) (pull_request) Successful in 4m34s
WAI energy receipts / energy receipts · linux (pull_request) Successful in 8m35s
WAI conformance / cargo-class corpora · linux (pull_request) Successful in 18m57s
WAI JPEG-AI whole decode (pinned inputs, required) / fetch pinned JPEG-AI inputs → whole decode + pixel hash, required (pull_request) Successful in 7m7s
WAI conformance / cargo-class corpora · macos (pull_request) Successful in 16m48s
WAI conformance / cross-arch byte-equality · macos (pull_request) Successful in 23s
WAI neural sink gates / model-free refusals of the neural sink (pull_request) Successful in 1m29s
wai-pack / wai-pack · linux (pull_request) Successful in 1m23s
wai-quantum CUDA member / member · CUDA absent (linux) (pull_request) Successful in 22s
WAI conformance / codec wrappers · fuzz smoke, text decode limits, C entry points, provenance, the semantic path (pull_request) Successful in 1m6s
wai-quantum dataflow member / member · dataflow device, simulated (pci 1e52:b140) (pull_request) Successful in 3m38s
wai-quantum dataflow member / member · dataflow device, simulated (pci 1e52:401e) (pull_request) Successful in 4m49s
wai-quantum FPGA member / member · FPGA simulation absent (linux) (pull_request) Successful in 21s
wai-quantum Metal member / member · Metal absent (linux) (pull_request) Successful in 24s
wai-quantum neural-processor member / member · neural processor absent (linux) (pull_request) Successful in 22s
wai-quantum OpenCL member / member · OpenCL absent (linux) (pull_request) Successful in 21s
wai-quantum-qpu / clients against their contracts (linux) (pull_request) Successful in 21s
wai-quantum service / service · linux (pull_request) Successful in 50s
wai-quantum matrix-extension member / member · matrix extension, emulated (aarch64 Linux) (pull_request) Successful in 20s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 8m9s
WAI energy receipts / energy receipts · macos (pull_request) Successful in 7m10s
wai-quantum tensor-engine member / member · tensor engine, the kernel toolchain's simulator (linux) (pull_request) Successful in 8m58s
wai-pack / wai-pack · macos (pull_request) Successful in 1m16s
wai-quantum portable tensor program / tensor program · CPU, mutants, GPU builds (pull_request) Successful in 31s
wai-quantum dataflow member / member · dataflow device absent (macos) (pull_request) Successful in 18s
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 29s
wai-quantum signal processor / processor and member · signal processor, emulated (pull_request) Successful in 14m50s
wai-quantum CPU vector units / member · vector unit, rvv 128-bit (riscv64, emulated) (pull_request) Successful in 14s
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 18s
wai-quantum FPGA member / member · FPGA datapath, simulated (macos) (pull_request) Successful in 1m22s
wai-quantum CPU vector units / member · vector unit, sve 512-bit (aarch64, emulated) (pull_request) Successful in 20s
wai-quantum Metal member / member · Metal (macos) (pull_request) Successful in 31s
wai-quantum WebGPU member / member · software Vulkan (linux) (pull_request) Successful in 2m20s
wai-quantum WebGPU member / shader checks · browser build · wasip2 inertness · MSRV (pull_request) Successful in 3m16s
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Successful in 3m9s
wai-quantum neural-processor member / member · neural processor (macos) (pull_request) Successful in 5m57s
wai-quantum OpenCL member / member · OpenCL GPU (macos) (pull_request) Successful in 24s
wai-quantum service / service · macos (pull_request) Successful in 47s
wai-quantum matrix-extension member / member · matrix extension absent (macos) (pull_request) Successful in 12s
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Successful in 5m39s
wai-quantum portable tensor program / tensor program · Metal and the arm64 CPU (macos) (pull_request) Successful in 19s
wai-quantum CPU vector units / member · vector unit absent (macos) (pull_request) Successful in 14s
wai-web reach builds / wai-web reach builds · the package of record, every output as recorded (pull_request) Successful in 3m4s
wai-quantum WebGPU member / member · Metal (macos) (pull_request) Successful in 2m50s
wai-web reach builds / wai-web reach builds · this tree's wai-web, every rung on its engine line (pull_request) Successful in 4m46s
wai-quantum WebGPU member / member · browser WebGPU (macos) (pull_request) Successful in 2m2s
wai-quantum 0.6.9: cut-rank amplitudes with the circuit's own global phase
PhasedTableau tracks one basis state of a stabilizer state's support and its
exact amplitude (2^{-k/2} e^{iπm/4}) through every gate; a Hadamard reads the
stabilizer whose X part is the one qubit. ProductMeasured gains with_last and
scale. The service's cutrank method scales its amplitudes by e^{iΘ} a/b (the
lowering's dropped phase, the tracked amplitude, the graph form's at the same
basis state), so they carry the circuit's own global phase; auto tries cutrank
for amplitudes. Tests against the dense state vector, phase included; three
mutants caught. Version 0.6.9 in every lockfile that pins it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 03:31:32 -04:00
..
src
tests
Cargo.lock
Cargo.toml
README.md

wai-quantum-qpu

Quantum processors as members of the wai-quantum fabric: clients for the services that run circuits on them.

For every circuit, a QpuSampler:

  1. reads the device's native gates and connectivity from the service;
  2. compiles the circuit to them exactly, with wai_quantum::quantum_toolchain::native, and checks the program against the circuit by simulation before anything is sent;
  3. submits it, waits for the job, and reads the counts back onto the circuit's qubits: logical qubit i is measured into classical bit i, which is bit i of the counts' index, whatever physical qubit it ended on.

QpuSampler::member certifies the device statistically against the exact distribution of every circuit of a corpus, as the fabric certifies any sampler. Its certificates carry the device's provenance: silicon for a processor, a simulator for a service's simulator. Placement ranks a simulator after silicon.

Services

Module Protocol Native gates Angles on the wire
sampler_v2 Sampler V2 jobs: an IAM bearer token, one OpenQASM 3 circuit per job rz, sx, x, cz on physical qubits $p radians
prx_circuits circuit jobs of native instructions on named qubits, one measurement key per classical bit prx, cz radians
native_turns circuit jobs in a native gateset that runs as written; a simulator with device noise models gpi, gpi2, zz turns, so every dyadic angle is exact

Each module's BASE constant is the endpoint it is written against. Each client is configured from the environment (from_env) or in code. Keys and tokens are held in Secret, which never prints:

Module Variables
sampler_v2 WAI_QPU_SAMPLER_API_KEY, WAI_QPU_SAMPLER_CRN, WAI_QPU_SAMPLER_BACKEND
prx_circuits WAI_QPU_PRX_TOKEN, WAI_QPU_PRX_QC
native_turns WAI_QPU_TURNS_KEY, WAI_QPU_TURNS_BACKEND (default simulator), WAI_QPU_TURNS_NOISE
use wai_quantum_qpu::{QpuSampler, check_probe, probe_circuit, transport::Curl};
use wai_quantum_qpu::native_turns::NativeTurns;

let sampler = QpuSampler::new(NativeTurns::from_env(Curl::new(120))?)?;
// The first job on any service: an X on qubit 0, whose counts must land on index 1.
let (counts, job) = sampler.run(&probe_circuit(3), 1000)?;
check_probe(&counts, 0.95)?;

The command

wai-qpu device  <service>                          # the device: qubits, basis, provenance
wai-qpu probe   <service> [--qubits N] [--shots N] # the bit-order probe
wai-qpu certify <service> [--shots N] [--cases N] [--report FILE] [--yes]

<service> is sampler-v2, prx-circuits or native-turns, configured from its variables above. A certification runs every circuit of the corpus in both gatesets as a job. On a device whose provenance is silicon that spends the service's quota, so it runs only with --yes. --report writes each certificate with its hash, and every job, as JSON.

Transport

transport::Curl runs curl as a program, so the crate carries no TLS stack. Headers, keys and tokens included, go in a curl configuration file that only this user can read, removed when the request ends. The body goes on curl's standard input. Nothing secret appears on a command line. transport::Scripted answers from a function, for tests.

What is checked here, and what only a service can check

The tests run each client against a service that follows that provider's published contract. The fake parses the submitted program in the provider's own format, runs it on the crate's simulator, and answers in the provider's result shape and bit order. A client whose request, units or bit order departs from the contract reads back the wrong distribution, and the tests fail. A probe test shows that a service using the other bit order is caught.

A real service settles its own conventions. The first job on each should be probe_circuit, checked with check_probe, before any other result is trusted.

The work runs at the service, so every run is unmetered here. An energy figure the service reports, such as a per-job estimate, is kept in the job record as the service's figure (JobRecord::service_kwh). It is never recorded as a measurement.

Every circuit a certification runs is a job on the service, and spends that service's quota.

Licence

Apache-2.0.