All checks were successful
wai-quantum CUDA member / member · CUDA (jetson-hub) (pull_request) Successful in 16s
wai-quantum OpenCL member / member · OpenCL GPU and CPU (jetson-hub) (pull_request) Successful in 37s
wai-quantum WebGPU member / member · discrete GPU, Vulkan (jetson-hub) (pull_request) Successful in 12m24s
spec citations resolve / Code cites no section its SPEC lacks (pull_request) Successful in 5s
standards workspaces build + test / arl-rs (pull_request) Successful in 1m12s
standards workspaces build + test / eoc-rs (pull_request) Successful in 2m4s
standards workspaces build + test / jcp-rs (pull_request) Successful in 1m38s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 1m29s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 1m19s
standards workspaces build + test / proof-rs (pull_request) Successful in 1m59s
standards workspaces build + test / sandbox-rs (pull_request) Successful in 2m39s
standards workspaces build + test / sense-rs (pull_request) Successful in 1m8s
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 1m27s
standards workspaces build + test / smart-byte-rs (pull_request) Successful in 4m13s
lockfiles / every Cargo.lock is current (pull_request) Successful in 32s
no-vanity-metrics / Scan committed Markdown for vanity metrics (pull_request) Successful in 4s
no-vanity-metrics / WAI public text names no comparison (pull_request) Successful in 4s
no-vanity-metrics / WAI public text names no company or product (pull_request) Successful in 4s
no-vanity-metrics / No new orphan source files (pull_request) Successful in 6s
WAI conformance / quantum core and corpus under wasm32-wasip2 (wasmtime) (pull_request) Successful in 2m17s
WAI conformance / v2 vocabulary · manifests validate as stated (pull_request) Successful in 14s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 6m31s
standards workspaces build + test / jouleclaw-rs (pull_request) Successful in 3m44s
WAI conformance / cargo-class corpora · linux (pull_request) Successful in 9m40s
standards workspaces build + test / joule-code-rs (pull_request) Successful in 1m37s
WAI conformance / delivery telemetry · CMCD and CMSD against an independent library (pull_request) Successful in 9s
WAI conformance / cross-arch byte-equality · linux (pull_request) Successful in 28s
standards workspaces build + test / aac-rs (pull_request) Successful in 2m58s
standards workspaces build + test / joulecontract-rs (pull_request) Successful in 58s
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Successful in 50s
standards workspaces build + test / map-rs (pull_request) Successful in 58s
standards workspaces build + test / mesh-rs (pull_request) Successful in 59s
tests in CI / every test file is run by a job or listed with its reason (pull_request) Successful in 5s
WAI energy receipts / energy receipts · linux (pull_request) Successful in 2m7s
WAI HTTP delivery / WAI HTTP · does this change touch it (pull_request) Successful in 5s
WAI HTTP delivery / HTTP corpus · falsify mutations 0/3 (pull_request) Has been skipped
WAI HTTP delivery / HTTP corpus · falsify mutations 1/3 (pull_request) Has been skipped
WAI HTTP delivery / HTTP corpus · falsify mutations 2/3 (pull_request) Has been skipped
WAI HTTP delivery / HTTP corpus · falsify patches 0/3 (pull_request) Has been skipped
WAI HTTP delivery / HTTP corpus · falsify patches 1/3 (pull_request) Has been skipped
WAI HTTP delivery / HTTP corpus · falsify patches 2/3 (pull_request) Has been skipped
WAI HTTP delivery / HTTP corpus · every patch and mutation in exactly one shard (pull_request) Has been skipped
WAI HTTP delivery / HTTP corpus · verified both ways, and the differential (pull_request) Has been skipped
WAI HTTP delivery / cache rules · controls and labelled caches (pull_request) Has been skipped
standards workspaces build + test / openpay (pull_request) Successful in 3m0s
WAI JPEG-AI whole decode (pinned inputs, required) / fetch pinned JPEG-AI inputs → whole decode + pixel hash, required (pull_request) Successful in 1m25s
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Successful in 26s
WAI conformance / cargo-class corpora · macos (pull_request) Successful in 7m48s
WAI neural sink gates / model-free refusals of the neural sink (pull_request) Successful in 1m15s
wai-pack / wai-pack · does this change touch it (pull_request) Successful in 5s
WAI conformance / cross-arch byte-equality · macos (pull_request) Successful in 21s
wai-quantum CUDA member / member · CUDA absent (linux) (pull_request) Successful in 20s
wai-quantum FPGA member / member · FPGA simulation absent (linux) (pull_request) Successful in 17s
WAI conformance / codec wrappers · fuzz smoke, text decode limits, C entry points, provenance, the semantic path (pull_request) Successful in 43s
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Successful in 2m10s
workflow hygiene / every workflow supersedes its own queue (pull_request) Successful in 5s
wai-quantum OpenCL member / member · OpenCL absent (linux) (pull_request) Successful in 20s
wai-quantum-qpu / clients against their contracts (linux) (pull_request) Successful in 19s
WAI energy receipts / energy receipts · macos (pull_request) Successful in 1m42s
wai-quantum FPGA member / member · FPGA datapath, simulated (macos) (pull_request) Successful in 1m11s
wai-quantum WebGPU member / shader checks · browser build · wasip2 inertness · MSRV (pull_request) Successful in 2m43s
wai-quantum OpenCL member / member · OpenCL GPU (macos) (pull_request) Successful in 21s
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Successful in 9m10s
wai-quantum WebGPU member / member · software Vulkan (linux) (pull_request) Successful in 1m57s
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Successful in 17m29s
wai-web reach builds / wai-web reach · does this change touch it (pull_request) Successful in 5s
wai-quantum WebGPU member / member · Metal (macos) (pull_request) Successful in 6m8s
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Successful in 3m22s
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Successful in 5m25s
wai-quantum WebGPU member / member · browser WebGPU (macos) (pull_request) Successful in 3m46s
wai-pack / wai-pack · linux (pull_request) Successful in 1m40s
wai-pack / wai-pack · the floor through a media prober (pull_request) Successful in 33s
wai-pack / wai-pack · linux-arm64 (pull_request) Successful in 2m23s
wai-pack / wai-pack · dependency licences (pull_request) Successful in 1m34s
wai-pack / wai-pack · independent verifier (Python) (pull_request) Successful in 4m47s
wai-pack / wai-pack · macos (pull_request) Successful in 3m30s
wai-web reach builds / wai-web reach builds · the package of record, every output as recorded (pull_request) Successful in 2m57s
wai-web reach builds / wai-web reach builds · this tree's wai-web, every rung on its engine line (pull_request) Successful in 5m3s
Breaking: Certificate gains a public field, provenance; a silicon certificate hashes exactly as before, and every pinned digest is unchanged. quantum_fabric now includes quantum_toolchain. - Provenance (silicon / emulator / simulator) inside the certificate hash; placement ranks silicon first. - Sampling members: the sample kernels, the Sampler trait, statistical certification on the qpu-v1 corpus, a virtual QPU, and a virtual device that compiles each circuit for its coupling map and native basis. - quantum_toolchain::device: OpenQASM 2/3 in standard gates only, multi- controlled gates lowered exactly, every qubit measured; counts read back. quantum_toolchain::native: rz/sx/x/cz, prx/cz and gpi/gpi2/zz (turns), routed over a coupling map and verified against the circuit by simulation. from_qasm reads ch. - The OpenCL member (quantum_fabric_opencl), bit-exact on GPUs and CPUs. - The FPGA member, simulated (quantum_fabric_fpga): a Verilog datapath compiled by Verilator at run time; certificates say simulator. - The dense f64 state vector on accelerators (quantum_fabric::sv64): the CPU's own launches with no fused multiply-add, on CUDA and on OpenCL devices with binary64, certified against a pinned digest. - wai-quantum-qpu 0.1.0: clients for three quantum processing protocols, the wai-qpu command, curl transport with secrets off command lines. - CI: OpenCL, FPGA and QPU-client workflows; the CUDA and OpenCL hardware jobs certify the f64 state vector; the hardware host declares its devices. Co-Authored-By: Claude Opus 5.5 <[email protected]>
65 lines
4.3 KiB
Markdown
65 lines
4.3 KiB
Markdown
# wai-quantum-qpu
|
|
|
|
Quantum processors as members of the [wai-quantum](../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` |
|
|
|
|
```rust
|
|
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
|
|
|
|
```text
|
|
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.
|