open-standards/wai/wai-quantum-cli
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Transaction Science 95b3bc5f3e
All checks were successful
joule-moq-room room service / joule-moq-room · does this change touch it (pull_request) Successful in 5s
joule-moq-web browser client / joule-moq-web · does this change touch it (pull_request) Successful in 6s
standards workspaces build + test / which workspaces this change touches (pull_request) Successful in 5s
WAI conformance / does this change touch it (pull_request) Successful in 6s
WAI energy receipts / does this change touch it (pull_request) Successful in 5s
WAI JPEG-AI whole decode (pinned inputs, required) / does this change touch it (pull_request) Successful in 5s
WAI neural sink gates / does this change touch it (pull_request) Successful in 5s
wai-pack / wai-pack · does this change touch it (pull_request) Successful in 5s
wai-quantum command line / does this change touch it (pull_request) Successful in 5s
wai-quantum CUDA member / does this change touch it (pull_request) Successful in 5s
wai-quantum dataflow member / does this change touch it (pull_request) Successful in 5s
wai-quantum signal processor / does this change touch it (pull_request) Successful in 5s
wai-quantum FPGA member / does this change touch it (pull_request) Successful in 5s
wai-quantum HIP member / does this change touch it (pull_request) Successful in 5s
wai-quantum Metal member / does this change touch it (pull_request) Successful in 5s
wai-quantum npu-cores member / does this change touch it (pull_request) Successful in 5s
wai-quantum neural-processor member / does this change touch it (pull_request) Successful in 5s
wai-quantum OpenCL member / does this change touch it (pull_request) Successful in 6s
wai-quantum CUDA member / member · CUDA (jetson-hub) (pull_request) Successful in 24s
repository checks / lockfiles, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Successful in 53s
wai-quantum-qpu / does this change touch it (pull_request) Successful in 6s
wai-quantum service / does this change touch it (pull_request) Successful in 5s
wai-quantum HIP member / member · HIP (framework-128gb) (pull_request) Successful in 19s
wai-quantum studio and desktop / does this change touch it (pull_request) Successful in 5s
wai-quantum matrix-extension member / does this change touch it (pull_request) Successful in 7s
wai-quantum tensor-engine member / does this change touch it (pull_request) Successful in 6s
wai-quantum portable tensor program / does this change touch it (pull_request) Successful in 6s
wai-quantum CPU vector units / does this change touch it (pull_request) Successful in 6s
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 21s
wai-quantum portable tensor program / tensor program · GPUs (jetson-hub) (pull_request) Successful in 21s
wai-quantum on every processor / emulated · aarch64-unknown-linux-gnu (pull_request) Successful in 1m34s
wai-quantum npu-cores member / member · npu-cores, neural processor (framework-128gb silicon) (pull_request) Successful in 1m14s
joule-moq-room room service / joule-moq-room, every target (pull_request) Successful in 1m15s
wai-quantum OpenCL member / member · OpenCL GPU (framework-128gb) (pull_request) Successful in 12s
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 10s
WAI conformance / v2 vocabulary · manifests validate as stated (pull_request) Successful in 24s
wai-quantum on every processor / emulated · armv7-unknown-linux-gnueabihf (pull_request) Successful in 3m8s
wai-quantum on every processor / emulated · loongarch64-unknown-linux-gnu (pull_request) Successful in 3m45s
standards workspaces build + test / joule-code-rs (joule-code/joule-code-rs, joule-code-rs, linux-arm64, true) (pull_request) Successful in 4m26s
WAI conformance / delivery telemetry · CMCD and CMSD against an independent library (pull_request) Successful in 12s
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Successful in 30s
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Successful in 1m53s
wai-quantum on every processor / emulated · powerpc64-unknown-linux-gnu (pull_request) Successful in 5m20s
wai-quantum WebGPU member / member · integrated GPU, Vulkan (framework-128gb) (pull_request) Successful in 7m19s
wai-quantum on every processor / emulated · powerpc64le-unknown-linux-gnu (pull_request) Successful in 6m2s
wai-quantum WebGPU member / member · DX12 and Vulkan (cbio-windows) (pull_request) Successful in 12m13s
wai-quantum on every processor / emulated · riscv64gc-unknown-linux-gnu (pull_request) Successful in 4m10s
wai-quantum on every processor / emulated · s390x-unknown-linux-gnu (pull_request) Successful in 3m59s
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Successful in 8m23s
wai-pack / wai-pack · linux-arm64 (pull_request) Successful in 1m26s
wai-quantum on every processor / emulated · sparc64-unknown-linux-gnu (pull_request) Successful in 6m9s
wai-web reach builds / wai-web reach · does this change touch it (pull_request) Successful in 6s
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Successful in 18m8s
wai-quantum on every processor / emulated · i686-unknown-linux-gnu (pull_request) Successful in 4m9s
wai-pack / wai-pack · the floor through a media prober (pull_request) Successful in 19s
wai-quantum WebGPU member / member · discrete GPU, Vulkan (jetson-hub) (pull_request) Successful in 18m45s
wai-pack / wai-pack · dependency licences (pull_request) Successful in 1m10s
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 22s
wai-pack / wai-pack · independent verifier (Python) (pull_request) Successful in 3m50s
wai-quantum tensor-engine member / member · tensor engine absent (linux-arm64) (pull_request) Successful in 18s
WAI conformance / quantum core and corpus under wasm32-wasip2 (wasmtime) (pull_request) Successful in 2m18s
WAI conformance / cross-arch byte-equality · linux (pull_request) Successful in 31s
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Successful in 23m46s
WAI energy receipts / energy receipts · linux (pull_request) Successful in 9m34s
WAI conformance / cargo-class corpora · linux (pull_request) Successful in 18m43s
WAI JPEG-AI whole decode (pinned inputs, required) / fetch pinned JPEG-AI inputs → whole decode + pixel hash, required (pull_request) Successful in 6m34s
WAI neural sink gates / model-free refusals of the neural sink (pull_request) Successful in 1m19s
wai-pack / wai-pack · linux (pull_request) Successful in 1m34s
wai-quantum command line / command line · linux (pull_request) Successful in 1m15s
wai-quantum CUDA member / member · CUDA absent (linux) (pull_request) Successful in 23s
joule-moq-web browser client / joule-moq-web · browser end-to-end (macos) (pull_request) Successful in 5m34s
wai-quantum dataflow member / member · dataflow device, simulated (pci 1e52:b140) (pull_request) Successful in 3m37s
wai-quantum dataflow member / member · dataflow device, simulated (pci 1e52:401e) (pull_request) Successful in 4m26s
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 23s
wai-quantum neural-processor member / member · neural processor absent (linux) (pull_request) Successful in 18s
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 20s
wai-quantum service / service · linux (pull_request) Successful in 38s
wai-quantum matrix-extension member / member · matrix extension, emulated (aarch64 Linux) (pull_request) Successful in 18s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 7m27s
wai-quantum studio and desktop / studio · browser (pull_request) Successful in 2m13s
wai-quantum signal processor / processor and member · signal processor, emulated (pull_request) Successful in 14m2s
wai-quantum tensor-engine member / member · tensor engine, the kernel toolchain's simulator (linux) (pull_request) Successful in 8m16s
wai-quantum portable tensor program / tensor program · CPU, mutants, GPU builds (pull_request) Successful in 30s
wai-quantum CPU vector units / member · vector unit, rvv 1024-bit (riscv64, emulated) (pull_request) Successful in 18s
wai-quantum CPU vector units / member · vector unit, sve 128-bit (aarch64, emulated) (pull_request) Successful in 33s
wai-quantum CPU vector units / member · vector unit, rvv 128-bit (riscv64, emulated) (pull_request) Successful in 32s
wai-quantum CPU vector units / member · vector unit, sve 2048-bit (aarch64, emulated) (pull_request) Successful in 16s
wai-quantum CPU vector units / member · vector unit, avx2 (x86_64 silicon) (pull_request) Successful in 16s
wai-quantum CPU vector units / member · vector unit, sve 512-bit (aarch64, emulated) (pull_request) Successful in 17s
WAI conformance / cargo-class corpora · macos (pull_request) Successful in 12m31s
WAI conformance / cross-arch byte-equality · macos (pull_request) Successful in 18s
wai-quantum WebGPU member / member · software Vulkan (linux) (pull_request) Successful in 2m8s
WAI conformance / codec wrappers · fuzz smoke, text decode limits, C entry points, provenance, the semantic path (pull_request) Successful in 40s
wai-quantum WebGPU member / shader checks · browser build · wasip2 inertness · MSRV (pull_request) Successful in 3m10s
WAI energy receipts / energy receipts · macos (pull_request) Successful in 3m54s
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Successful in 4m7s
wai-pack / wai-pack · macos (pull_request) Successful in 1m0s
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Successful in 5m21s
wai-quantum command line / command line · macos (pull_request) Successful in 26s
wai-quantum dataflow member / member · dataflow device absent (macos) (pull_request) Successful in 12s
wai-quantum FPGA member / member · FPGA datapath, simulated (macos) (pull_request) Successful in 1m5s
wai-quantum Metal member / member · Metal (macos) (pull_request) Successful in 27s
wai-web reach builds / wai-web reach builds · the package of record, every output as recorded (pull_request) Successful in 2m47s
wai-web reach builds / wai-web reach builds · this tree's wai-web, every rung on its engine line (pull_request) Successful in 4m14s
wai-quantum neural-processor member / member · neural processor (macos) (pull_request) Successful in 5m36s
wai-quantum OpenCL member / member · OpenCL GPU (macos) (pull_request) Successful in 18s
wai-quantum service / service · macos (pull_request) Successful in 37s
wai-quantum matrix-extension member / member · matrix extension absent (macos) (pull_request) Successful in 9s
wai-quantum studio and desktop / desktop app · macos (pull_request) Successful in 1m57s
wai-quantum portable tensor program / tensor program · Metal and the arm64 CPU (macos) (pull_request) Successful in 13s
wai-quantum CPU vector units / member · vector unit absent (macos) (pull_request) Successful in 12s
wai-quantum WebGPU member / member · Metal (macos) (pull_request) Successful in 2m20s
wai-quantum WebGPU member / member · browser WebGPU (macos) (pull_request) Successful in 1m34s
wai-quantum-cli and the desktop app require wai-quantum 0.6.12
Their metal features turn on quantum_cutrank_metal, which 0.6.12 adds. 0.6.11 was not
published on its own; 0.6.12 carries it, and the changelog says so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 17:34:52 -04:00
..
release wai-quantum-cli: release builds for macOS, Linux and Windows, with a Homebrew formula and a Scoop manifest 2026-10-20 17:34:17 -04:00
src Quantum Studio: one interface for the browser and the desktop app, on the job service's engine 2026-10-20 17:34:16 -04:00
Cargo.lock wai-quantum 0.6.12: cheaper contraction trees, from V-cycles and tree annealing 2026-10-20 17:34:17 -04:00
Cargo.toml wai-quantum-cli and the desktop app require wai-quantum 0.6.12 2026-10-20 17:34:52 -04:00
README.md wai-quantum-cli: release builds for macOS, Linux and Windows, with a Homebrew formula and a Scoop manifest 2026-10-20 17:34:17 -04:00
smoke.sh wai-quantum-cli: the command line on the job service's engine, installable 2026-10-20 17:34:16 -04:00

