wai-quantum: Python and notebooks, in-process (wai_quantum, widgets, a service client) #515

Closed
dcharlot wants to merge 5 commits from wai/quantum-qpy into main

2026-10-27

Transaction Science
wai-quantum: the route rule reads plainly; a project's test.sh takes a relative command path
All checks were successful
wai-quantum tensor-engine member / member · tensor engine, the kernel toolchain's simulator (linux) (pull_request) Successful in 9m20s
WAI examples / WAI examples · android-app · linux-arm64 (pull_request) Successful in 5m0s
wai-sink-android native sink library / the JNI layer and the platform-free half on the host JVM · linux-arm64 (pull_request) Successful in 2m43s
wai-audit collector and player integration / collector, player integration and the browser end to end · macos (pull_request) Successful in 1m39s
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Successful in 10m5s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 10m7s
WAI conformance / cross-arch byte-equality · macos (pull_request) Successful in 26s
WAI conformance / codec wrappers · fuzz smoke, text decode limits, C entry points, provenance, the semantic path (pull_request) Successful in 1m7s
WAI energy receipts / energy receipts · macos (pull_request) Successful in 6m28s
wai-quantum command line / command line · macos (pull_request) Successful in 46s
wai-quantum dataflow member / member · dataflow device absent (macos) (pull_request) Successful in 16s
wai-quantum FPGA member / member · FPGA datapath, simulated (macos) (pull_request) Successful in 1m19s
wai-quantum Metal member / member · Metal (macos) (pull_request) Successful in 32s
WAI conformance / cargo-class corpora · macos (pull_request) Successful in 19m56s
wai-quantum OpenCL member / member · OpenCL GPU (macos) (pull_request) Successful in 24s
wai-quantum for Python / python · macos (pull_request) Successful in 1m23s
WAI examples / WAI examples · the archive, the readiness check, the browser and Apple · macos (pull_request) Successful in 12m28s
wai-quantum service / service · macos (pull_request) Successful in 52s
wai-quantum matrix-extension member / member · matrix extension absent (macos) (pull_request) Successful in 13s
wai-quantum CPU vector units / member · vector unit absent (macos) (pull_request) Successful in 21s
wai-quantum neural-processor member / member · neural processor (macos) (pull_request) Successful in 10m1s
wai-quantum portable tensor program / tensor program · Metal and the arm64 CPU (macos) (pull_request) Successful in 18s
wai-quantum WebGPU member / member · browser WebGPU (macos) (pull_request) Successful in 1m56s
wai-quantum studio and desktop / desktop app · macos (pull_request) Successful in 2m56s
wai-quantum WebGPU member / member · Metal (macos) (pull_request) Successful in 2m49s
wai-web reach builds / wai-web reach builds · the package of record, every output as recorded (pull_request) Successful in 2m38s
wai-web reach builds / wai-web reach builds · this tree's wai-web, every rung on its engine line (pull_request) Successful in 4m22s
wai-sink-android native sink library / every ABI, the AAR, and the instrumented tests in a headless emulator · macos (pull_request) Successful in 7m27s
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Successful in 58m35s
wai-sink-swift native sink package / libwai slices, desktop tests, simulator tests · macos (pull_request) Successful in 20m46s
- engine::guide's route rule ends "and nowhere else": the service's
  instructions join every rule on one line, where the old ending and the
  signing-key rule read together as a comparison to the prose check.
- test.sh makes a relative WAI_QUANTUM absolute before it changes to the
  project's directory, and smoke.sh runs the binary by an absolute path:
  CI gives it ./target/release/wai-quantum.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 16:14:13 -04:00
