open-standards/wai/quantum-conformance
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Transaction Science 75898a5b97
Some checks failed
joule-moq-room room service / joule-moq-room · does this change touch it (push) Successful in 21s
joule-moq-remote host agent / joule-moq-remote · does this change touch it (push) Successful in 15s
wai-app and Create / wai-app · does this change touch it (push) Successful in 22s
wai-audit collector and player integration / does this change touch it (push) Successful in 18s
joule-moq-web browser client / joule-moq-web · does this change touch it (push) Successful in 1m2s
wai-quantum command line / does this change touch it (push) Successful in 22s
wai-ledger service / does this change touch it (push) Successful in 36s
wai-quantum editors / does this change touch it (push) Successful in 13s
wai-quantum other formats / does this change touch it (push) Successful in 14s
WAI operation catalogue / does this change touch it (push) Successful in 43s
wai-quantum contract / does this change touch it (push) Successful in 21s
wai-fleet service / does this change touch it (push) Successful in 42s
wai-quantum error correction and mitigation / does this change touch it (push) Successful in 17s
wai-quantum qudit jobs / does this change touch it (push) Successful in 23s
wai-quantum studio and desktop / does this change touch it (push) Successful in 16s
wai-quantum extension points / does this change touch it (push) Successful in 24s
wai-quantum verdicts and repairs / does this change touch it (push) Successful in 12s
wai-sink-android native sink library / does this change touch it (push) Successful in 16s
wai-sink-swift native sink package / does this change touch it (push) Successful in 15s
wai-quantum views in agent hosts / does this change touch it (push) Successful in 17s
WAI Studio / does this change touch it (push) Successful in 12s
wai-quantum docs, course and locales / does this change touch it (push) Successful in 1m33s
wai-quantum resource estimation / does this change touch it (push) Successful in 1m27s
wai-quantum pulse and dynamics / does this change touch it (push) Successful in 1m10s
wai-quantum OpenQASM reader / does this change touch it (push) Successful in 1m13s
wai-quantum service / does this change touch it (push) Successful in 59s
wai-quantum variational and algorithm library / does this change touch it (push) Successful in 54s
wai-quantum for Python / does this change touch it (push) Successful in 1m10s
wai-quantum for JavaScript / does this change touch it (push) Successful in 1m25s
wai-quantum service / service energy · linux packages (push) Successful in 2m4s
joule-moq-remote host agent / joule-moq-remote, every target (linux-arm64) (push) Successful in 2m22s
wai-quantum pulse and dynamics / the same bits · linux-arm64 (push) Successful in 2m46s
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (push) Successful in 7m5s
wai-quantum variational and algorithm library / parameters, gradients, optimisers, VQE, QAOA and builders · linux-arm64, release (push) Successful in 3m19s
wai-sink-android native sink library / the JNI layer and the platform-free half on the host JVM · linux-arm64 (push) Successful in 5m8s
joule-moq-room room service / joule-moq-room, every target (push) Successful in 6m52s
wai-quantum extension points / the registry and the example · linux-arm64 (push) Successful in 6m26s
WAI breaking changes and the conformance runner / WAI breaking · does this change touch WAI (push) Successful in 27s
wai-app and Create / wai-app · tests, clippy, the line language's verifier (linux) (push) Successful in 33s
wai-quantum energy-landscape jobs / does this change touch it (push) Successful in 24s
wai-quantum contract / the policy is linked, and the deprecations page reads (push) Successful in 16s
wai-quantum other formats / the set under wasm32-wasip2 (wasmtime) (push) Successful in 3m10s
wai-audit collector and player integration / collector · linux (push) Successful in 3m58s
wai-quantum wasmQ / does this change touch it (push) Successful in 11s
wai-ledger service / service · linux (push) Successful in 3m45s
wai-quantum other formats / readers, writers and the set · linux (push) Successful in 4m46s
wai-quantum qudit jobs / the module and the conformance set under wasm32-wasip2 (wasmtime) (push) Successful in 2m29s
wai-quantum contract / API compatibility · linux (push) Successful in 5m16s
wai-quantum error correction and mitigation / codes, decoders, texts and mitigation · linux, release (push) Successful in 3m20s
wai-fleet service / service · linux (push) Successful in 6m2s
wai-quantum extension points / the registry under wasm32-wasip2 (wasmtime) (push) Successful in 2m10s
wai-quantum verdicts and repairs / verdicts, repairs and the intent set · linux (push) Successful in 2m21s
wai-quantum editors / editors · linux (push) Successful in 8m41s
wai-quantum extension points / the registry and the example · linux (push) Successful in 4m40s
WAI operation catalogue / the catalogue and every door · linux (push) Successful in 9m15s
WAI Studio / the catalogue's actions, the unit tests and the core · linux (push) Successful in 1m16s
wai-quantum qudit jobs / the module, the job, the conformance set, the referee and the verb · linux (push) Failing after 6m56s
wai-quantum verdicts and repairs / the intent set and the verdict under wasm32-wasip2 (wasmtime) (push) Successful in 3m20s
wai-quantum docs, course and locales / the Studio's words in every locale · linux (push) Successful in 31s
wai-quantum contract / schemas and the committed tool lists · linux (push) Successful in 9m12s
wai-quantum studio and desktop / studio · browser (push) Successful in 6m53s
wai-quantum views in agent hosts / views · the page and its engine (push) Successful in 4m12s
wai-quantum OpenQASM reader / corpus under wasm32-wasip2 (wasmtime) (push) Successful in 53s
wai-quantum pulse and dynamics / reader, simulator and pulse jobs under wasm32-wasip2 (wasmtime) (push) Successful in 1m12s
wai-quantum docs, course and locales / the course and the command line's languages · linux (push) Successful in 3m32s
wai-quantum energy-landscape jobs / the same bits · linux-arm64 (push) Successful in 12m52s
wai-quantum pulse and dynamics / reader, simulator and pulse jobs · linux, release (push) Successful in 3m15s
wai-quantum variational and algorithm library / parameters, gradients, optimisers, VQE, QAOA and builders · linux, release (push) Successful in 3m50s
wai-quantum for Python / python · linux (push) Successful in 4m23s
wai-quantum for JavaScript / javascript · linux (push) Successful in 4m19s
wai-quantum OpenQASM reader / reader and corpus · linux (push) Successful in 6m2s
wai-quantum studio and desktop / desktop app · linux (push) Successful in 12m42s
wai-quantum service / service · linux (push) Failing after 6m41s
wai-quantum views in agent hosts / views · a scripted host (push) Successful in 10m12s
WAI Studio / Studio in WebKit · linux (push) Successful in 12m36s
wai-quantum resource estimation / estimation and calibration · linux, release (push) Successful in 12m48s
wai-quantum studio and desktop / desktop app · windows (push) Successful in 10m15s
joule-moq-remote host agent / joule-moq-remote, every target (macos) (push) Successful in 3m45s
wai-audit collector and player integration / collector, player integration and the browser end to end · macos (push) Successful in 4m21s
wai-quantum command line / command line · macos (push) Successful in 3m3s
wai-app and Create / wai-app · Create, browser end-to-end (macos) (push) Successful in 10m0s
wai-quantum command line / command line · linux (push) Failing after 52m54s
wai-fleet service / service · macos (push) Successful in 57s
wai-ledger service / service · macos (push) Successful in 2m37s
wai-quantum editors / editors · macos (push) Successful in 2m11s
wai-quantum docs, course and locales / every command and snippet in the docs · linux (push) Successful in 45m7s
wai-quantum qudit jobs / the same bits · macos (push) Successful in 3m43s
WAI breaking changes and the conformance runner / WAI breaking · wire, record and API against main · linux (push) Failing after 2m15s
wai-quantum studio and desktop / desktop app · macos (push) Successful in 5m55s
wai-sink-android native sink library / every ABI, the AAR, and the instrumented tests in a headless emulator · macos (push) Successful in 7m55s
wai-quantum pulse and dynamics / the same bits · macos (push) Successful in 3m9s
wai-quantum wasmQ / the reference modules rebuild to their modules of record · linux (push) Successful in 46s
wai-quantum for Python / python · macos (push) Successful in 3m28s
joule-moq-web browser client / joule-moq-web · browser end-to-end (macos) (push) Successful in 16m57s
WAI breaking changes and the conformance runner / WAI breaking and conform · their tests, and the independent verifiers through wai conform · linux (push) Successful in 9m9s
wai-quantum wasmQ / profile, engines, reference modules, adversarial, vectors · linux (push) Successful in 4m15s
wai-quantum wasmQ / interpreter and vectors under wasm32-wasip2 (wasmtime) (push) Successful in 4m10s
wai-quantum energy-landscape jobs / native against WebAssembly, over many seeds (push) Successful in 8m51s
WAI Studio / Studio in Chromium and Firefox · macos (push) Successful in 9m44s
wai-quantum energy-landscape jobs / reader, kernels, answers and the stated result · linux, release (push) Successful in 11m9s
wai-quantum service / service · macos (push) Successful in 8m15s
wai-sink-swift native sink package / libwai slices, desktop tests, simulator tests · macos (push) Successful in 17m35s
wai-quantum energy-landscape jobs / the module under wasm32-wasip2 (wasmtime) (push) Successful in 20m53s
wai-quantum energy-landscape jobs / the same bits · macos (push) Successful in 7m25s
wai-quantum wasmQ / profile, engines, reference modules, adversarial, vectors · macos (push) Successful in 2m12s
quantum-ops: the encoding in the text, four more records registered, and an unmetered form that never reads zero joules
quantum-ops named its records' fields and deferred everything else to the reference, so no
verifier could be written from the text, and it allowed `0` as the unmetered marker, which
quantum-landscape and wasmQ/2 forbid.