wai-quantum

The command line of the WAI quantum stack. It runs OpenQASM programs on this machine, planned and run by the same engine as the quantum job service (wai_quantum::engine), so a job gives the same result here as there. It also sends programs to the service, checks and draws them, verifies receipts, and serves its tools to agents over MCP.

Installing it

Where How
Any platform with Rust cargo install wai-quantum-cli (installs the wai-quantum binary)
macOS or Linux, with Homebrew brew tap transaction-science/tap https://git.transaction.science/Transaction-Science/homebrew-tap then brew install wai-quantum
Windows, with Scoop scoop bucket add transaction-science https://git.transaction.science/Transaction-Science/scoop-bucket then scoop install wai-quantum
Anywhere a prebuilt archive from the releases tagged wai-quantum-cli-v…

The prebuilt archives are:

  • macOS for Apple silicon and for Intel, with the GPU state vector;
  • Linux for x86_64 and arm64, linked statically, so any distribution runs them;
  • Windows for x86_64.

Each archive has a .sha256 file beside it (shasum -a 256 -c). A tag wai-quantum-cli-v<version> builds them on the project's own runners (release/, .github/workflows/wai-quantum-cli-release.yml), and writes the Homebrew formula and the Scoop manifest for them.

Running a program

wai-quantum run bell.qasm --shots 1000
wai-quantum run prog.qasm -o "Z0 Z1" -o "0.5 X2" -a 000 -a 111
wai-quantum run prog.qasm --noise depolarizing_2q=0.01 --noise readout=0.02
wai-quantum run prog.qasm --method mps --option max_bond=128
cat prog.qasm | wai-quantum run --json > job.json