Transaction Science
wai-quantum-py: release wheels on the command line tag; changelog and README
Some checks failed
WAI conformance / cross-arch byte-equality · macos (pull_request) Successful in 36s
WAI examples / WAI examples · the archive, the readiness check, the browser and Apple · macos (pull_request) Has been cancelled
wai-quantum command line / command line · macos (pull_request) Has been cancelled
wai-quantum dataflow member / member · dataflow device absent (macos) (pull_request) Has been cancelled
wai-quantum FPGA member / member · FPGA datapath, simulated (macos) (pull_request) Has been cancelled
wai-quantum HIP member / member · HIP absent (linux-arm64) (pull_request) Has been cancelled
wai-quantum Metal member / member · Metal (macos) (pull_request) Has been cancelled
wai-quantum npu-cores member / member · npu-cores absent (linux-arm64) (pull_request) Has been cancelled
wai-quantum neural-processor member / member · neural processor (macos) (pull_request) Has been cancelled
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Has been cancelled
wai-quantum OpenCL member / member · OpenCL GPU (macos) (pull_request) Has been cancelled
WAI conformance / codec wrappers · fuzz smoke, text decode limits, C entry points, provenance, the semantic path (pull_request) Has been cancelled
wai-quantum for Python / python · macos (pull_request) Has been cancelled
wai-quantum service / service · macos (pull_request) Has been cancelled
wai-quantum matrix-extension member / member · matrix extension absent (macos) (pull_request) Has been cancelled
WAI examples / WAI examples · android-app · linux-arm64 (pull_request) Has been cancelled
wai-quantum studio and desktop / desktop app · macos (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · macos (pull_request) Has been cancelled
WAI conformance / each feature of the independent verifiers' steps compiles alone (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 · Metal and the arm64 CPU (macos) (pull_request) Has been cancelled
wai-quantum CPU vector units / member · vector unit absent (macos) (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-sink-android native sink library / the JNI layer and the platform-free half on the host JVM · linux-arm64 (pull_request) Has been cancelled
wai-sink-android native sink library / every ABI, the AAR, and the instrumented tests in a headless emulator · macos (pull_request) Has been cancelled
wai-sink-swift native sink package / libwai slices, desktop tests, simulator tests · macos (pull_request) Has been cancelled
WAI energy receipts / energy receipts · macos (pull_request) Has been cancelled
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Has been cancelled
wai-quantum-py-release.yml builds the abi3 wheels on a wai-quantum-cli-v*
tag and attaches each with its SHA-256 to that forge release, as the
command line archives are (release/publish.sh, over the private network):
macOS arm64 and x86_64 (cross-built on the Apple-silicon runner), Linux
x86_64 and arm64 as manylinux2014 (maturin with zig 0.16.0, so the
runner glibc does not leak into the wheel; checked: the module needs
GLIBC_2.17 at most), and Windows x86_64. Each wheel that runs on its runner
is installed alone on Python 3.9 and runs tests/smoke.py first. Nothing is
published to a package index.

The changelog entry (wai/CHANGELOG.md), the crate README naming
engine::svg and the package, and ci/check.sh waiting on the service it
stops so the shell prints no job notice.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 14:53:48 -04:00
Transaction Science
wai-quantum engine::svg: every mark keeps its colour without the style sheet
A page that strips <style> from what it shows (a notebook sanitising an
untrusted output) would leave unstyled lines with no stroke and the
background rectangle filled black. Each line and path now carries a stroke
in the text colour, each text and dot a fill, each box, ring and meter an
outline with no fill, the background none and each key swatch its hand
colour; the style sheet still overrides them all. A sixth test checks every
element of a drawing for its attribute. The doc notebooks are written again
with the new drawing, and ci/check.sh expands an empty array the way the
bash macOS ships accepts under set -u.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 14:53:31 -04:00
Transaction Science
wai-quantum-py: WAI Quantum in Python and notebooks, in-process
A new crate, wai/wai-quantum-py, built by maturin 1.15.0 into one abi3 wheel
per platform (pyo3 0.29.3, Python 3.9 on), module wai_quantum. Its extension
module wraps the shared job engine and nothing else: run, plan, lint, draw
(text and the engine SVG), layout, critique, improve, shortcuts,
equivalent, verify, seal, canonical, digest, methods, accuracy_classes and
history, values crossing one to one with JSON (NaN, integers past 64 bits
and non-string keys refused). A job is the service form as a plain dict
with helpers (counts, probabilities, expectations, amplitudes, method,
accuracy, receipt); Key reads and writes the command line key files and
finds the same user key; bloch gives each qubit reduced state from the
engine expectation values. A refusal raises EngineError with the engine
message, its line, and a code slot for the engine diagnostic codes.

Service is a client in the standard library alone for the job service
(submit, status, result, cancel, run), naming itself
wai-quantum-python/<version>, its receipts checked here offline.

Widgets (the widgets extra): Circuit (the engine drawing, gates clickable,
authorship marks from a history), Result, Receipt (the engine verdict) and
Bloch (drag to turn), each a plain ES module, each with static HTML (and
SVG) fallbacks that render without the widget library.

Five doc notebooks run in CI and are held to their stored outputs.
ci/check.sh is the whole check; 62 pytest tests hold the package to the
command line (same results, plans, lints, critiques, drawings, methods,
equivalence verdicts; receipts verified both ways; the same user key; the
digest recomputed from Python canonical bytes), to the service run locally,
and run the front ends under node on the payloads; Python 3.9 smoke with
the wheel alone. Workflow wai-quantum-py.yml runs it on linux and macos.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 14:53:31 -04:00
Transaction Science
wai-quantum engine: a circuit as a standalone SVG drawing (engine::svg)
The drawing the Studio makes from the layout, written once in the engine for
hosts with no page of their own (a notebook, a report, a file): the same
classes and geometry, a style sheet of its own scoped to .wq-circuit that
follows the text colour it is placed in, every number written to two
decimals so the same program writes the same bytes everywhere. Given whose
hand each operation is in, each gate is marked with its author and a key
under the drawing counts them; a condition legend and a note past 400
columns. Five tests: the Bell pair glyph by glyph, every layout item drawn
and the bytes repeatable, the authorship marks and key, escaping and number
writing, and the column cap.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 14:53:30 -04:00