- extensions/quantum-ops.md §3, written from quantum_ops.rs and quantum_energy.rs: the
  primitives and their framing (§3.1), reading a receipt's JSON (§3.2), each kind's payload
  and Merkle leaves (§3.3), the identity (§3.4), the energy forms (§3.5), the reasons a
  verifier gives (§3.6), and the links and content hashes (§3.7). What is read and decides
  nothing is named: the written receipt_hash, a decode/compile/rearrange receipt's written
  merkle_root, an evidence summary (not sealed), members no text names.
- Registered: wai.quantum.mitigate, .decode, .compile, .rearrange (SPEC §5, quantum-ops §1.3
  to §1.6; registry.rs, the export regenerated). wai.quantum.qbom and .fabric are stated not
  to be part of the standard (quantum-ops §8) and stay unregistered with that reason. §5 of
  the text no longer names third-party tools.
- The unmetered form (quantum-ops §3.5, energy-measurement §2.8): quantum_energy::Unmetered,
  for every Labellable family (calibration, job, mitigation, decode, compile, rearrange,
  circuit, phasor, sparse-Pauli, resource). Under the 0x02 domain the figure 0 is followed by
  tag 0 and the reason (u32 BE length, UTF-8); its JSON writes joules_micro null beside
  energy_unmetered. MaybeLabelled gains the variant and unmetered()/joules_micro(), the
  latter never Some(0); an unlabelled 0 still verifies and reads as unmetered (legacy).
  wai_quantum_meter and wai-quantum-serve seal unmetered runs in the new form, and serve's
  POST /verify verdict says why. quantum-sim's receipt text says so.