A program is OpenQASM 3, or the OpenQASM 2 forms in common use. The reader accepts:

  • registers, and a gate applied to a whole register;
  • the standard gates;
  • ctrl and negctrl modifiers;
  • gate definitions;
  • measurement and reset anywhere, and if on measured bits.

It refuses loops, inv and pow, giving the line of each.

--method auto (the default) picks the strongest method the program admits:

Method Takes
exact dyadic angles; the state vector, the same bits on every machine
statevector any angle
stabilizer Clifford circuits, to tens of thousands of qubits
mps matrix product states
pauli Pauli dynamics, for expectation values
tensor_network amplitudes
cutrank a Clifford circuit with a layer of rotations
density_matrix, trajectories noise

wai-quantum methods lists each method's reach in a job's memory here (--memory-gb, default 16).

Each result names:

  • its method, and why that method was chosen;
  • its accuracy class;
  • the counts, expectation values or amplitudes asked for;
  • its receipt.

Receipts

Every result is signed over the request and the result in their canonical JSON. The service signs with its key; this tool signs with this user's key:

  • --key FILE, or $WAI_QUANTUM_KEY, names a file holding the key;
  • otherwise the key is $XDG_CONFIG_HOME/wai/quantum-key, or ~/.config/wai/quantum-key. It is made from the system's random source on first use and is readable by its owner only.

