wai-quantum 0.6.10–0.6.11: the engine in the library, the command line and its release builds, Quantum Studio, and path-search restarts #371

Closed
dcharlot wants to merge 16 commits from wai/quantum-tn-restarts into main

2026-10-20

Transaction Science
wai-quantum-cli release workflow: a concurrency group per tag
All checks were successful
WAI energy receipts / energy receipts · macos (pull_request) Successful in 9m0s
wai-quantum portable tensor program / tensor program · CPU, mutants, GPU builds (pull_request) Successful in 27s
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 27s
wai-quantum CPU vector units / member · vector unit, rvv 128-bit (riscv64, emulated) (pull_request) Successful in 13s
wai-quantum CPU vector units / member · vector unit, sve 2048-bit (aarch64, emulated) (pull_request) Successful in 10s
wai-pack / wai-pack · macos (pull_request) Successful in 1m24s
wai-quantum tensor-engine member / member · tensor engine, the kernel toolchain's simulator (linux) (pull_request) Successful in 7m53s
wai-quantum CPU vector units / member · vector unit, avx2 (x86_64 silicon) (pull_request) Successful in 13s
wai-quantum CPU vector units / member · vector unit, sve 512-bit (aarch64, emulated) (pull_request) Successful in 14s
wai-quantum command line / command line · macos (pull_request) Successful in 41s
wai-quantum dataflow member / member · dataflow device absent (macos) (pull_request) Successful in 20s
wai-quantum FPGA member / member · FPGA datapath, simulated (macos) (pull_request) Successful in 1m28s
wai-quantum WebGPU member / member · software Vulkan (linux) (pull_request) Successful in 2m39s
wai-quantum Metal member / member · Metal (macos) (pull_request) Successful in 59s
wai-quantum WebGPU member / shader checks · browser build · wasip2 inertness · MSRV (pull_request) Successful in 3m50s
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Successful in 3m58s
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Successful in 5m24s
wai-quantum neural-processor member / member · neural processor (macos) (pull_request) Successful in 7m15s
wai-quantum OpenCL member / member · OpenCL GPU (macos) (pull_request) Successful in 31s
wai-quantum service / service · macos (pull_request) Successful in 45s
wai-quantum matrix-extension member / member · matrix extension absent (macos) (pull_request) Successful in 41s
wai-quantum studio and desktop / desktop app · macos (pull_request) Successful in 2m42s
wai-quantum portable tensor program / tensor program · Metal and the arm64 CPU (macos) (pull_request) Successful in 26s
wai-quantum CPU vector units / member · vector unit absent (macos) (pull_request) Successful in 23s
wai-quantum WebGPU member / member · Metal (macos) (pull_request) Successful in 4m6s
wai-quantum WebGPU member / member · browser WebGPU (macos) (pull_request) Successful in 2m12s
wai-web reach builds / wai-web reach builds · the package of record, every output as recorded (pull_request) Successful in 2m58s
wai-web reach builds / wai-web reach builds · this tree's wai-web, every rung on its engine line (pull_request) Successful in 4m15s
joule-moq-web browser client / joule-moq-web · browser end-to-end (macos) (pull_request) Successful in 7m20s
The workflow-hygiene check requires every workflow to have one. A re-pushed tag
now cancels the run before it, and its own run replaces any asset the cancelled
run had attached.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 14:28:20 -04:00
Transaction Science
wai-quantum tn: path search from independent restarts; the engine runs eight
Some checks failed
wai-quantum tensor-engine member / member · tensor engine absent (linux-arm64) (pull_request) Has been cancelled
wai-quantum portable tensor program / does this change touch it (pull_request) Has been cancelled
wai-quantum portable tensor program / tensor program · CPU, mutants, GPU builds (pull_request) Has been cancelled
wai-quantum portable tensor program / tensor program · GPUs (jetson-hub) (pull_request) Has been cancelled
wai-quantum portable tensor program / tensor program · integrated GPU (framework-128gb) (pull_request) Has been cancelled
wai-quantum portable tensor program / tensor program · Metal and the arm64 CPU (macos) (pull_request) Has been cancelled
wai-quantum CPU vector units / does this change touch it (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector unit, rvv 1024-bit (riscv64, emulated) (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector unit, sve 128-bit (aarch64, emulated) (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector unit, rvv 128-bit (riscv64, emulated) (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector unit, sve 2048-bit (aarch64, emulated) (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector unit, avx2 (x86_64 silicon) (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector unit, sve 512-bit (aarch64, emulated) (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector units, avx2 and avx512 (framework-128gb silicon) (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector unit absent (macos) (pull_request) Has been cancelled
wai-quantum WebGPU member / does this change touch it (pull_request) Has been cancelled
wai-quantum WebGPU member / shader checks · browser build · wasip2 inertness · MSRV (pull_request) Has been cancelled
wai-quantum WebGPU member / member · software Vulkan (linux) (pull_request) Has been cancelled
wai-quantum WebGPU member / member · Metal (macos) (pull_request) Has been cancelled
wai-quantum WebGPU member / member · discrete GPU, Vulkan (jetson-hub) (pull_request) Has been cancelled
wai-quantum WebGPU member / member · integrated GPU, Vulkan (framework-128gb) (pull_request) Has been cancelled
wai-quantum WebGPU member / member · browser WebGPU (macos) (pull_request) Has been cancelled
WAI mbt2018_mean integer decode (regenerated vectors) / does this change touch it (pull_request) Has been cancelled
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Has been cancelled
wai-web reach builds / wai-web reach · does this change touch it (pull_request) Has been cancelled
wai-web reach builds / wai-web reach builds · the package of record, every output as recorded (pull_request) Has been cancelled
wai-web reach builds / wai-web reach builds · this tree's wai-web, every rung on its engine line (pull_request) Has been cancelled
wai-web wasm32 / does this change touch it (pull_request) Has been cancelled
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Has been cancelled
wai-quantum WebGPU member / member · DX12 and Vulkan (cbio-windows) (pull_request) Has been cancelled
find_path_restarts runs find_path from several seeds side by side and keeps the
cheapest plan. The first restart uses the given seed, so the plan is never
costlier than one search. Each restart's seed depends only on its number, so the
plan does not depend on the thread count. In a browser tab the restarts run in turn.

On large networks the search's cost varies widely with its seed. More trials in one
search barely move it; independent restarts do. The other restarts' seeds come from
a generator of their own: seeds a multiple of the search generator's step apart would
start each search on another's stream a few steps on, and the restarts would repeat
one another, which a first version did.

The engine's tensor_network method runs 8 restarts natively and 1 in a tab, with a
job option path_restarts (1–64) to set it. examples/tn_cost takes RESTARTS.

The 61-qubit Nighthawk logical circuits, split and reduced, 1024 trials. log10 complex
multiply-adds for one amplitude:

  depth   1 search   8 restarts   24 restarts (wall time)
  8       5.33       5.33         5.26 (4 s)
  12      8.17       8.10         8.09 (7 s)
  16      11.24      11.11        11.11 (19 s)
  20      14.35      14.01        13.82 (33 s)

Test: restarts never cost more than one search, repeat their plan, and contract to the
dense state vector's amplitude.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 14:25:01 -04:00
Transaction Science
Quantum Studio: the circuit as a diagram, from the engine's layout
Some checks failed
wai-quantum tensor-engine member / member · tensor engine, the kernel toolchain's simulator (linux) (pull_request) Has been cancelled
wai-quantum tensor-engine member / member · tensor engine absent (linux-arm64) (pull_request) Has been cancelled
wai-quantum portable tensor program / does this change touch it (pull_request) Has been cancelled
wai-quantum portable tensor program / tensor program · CPU, mutants, GPU builds (pull_request) Has been cancelled
wai-quantum portable tensor program / tensor program · GPUs (jetson-hub) (pull_request) Has been cancelled
wai-quantum portable tensor program / tensor program · integrated GPU (framework-128gb) (pull_request) Has been cancelled
wai-quantum portable tensor program / tensor program · Metal and the arm64 CPU (macos) (pull_request) Has been cancelled
wai-quantum CPU vector units / does this change touch it (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector unit, rvv 1024-bit (riscv64, emulated) (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector unit, sve 128-bit (aarch64, emulated) (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector unit, rvv 128-bit (riscv64, emulated) (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector unit, sve 2048-bit (aarch64, emulated) (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector unit, avx2 (x86_64 silicon) (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector unit, sve 512-bit (aarch64, emulated) (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector units, avx2 and avx512 (framework-128gb silicon) (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector unit absent (macos) (pull_request) Has been cancelled
wai-quantum WebGPU member / does this change touch it (pull_request) Has been cancelled
wai-quantum WebGPU member / shader checks · browser build · wasip2 inertness · MSRV (pull_request) Has been cancelled
wai-quantum WebGPU member / member · software Vulkan (linux) (pull_request) Has been cancelled
wai-quantum WebGPU member / member · Metal (macos) (pull_request) Has been cancelled
wai-quantum WebGPU member / member · discrete GPU, Vulkan (jetson-hub) (pull_request) Has been cancelled
wai-quantum WebGPU member / member · integrated GPU, Vulkan (framework-128gb) (pull_request) Has been cancelled
wai-quantum WebGPU member / member · browser WebGPU (macos) (pull_request) Has been cancelled
WAI mbt2018_mean integer decode (regenerated vectors) / does this change touch it (pull_request) Has been cancelled
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Has been cancelled
wai-web reach builds / wai-web reach · does this change touch it (pull_request) Has been cancelled
wai-web reach builds / wai-web reach builds · the package of record, every output as recorded (pull_request) Has been cancelled
wai-web reach builds / wai-web reach builds · this tree's wai-web, every rung on its engine line (pull_request) Has been cancelled
wai-web wasm32 / does this change touch it (pull_request) Has been cancelled
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Has been cancelled
- engine::draw::layout: the drawing as data. It gives the qubits, the columns (each item's cells as [qubit, label], and whether a line joins them) and the legend of conditions, packed as the text drawing packs them. The packing moves into one function, which both forms use.
- wai-web's engine binding gains engine_layout, and the desktop app gains `layout`.
- The Studio draws the circuit as SVG from it:
  - wires, gate boxes, a control's dot joined to its target's ring, swaps;
  - measurements as meters with their bit, resets;
  - a gate under a condition with a dashed outline and the condition's number.
  Colours come from the page's tokens, each item has a title naming its gates and qubits, and the SVG has a text alternative. "Text" shows the text drawing to copy. Past 400 columns the diagram stops and says so.
- Tests: the layout of a circuit with a shared column, a joined CX and a conditioned gate; the binding's layout. The Studio test adds the diagram's glyphs and text alternative, and the Text toggle.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 14:02:27 -04:00
Transaction Science
wai-quantum-cli: release builds for macOS, Linux and Windows, with a Homebrew formula and a Scoop manifest
Some checks failed
wai-quantum on every processor / emulated · i686-unknown-linux-gnu (pull_request) Has been cancelled
wai-quantum-qpu / clients against their contracts (linux) (pull_request) Has been cancelled
wai-quantum service / service · linux (pull_request) Has been cancelled
wai-quantum service / service · macos (pull_request) Has been cancelled
wai-quantum matrix-extension member / member · matrix extension, emulated (aarch64 Linux) (pull_request) Has been cancelled
wai-quantum matrix-extension member / member · matrix extension absent (macos) (pull_request) Has been cancelled
wai-quantum studio and desktop / studio · browser (pull_request) Has been cancelled
wai-quantum studio and desktop / desktop app · macos (pull_request) Has been cancelled
wai-quantum tensor-engine member / member · tensor engine, the kernel toolchain's simulator (linux) (pull_request) Has been cancelled
wai-quantum tensor-engine member / member · tensor engine absent (linux-arm64) (pull_request) Has been cancelled
wai-quantum portable tensor program / tensor program · CPU, mutants, GPU builds (pull_request) Has been cancelled
wai-quantum portable tensor program / tensor program · Metal and the arm64 CPU (macos) (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector unit, rvv 1024-bit (riscv64, emulated) (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector unit, sve 128-bit (aarch64, emulated) (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector unit, rvv 128-bit (riscv64, emulated) (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector unit, sve 2048-bit (aarch64, emulated) (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector unit, avx2 (x86_64 silicon) (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector unit, sve 512-bit (aarch64, emulated) (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector unit absent (macos) (pull_request) Has been cancelled
wai-quantum WebGPU member / shader checks · browser build · wasip2 inertness · MSRV (pull_request) Has been cancelled
wai-quantum WebGPU member / member · software Vulkan (linux) (pull_request) Has been cancelled
wai-quantum WebGPU member / member · Metal (macos) (pull_request) Has been cancelled
wai-quantum WebGPU member / member · browser WebGPU (macos) (pull_request) Has been cancelled
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Has been cancelled
wai-web reach builds / wai-web reach · does this change touch it (pull_request) Has been cancelled
wai-web reach builds / wai-web reach builds · the package of record, every output as recorded (pull_request) Has been cancelled
wai-web reach builds / wai-web reach builds · this tree's wai-web, every rung on its engine line (pull_request) Has been cancelled
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Has been cancelled
wai-quantum WebGPU member / member · discrete GPU, Vulkan (jetson-hub) (pull_request) Has been cancelled
wai-quantum WebGPU member / member · integrated GPU, Vulkan (framework-128gb) (pull_request) Has been cancelled
A tag wai-quantum-cli-v<version> (the crate's version, checked) builds the
wai-quantum binary on the project's own runners and attaches each archive, with its
SHA-256, to the forge release of that tag:
- macOS: aarch64-apple-darwin and x86_64-apple-darwin, with the GPU state vector;
- Linux: x86_64- and aarch64-unknown-linux-musl, static, checked as such, so any
  distribution runs them;
- Windows: x86_64-pc-windows-msvc, as a zip.
Each binary runs once before it is packaged (--version, and a did:key from
`key --demo-key`). A last job writes the Homebrew formula and the Scoop manifest
from the attached SHA-256 files, leaving out a platform whose build attached nothing,
and attaches them too.

release/package.sh makes the archive (the binary, README and LICENSE; the same bytes
for the same inputs where GNU tar is there) and its .sha256. release/publish.sh
creates the release if no build has yet, replaces an asset of the same name, and
uploads over the private network, not the public tunnel. release/formulae.py writes
the formula and the manifest. The README says how to install it each way.

Checked here: package.sh on the macOS binary (the archive verifies against its
.sha256, unpacks, and runs); formulae.py against a stand-in release with three of the
five platforms attached (the formula holds those three, Ruby reads it, and the
manifest is the Windows one). The workflow itself runs on its first tag.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 13:53:56 -04:00
Transaction Science
Quantum Studio: data-embedded, for a host page with a heading of its own
Some checks failed
wai-quantum Metal member / member · Metal (macos) (pull_request) Has been cancelled
wai-quantum Metal member / member · Metal absent (linux) (pull_request) Has been cancelled
wai-quantum FPGA member / member · FPGA datapath, simulated (macos) (pull_request) Has been cancelled
wai-quantum FPGA member / member · FPGA simulation absent (linux) (pull_request) Has been cancelled
wai-quantum signal processor / processor and member · signal processor, emulated (pull_request) Has been cancelled
wai-quantum dataflow member / member · dataflow device, simulated (pci 1e52:b140) (pull_request) Has been cancelled
wai-quantum dataflow member / member · dataflow device, simulated (pci 1e52:401e) (pull_request) Has been cancelled
wai-quantum dataflow member / member · dataflow device absent (macos) (pull_request) Has been cancelled
wai-quantum CUDA member / member · CUDA absent (linux) (pull_request) Has been cancelled
wai-quantum command line / command line · linux (pull_request) Has been cancelled
wai-quantum command line / command line · macos (pull_request) Has been cancelled
wai-pack / wai-pack · linux (pull_request) Has been cancelled
wai-pack / wai-pack · macos (pull_request) Has been cancelled
WAI neural sink gates / model-free refusals of the neural sink (pull_request) Has been cancelled
WAI JPEG-AI whole decode (pinned inputs, required) / fetch pinned JPEG-AI inputs → whole decode + pixel hash, required (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · linux (pull_request) Has been cancelled
WAI conformance / quantum core and corpus under wasm32-wasip2 (wasmtime) (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · linux (pull_request) Has been cancelled
joule-moq-web browser client / joule-moq-web · browser end-to-end (macos) (pull_request) Has been cancelled
joule-moq-room room service / joule-moq-room, every target (pull_request) Has been cancelled
wai-quantum on every processor / emulated · armv7-unknown-linux-gnueabihf (pull_request) Successful in 59s
wai-quantum on every processor / emulated · loongarch64-unknown-linux-gnu (pull_request) Successful in 1m40s
WAI energy receipts / energy receipts · macos (pull_request) Successful in 6m58s
wai-quantum on every processor / emulated · powerpc64-unknown-linux-gnu (pull_request) Successful in 2m42s
wai-quantum on every processor / emulated · powerpc64le-unknown-linux-gnu (pull_request) Successful in 2m22s
wai-quantum on every processor / emulated · riscv64gc-unknown-linux-gnu (pull_request) Successful in 41s
wai-quantum on every processor / emulated · s390x-unknown-linux-gnu (pull_request) Successful in 2m21s
wai-quantum on every processor / emulated · sparc64-unknown-linux-gnu (pull_request) Successful in 3m11s
wai-quantum on every processor / emulated · i686-unknown-linux-gnu (pull_request) Successful in 2m54s
WAI energy receipts / energy receipts · linux (pull_request) Successful in 10m32s
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 13:38:39 -04:00
Transaction Science
Quantum Studio: an assistant on a local model, with the engine as its tools and every program checked before it is offered
The Assistant pane talks to a model on this machine: any server with the chat-completions interface and tool calls (the JouleClaw runtime, a llama.cpp server). Its address goes under "Model…", and nothing leaves the machine unless that address points elsewhere. In the desktop app the app itself makes the call (`chat` and `models` commands, http and https only).

- The model's tools are the Studio's engine: read the program, lint, draw, plan and run. Its first turn must call one, so every answer starts from the engine.
- Every program it proposes is read by the engine here. One that does not parse goes back once with the engine's reason. One that parses is run with the settings the model ran it with, so the counts it quoted are the counts shown, and then offered with Apply. A program the model ran through a tool but did not show is offered the same way.
- A figure in its prose that no tool returned is marked "Not from a run". LaTeX is shown as Unicode, and answers are plain text with bold and code built as nodes, never HTML.
- test/studio.test.mjs drives it against a scripted model server: the tool call run on the engine, a broken proposal sent back with its reason, the corrected one checked and run, the tools and the grounding rule in every call, and Apply.
- test/assistant-live.mjs drives it against a real server. Against a local 35B mixture-of-experts model (about 3B parameters active per token), every answer began with an engine call. The GHZ program it wrote was checked and run, with the counts it quoted equal to the counts shown, and a "50/50" it gave itself was marked as not from a run.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 13:38:39 -04:00
Transaction Science
Quantum Studio: one interface for the browser and the desktop app, on the job service's engine
wai/quantum-studio is an editor for OpenQASM programs with three places to run them: this browser (the engine in WebAssembly, in a worker), this computer (the engine built natively, in the desktop app), and the job service. Each returns the same job, and the Studio shows it the same way and checks its receipt where it runs. The same request and seed give the same counts in every place.

- The editor highlights OpenQASM, completes the standard gates and the program's own registers, marks the engine's diagnostics on their lines, and draws the circuit and shows the plan as the program is typed. Ctrl/⌘+Enter runs; Escape cancels.
- A result shows its method and why, its accuracy class, counts, expectation values, amplitudes with probability and phase, and a receipt naming whose key signed it, checked on this device, which can be downloaded. The program and the history of runs are kept on the device; a link carries the program in its fragment.
- It takes the host's design tokens (tokens.css when it stands alone) and follows the light and dark schemes.
- test/studio.test.mjs runs it in a browser: lint, draw and plan; a run checked here; an error on its line; any angle; the service giving the counts run here, shot for shot; Ctrl+Enter; the program and the history surviving a reload; no sideways scroll at a phone's width.

wai/wai-quantum-desktop is the app: the Studio's build around the engine natively. Each job runs in a process of its own (the binary as `worker`), so Cancel ends it and a large one cannot take the app with it. The worker plans and runs, and the app seals the answer with this user's key, the command line's. Jobs and programs are saved under ~/Documents/Quantum Studio/. `check` runs a Bell pair through the worker, sealed and verified, with no window.

engine::job splits into plan_and_run and seal (run is both), for hosts that run a job away from their key. wai-quantum-cli gains a library target for its key module, shared with the app.

.github/workflows/wai-quantum-studio.yml builds the engine's browser package, builds the Studio and runs its test, and on macOS runs the app's tests, clippy and check.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 13:38:28 -04:00
Transaction Science
wai-quantum engine in a page: one job function for every host, and the engine in the browser
- engine::job: a job planned, run, sealed with the host's key and returned
  in the service's form (run), its check (verify), a key's did:key (did_of)
  and a program's lint. The command line now calls these; the browser
  binding calls the same.
- engine::draw: the circuit drawer, moved from the command line.
- The engine runs on wasm32-unknown-unknown: a result there carries no
  elapsed_ms (a tab has no clock std reads), and the cut-rank order search
  runs its seeds in turn where there are no threads, finding the same orders.
- A program that measures in the middle on the state vector is admitted
  with the job's memory margin counted once, as trajectories count it, not
  once per state: two 256 MiB margins had left no room in 512 MiB, and the
  service refused a qubit it could hold.
- wai-web, feature quantum_engine (off by default, for the IDE's bundle):
  QuantumEngine (run, plan, methods, signer_did) signing with the page's
  key, and engine_lint, engine_draw and engine_verify. Tested natively and
  in wasm32 under Node, where a job runs and verifies, a changed result is
  refused, and every method a tab holds runs; wai-web-wasm.yml runs both
  with their counts.
- wai-rs: feature quantum_engine re-exports the engine as wai::engine.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 13:38:28 -04:00
Transaction Science
wai-quantum-cli: the command line on the job service's engine, installable
A new crate, wai-quantum-cli, whose binary is wai-quantum. It depends on the
wai-quantum library alone, so `cargo install wai-quantum-cli` can install it.

- run: an OpenQASM program planned and run as the service runs it
  (wai_quantum::engine), signed with this user's key; --json prints the job
  as the service returns it. Shots, seed, method, observables, amplitudes,
  noise and method options; an unknown flag or noise channel is an error.
- plan, lint (the line of the first problem), draw (the circuit as text,
  gates packed into columns, conditions in a legend).
- submit: the same job on the service (feature `service`, on by default),
  waiting for a long one.
- verify: a job's receipt from run, submit or the service, and every
  receipt the research tools sign; a changed result is INVALID.
- key: this user's did:key; --key FILE and --demo-key as before.
- methods: each method's reach in a job's memory here.
- mcp: run, plan, lint, draw, verify and the method list for an agent,
  over stdio; runs stay on this machine.
- lab: the earlier wai-quantum command, moved here from wai-rs unchanged
  (wai:: paths now wai_quantum::), its key handling shared with run.
- completions for bash, zsh, fish, elvish and PowerShell.
- Feature `metal`: the GPU state vector on macOS. With no default features
  it builds for wasm32-wasip2.

wai-rs loses the wai-quantum bin and its cli_keys feature. The wai README's
quickstart now uses the new crate. smoke.sh exercises every command, and
.github/workflows/wai-quantum-cli.yml runs the tests, clippy with and
without submit, smoke.sh, and the WASI component against the native build,
byte for byte; on macOS also a run on the GPU.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 13:38:28 -04:00
Transaction Science
wai-quantum engine: one receipt form for every host; an unknown noise channel refused; did_key
- engine::receipt is the service's receipt form, moved: a result sealed over
  the request and the result in their RFC 8785 canonical text, and checked.
  The service keeps its key file and seals with it; the command line seals
  with the user's key in the same form, and one verify checks both. The
  first receipts' form still verifies.
- A job's noise naming a channel the model does not know is refused with
  the channels it knows (catalog::NOISE_CHANNELS). It was read as no noise,
  so a misspelt channel ran the circuit noiseless.
- quantum_receipt::did_key: an Ed25519 key's did:key, held to the W3C
  method's example, for signers that depend on the library alone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 13:38:27 -04:00
Transaction Science
wai-quantum: the job service's engine in the library (feature quantum_engine)
The service's planner (catalog), runner (run) and dynamic-circuit walk
(dynamic) move unchanged into wai_quantum::engine, so every host that runs a
job plans and answers it as the service does. The service keeps what is its
own: HTTP, the job queue and its limits, energy metering, its signed
receipts, MCP and its examples.

- The GPU state vector is behind quantum_sv_metal: without it, the plan
  says the build has none, and the build still compiles for any target.
- The feature reads JSON numbers correctly rounded
  (serde_json/float_roundtrip), as the service always has.
- The test of the service's own examples stays with the service; the
  Grover test, which builds its program with the toolchain, runs where
  quantum_toolchain is on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 13:38:27 -04:00
Transaction Science
wai-quantum CLI and IDE: a receipt names its signer by its key's did:key
The CLI signed every receipt as "did🔑wai-quantum-cli" and the IDE as
"did🔑quantum-ide", labels that name no key. Now that each signs with
its own key, the receipt's signer_id is that key's Ed25519 did:key
(wai::signer_id::did_key), so a verifier reads the signer from the id as
jwp-receipts §7.1 describes. The IDE binding gains signer_did() for the
page to show it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 13:38:27 -04:00
Transaction Science
wai-quantum: one OpenQASM reader for the service, the CLI and the browser IDE; receipts signed with the signer's own key
The OpenQASM reader moves from the service into the library as
wai_quantum::qasm (feature quantum_qasm). The service, `wai-quantum run --qasm`
and the browser IDE's import now read a program the same way and refuse the
same programs: two registers, broadcast gates and comments read as the
service reads them, where the IDE's line reader dropped what it did not know.

- qasm::dyadic_circuit takes a program whose measurements all come at the
  end, and refuses one that measures and then acts, with the reason.
- quantum_toolchain::from_qasm, the older line reader, refuses what it cannot
  take (more than one register, reset, gate definitions, if/while/for, a gate
  after a measurement, two statements on one line) and names the full reader,
  instead of dropping the line.
- wai-web: the IDE binding builds its JSON with serde_json, so a quote or a
  control character in a program or an error no longer breaks the reply.
  set_signing_key, public_key_hex and key_is_demo let a page sign receipts
  with its own key; without one it signs with the published demo key and
  says so.
- The CLI signs with --key FILE, $WAI_QUANTUM_KEY, or this user's key at
  $XDG_CONFIG_HOME/wai/quantum-key (~/.config/wai/quantum-key), made from the
  operating system's random source with mode 0600 on first use. --demo-key
  keeps the published key, with a note that such a receipt shows the result
  is unaltered, not who signed it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 13:38:27 -04:00