- Reading tightened where the JSON showed what the seal does not say: a member named twice
  (sig::unique_members), a kind of another family, rounds/swaps/atoms_moved past u32 (read
  before as their low 32 bits), a funds_ceiling that is no count and an optional hash that is
  no string (each read before as none) no longer read; a str()-framed string holding U+0000
  no longer verifies (two receipts could sign the same bytes).

Vectors (wai/quantum-ops-conformance): 12 receipts the reference made, every kind and every
energy form (the three earlier ones byte-identical), and 49 crafted by generate.py, each one
defect away or one change that decides nothing, with hand-written reasons. ops_verify.py,
written from §3 alone and sharing no code with the engine, gives the 12 their identities and
the 49 their exact reasons; wai_quantum_ops_vectors verify gives all 61 their verdicts and
stages. CI: the corpus's verify in cargo-classes as before; ops_verify.py and
generate.py --check as a new independent verifier (verifiers/quantum-ops.sh).

Failing first: the crafted receipts given to the reader before this change (origin/main
1f5bc7225, a scratch test over MaybeLabelled::from_json and verify) verified nine of the
defects this change refuses: a member named twice (plain and escaped), a calibration whose
kind is a job's, one with no kind, rounds of 2^32 + 1 sealed as 1, a funds_ceiling "50"
sealed as none, a parent_receipt_hash of 0 sealed as none, and a device_id and a grant
capability holding U+0000. The six crafted receipts of the unmetered form did not read
there, since the form did not exist.