wai-quantum key prints the key's did:key. --demo-key signs with the published demo key. Its receipts show only that a result is unaltered, not who signed it.

wai-quantum run prog.qasm --json > job.json
wai-quantum verify job.json              # VALID, and the signer's did:key
wai-quantum submit prog.qasm --json > svc.json
wai-quantum verify svc.json              # the same check on the service's receipt

A receipt shows that this key signed this request and this result, and anyone can rerun the request to compare. It does not say who holds the key.

Checking and drawing

wai-quantum lint prog.qasm               # ok, with its shape, or the line of the first problem
wai-quantum plan prog.qasm               # the method and why, the memory and work, without running
wai-quantum draw prog.qasm --width 80
q0: ─────H─────●──M0──────
               │
q1: ───────────⊕──●───M1──
                  │
q2: ──Rz(π/4)─────⊕───M2──

The service

wai-quantum submit sends a job to https://wai.transaction.science/quantum-jobs, or to --service URL (also read from $WAI_QUANTUM_SERVICE). It waits for a long job to finish, then prints the result just as run does.

For agents

wai-quantum mcp is a Model Context Protocol server on standard input and output. Its tools are:

  • run_quantum_circuit
  • plan_quantum_circuit
  • lint_qasm
  • draw_circuit
  • verify_quantum_result
  • list_methods

Runs happen on this machine and are signed with this user's key; nothing is sent anywhere. In an MCP client's configuration:

{ "mcpServers": { "wai-quantum": { "command": "wai-quantum", "args": ["mcp"] } } }

The research tools

wai-quantum lab … holds the research tools:

  • algorithms from the catalogue, OpenQASM and QIR export, and receipts over them;
  • error correction at circuit level;
  • qLDPC memory;
  • fault-tolerant resource estimates and architectures;
  • DMRG, TDVP and molecules;
  • neural quantum states;
  • Gaussian boson sampling;
  • optimisation;
  • the compute fabric;
  • information and transport.

wai-quantum lab help lists them. wai-quantum verify also checks the receipts they sign.

Builds

  • Default: submit, over HTTPS.
  • --features metal: the single-precision state vector on the GPU (--method statevector_single), on macOS.
  • --no-default-features --target wasm32-wasip2: a WASI component without submit. It gives the same output under any WASI runtime.

wai-quantum completions zsh (or bash, fish, elvish, PowerShell) prints shell completion.