Tested on the build host: wai-quantum --features full --lib --tests (lib 1560 passed, 26
ignored; every integration test passed, landscape_conformance's 54 among them); default
features (127), quantum_ops alone (51), quantum_receipt alone (50); wai-rs with the
energy-receipts workflow's feature set, --lib --bins --test video_receipt (906, 4, 15, 130);
wai-rs codecs::registry (15) and `wai registry export --check`; wai-quantum-serve (12);
wai-quantum-cli's test build; wai-web cargo check; wai_quantum_ops_vectors verify and
ops_verify.py on the corpus; clippy: no finding on a changed file of wai-quantum, serve or
the two wai-rs bins. Locally: check-wai-section-refs, check-spec-refs,
check-wai-quantum-names, check-public-names --maintainer-products-only,
changelog-assemble --check, check-tests-in-ci, check-wai-core-freeze,
wai-conformance-lists check, check-wai-corpus-licences: clean. wai breaking against main:
the two breaks the changelog entry acknowledges.

quantum_ops.rs is one of the sources the wasmQ modules of record pin
(quantum-conformance/wasmq/modules/modules.json): its digest is updated, and on x86_64
Linux (build.sh --check) both modules still build byte for byte as committed.

Rebased on 15b7f810d: the registry export is up to date, and the registry, ops, energy,
pins and sig tests, serve's tests and wai_quantum_ops_vectors verify pass again.

Changelog entry: wai/changes/2026-11-10-quantum-ops-encoding-and-unmetered-form.md

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-10 15:30:53 -05:00
..
accept wai-quantum circuit2: the number range decided on the literal's digits in both readers 2026-10-09 18:50:35 -04:00
answers wai-quantum 0.9.0: two breaks since 0.8.1 raise its 0.y, a job is Send again, and every pin the version moves 2026-11-07 12:44:24 -05:00
eval wai-quantum: a model scored by the engine on a task set, and each answer counted in tokens four ways 2026-10-28 08:42:54 -04:00
fabric wai-quantum WebGPU member: tile review fixes 2026-10-11 23:12:21 -04:00
formats determinism-tiers §5: CI validates the browser packages; the READMEs run CI's wasmtime 2026-11-04 12:29:00 -05:00
intents determinism-tiers §5: CI validates the browser packages; the READMEs run CI's wasmtime 2026-11-04 12:29:00 -05:00
landscape wai-quantum: a landscape member declares its capacity, and is held to everything within it 2026-11-09 15:49:07 -05:00
native wai-quantum: devices whose two-qubit gate is XX(θ), and star devices whose qubits move into a resonator 2026-11-10 14:07:59 -05:00
qasm3 wai-quantum: qelib1.inc's remaining gates, and an import corpus of exported programs with their outcome probabilities 2026-11-10 14:34:21 -05:00
qec-text wai-quantum: the rest of the review's fixes on the reader-scaling branch 2026-11-07 01:44:51 -05:00
qudit wai-quantum: qudits of 4 and 6 levels, every constant exact or the nearest value, and qudit jobs in the engine 2026-11-10 15:14:59 -05:00
receipts Landscape receipts in the corpus, judged by form by both verifiers 2026-11-10 15:19:26 -05:00
reject wai-quantum circuit2: the number range decided on the literal's digits in both readers 2026-10-09 18:50:35 -04:00
tools Landscape receipts in the corpus, judged by form by both verifiers 2026-11-10 15:19:26 -05:00
v2 wai-quantum circuit2: wai-rs registers circuit2 and carries the corpus in both capabilities 2026-10-09 12:38:07 -04:00
vectors wai-quantum circuit2: wai-rs registers circuit2 and carries the corpus in both capabilities 2026-10-09 12:38:07 -04:00
wasmq quantum-ops: the encoding in the text, four more records registered, and an unmetered form that never reads zero joules 2026-11-10 15:30:53 -05:00
browser_verify.mjs wai-quantum circuit2: a strict I-JSON reader, the rules stated in full, an accept corpus 2026-10-09 17:46:02 -04:00
browser_webgpu.mjs wai-quantum WebGPU member: tile runs, a second implementation certified on its own 2026-10-11 17:01:16 -04:00
expected_hashes.json wai-quantum circuit2: wai-rs registers circuit2 and carries the corpus in both capabilities 2026-10-09 12:38:07 -04:00
README.md wai-quantum: qudits of 4 and 6 levels, every constant exact or the nearest value, and qudit jobs in the engine 2026-11-10 15:14:59 -05:00

quantum-conformance

Statevector-equivalence for both capabilities of the quantum-sim extension (../extensions/quantum-sim.md): given the same WQC circuit, a conforming sink MUST reconstruct the identical fixed-point statevector — hash equality, no tolerance.

Provenance. Generated here by wai_quantum_vectors from circuits authored in code. No media.

Four trees, each a pinned corpus:

tree capability what
vectors/ + expected_hashes.json wai.quantum.circuit (WQC1) bell, ghz3, qft3 and qft5, frozen as they were first written, then qft5_x22, dyadic_ladder and qft8_ones
v2/vectors/ + v2/expected_hashes.json wai.quantum.circuit2 (WQC2) the same seven circuits; each entry names its capability
reject/ + reject/reject.json both payloads a conforming reader refuses, each with the class it is refused as: malformed, contract or invalid (extension §2)
accept/ + accept/accept.json both payloads a conforming reader accepts, at the edges of the same rules, each with how it reads: capability, n_qubits, op count, circuit hash and measurement (extension §2)

The OpenQASM 3 reader's corpus, programs with what the reader must do with each, is qasm3/, with a README of its own. The error-correction text formats (noisy Clifford circuits and detector error models, read and written back byte for byte, with what each must count and what must be refused) are qec-text/, with a README of its own. Programs that call WebAssembly between their gates (wai.quantum.wasmq), the reference modules of record and what a runner refuses are wasmq/, with a README of its own. Programs in other formats (QIR under its profiles, and jeff), each with the program it must read to, its round trip and its refusals, and OpenQASM written to each, are formats/, with a README of its own.

Circuits compiled to devices' own gates (the prx rz xx basis, and star devices whose qubits move into a computational resonator), each program pinned, proved the circuit's unitary by the engine's equivalence check, or refused as it says, are native/, with a README of its own.

Energy-landscape jobs (../extensions/quantum-landscape.md) are landscape/: the vectors a member is held to, the published table, the stated result and the script that checks it, with a README of its own.

Qudit jobs (../extensions/quantum-sim.md §9: registers of 2, 3, 4 or 6 levels) are qudit/: each dimension's constants, the answers every host gives bit for bit, and the requests a host refuses, with a README of its own and a second implementation in Python (tools/qudit_referee.py).

Job receipts, as the provider protocol's §8 states them (the seal, its strict reader and signature, and the rules of a provider's result), are receipts/, with a README of its own: receipts the command line, the job service and every built-in provider kind made, and receipts crafted to break one rule each, judged by wai-quantum verify and by a second verifier written from §8 alone (tools/receipt_verify.py), held to each other by tools/receipt_differential.py.

An entry with no capability is a wai.quantum.circuit vector. The trees are the one reference all three surfaces are checked against, rather than being checked against each other.

Native

cargo build --release --no-default-features --features quantum --bin wai_quantum_vectors
./target/release/wai_quantum_vectors verify wai/quantum-conformance

WASI (the edge)

Same binary, same source, different architecture:

cargo build --release --target wasm32-wasip2 --no-default-features --features quantum \
  --bin wai_quantum_vectors
wasmtime run -W nan-canonicalization=y -W relaxed-simd-deterministic=y --dir wai/quantum-conformance::/corpus \
  target/wasm32-wasip2/release/wai_quantum_vectors.wasm verify /corpus

CI runs this leg as a debug build, so integer overflow panics instead of wrapping (wai-conformance.yml, job quantum-wasip2, which also runs the crate's bit_identity tests and the circuit core's unit tests under wasmtime).

Browser

node wai/quantum-conformance/browser_verify.mjs [path/to/quantum-ml/pkg] [module file]

Drives the deployed wasm-bindgen bundle in headless Chromium: the sink opens every file of both vector trees to its manifest entry, refuses every reject file with its listed class and reads every accept file as listed (the two 255-qubit accept files only to the simulate stage: the sink simulates on construction, so they are checked to be read, not compared), and the IDE builds its catalog circuits in each gateset to the matching manifest. It is run by hand, before the website deploys a bundle. Note that the IDE's statevector_hash_hex() is empty until run() is called — the circuit is built eagerly, the state is not.

Browser, on the fabric's WebGPU member

WAI_QUANTUM_WEBGPU_REQUIRE=1 node wai/quantum-conformance/browser_webgpu.mjs

Serves wai-web/demo and this directory on 127.0.0.1 and opens quantum_webgpu.html in Playwright's headless browser, with the quantum_webgpu bundle built into wai-web/demo/pkg-webgpu (wai-web/demo/README.md). The gate kernel runs on the page's WebGPU adapter, compiled by the browser's own WGSL compiler. The page must certify the kernel bit-exact for both gatesets on random-v1 and fabric-v1 with the digests fabric/expected.json pins (the CPU reference's), and run every vector of both trees to its statevector hash, on the per-gate implementation and again on the tile implementation fabric/expected.json names (the browser's compiler holds its barrier to WGSL's uniformity rules); refuse every reject file with its listed class; and refuse a circuit wider than the member holds. Without WAI_QUANTUM_WEBGPU_REQUIRE=1, a page offered no adapter is reported and passes. CI runs it on macOS (wai-quantum-webgpu.yml, job browser).

Referee

python3 -I wai/quantum-conformance/tools/referee.py wai/quantum-conformance

A second implementation of the extension in Python, integers only, sharing no code with the Rust reference. It derives both phase tables (circuit/1 by its recurrence, circuit2 by an interval-certified procedure) and requires their literal values and digests, and the extension's Appendix B to state the same; rebuilds every vector file byte for byte and recomputes every manifest entry; refuses every reject file with its listed class and by the rule its name states; accepts every accept file and reads it as listed; and requires dyadic_ladder to change its statevector hash under every ±1 change of every phase-table entry, in both tables. CI runs it on Linux (wai-conformance.yml, job independent-verifiers).

Scope

The corpus pins the container, the reader's refusals, the fixed-point arithmetic and both phase tables, where hash equality is the right bar. What it covers, and where it stops:

  • Every phase-table entry. Under either table, a change of ±1 to either component of any P(1..32), with H following re P(3), changes dyadic_ladder's statevector hash; the referee checks this on every run. A change of ±1 to H alone changes the hash of every vector that applies H.
  • The four original vectors see no P(k). They run the QFT from |0…0⟩, where every controlled phase acts on zero amplitudes, so no change to a P(k) entry moves their hashes except through H, which follows re P(3); the three vectors after them are there for that.
  • One control at most. No vector applies a gate with more than one control. Such gates appear in the reject tree, and in the accept tree as circuit/1's repeated control.
  • One measurement. The shot sampler is pinned by bell's measurement alone.

The floating-point layers (quantum_source, quantum_channel) are held to exact IEEE-754 bits by unit tests instead, since they have no WQC circuit to pin — see entropy_is_bit_identical_across_architectures.