wai-quantum: any exercise is checked as a lesson is (engine::course::check_exercise) #645

Merged
dcharlot merged 11 commits from wai/quantum-check-exercise into main 2026-11-06 15:15:59 -05:00

2026-11-06

Transaction Science
wai-quantum: say the exercise constraints' new length is a change
Some checks failed
wai-quantum docs, course and locales / every command and snippet in the docs · linux (pull_request) Successful in 1h0m29s
wai-web reach builds / wai-web reach builds · this tree's wai-web, every rung on its engine line (pull_request) Successful in 13m43s
wai-quantum signal processor / processor and member · signal processor, emulated (pull_request) Successful in 1h4m22s
WAI examples / WAI examples · the archive, the readiness check, the browser and Apple · macos (pull_request) Successful in 16m7s
WAI breaking changes and the conformance runner / WAI breaking · wire, record and API against main · linux (pull_request) Successful in 30s
WAI breaking changes and the conformance runner / WAI breaking and conform · their tests, and the independent verifiers through wai conform · linux (pull_request) Successful in 4m35s
WAI examples / WAI examples · portable · linux (pull_request) Successful in 11m4s
wai-quantum CUDA member / member · CUDA (jetson-hub) (pull_request) Successful in 1m17s
wai-quantum service / service energy · linux packages (pull_request) Failing after 11s
wai-quantum OpenCL member / member · OpenCL GPU and CPU (jetson-hub) (pull_request) Successful in 30s
wai-quantum WebGPU member / member · GPU, Vulkan (jetson-hub) (pull_request) Successful in 16m40s
wai-quantum portable tensor program / tensor program · GPUs (jetson-hub) (pull_request) Successful in 20s
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Successful in 2m0s
WAI conformance / v2 vocabulary · manifests validate as stated (pull_request) Successful in 31s
WAI conformance / delivery telemetry · CMCD and CMSD against an independent library (pull_request) Successful in 14s
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Successful in 42s
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Successful in 2m25s
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Successful in 24m53s
WAI conformance / each feature of the independent verifiers' steps compiles alone (pull_request) Successful in 19m23s
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Successful in 23m55s
wai-quantum HIP member / member · HIP absent (linux-arm64) (pull_request) Successful in 4m7s
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Successful in 1h43m4s
wai-quantum npu-cores member / member · npu-cores absent (linux-arm64) (pull_request) Successful in 5m49s
wai-quantum pulse and dynamics / the same bits · linux-arm64 (pull_request) Failing after 1m5s
wai-quantum extension points / the registry and the example · linux-arm64 (pull_request) Successful in 5m12s
wai-quantum tensor-engine member / member · tensor engine absent (linux-arm64) (pull_request) Successful in 33s
wai-sink-android native sink library / the JNI layer and the platform-free half on the host JVM · linux-arm64 (pull_request) Successful in 4m29s
wai-quantum variational and algorithm library / parameters, gradients, optimisers, VQE, QAOA and builders · linux-arm64, release (pull_request) Successful in 2m52s
WAI examples / WAI examples · android-app · linux-arm64 (pull_request) Successful in 10m0s
standards workspaces build + test / macOS energy backends (pull_request) Has been cancelled
`wai breaking` reported engine::course::CONSTRAINTS going from 6 to 8 entries
unacknowledged, so the change entry now says so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 14:54:10 -05:00
Transaction Science
wai-quantum: an injected error is corrected from the qubits, never read: the error-correction lessons check behaviour
Some checks failed
wai-quantum WebGPU member / member · browser WebGPU (macos) (pull_request) Successful in 2m30s
wai-quantum views in agent hosts / views · a scripted host (pull_request) Successful in 11m38s
wai-quantum studio and desktop / desktop app · windows (pull_request) Successful in 9m44s
wai-sink-android native sink library / every ABI, the AAR, and the instrumented tests in a headless emulator · macos (pull_request) Successful in 6m42s
WAI Studio / Studio in Chromium and Firefox · macos (pull_request) Successful in 10m25s
wai-quantum WebGPU member / member · Metal (macos) (pull_request) Successful in 13m13s
wai-sink-swift native sink package / libwai slices, desktop tests, simulator tests · macos (pull_request) Successful in 15m4s
WAI Studio / Studio in WebKit · linux (pull_request) Successful in 41m50s
standards workspaces build + test / joule-code-rs (joule-code/joule-code-rs, joule-code-rs, linux-arm64, true) (pull_request) Has been cancelled
wai-quantum CUDA member / member · CUDA (jetson-hub) (pull_request) Successful in 1m58s
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Has been cancelled
WAI conformance / v2 vocabulary · manifests validate as stated (pull_request) Has been cancelled
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Has been cancelled
WAI conformance / each feature of the independent verifiers' steps compiles alone (pull_request) Has been cancelled
WAI conformance / delivery telemetry · CMCD and CMSD against an independent library (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Has been cancelled
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Has been cancelled
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Has been cancelled
WAI examples / WAI examples · android-app · linux-arm64 (pull_request) Has been cancelled
wai-quantum OpenCL member / member · OpenCL GPU and CPU (jetson-hub) (pull_request) Successful in 54s
wai-quantum HIP member / member · HIP absent (linux-arm64) (pull_request) Has been cancelled
wai-quantum service / service energy · linux packages (pull_request) Failing after 57s
wai-quantum npu-cores member / member · npu-cores absent (linux-arm64) (pull_request) Has been cancelled
wai-quantum portable tensor program / tensor program · GPUs (jetson-hub) (pull_request) Successful in 49s
wai-quantum pulse and dynamics / the same bits · linux-arm64 (pull_request) Has been cancelled
wai-quantum extension points / the registry and the example · linux-arm64 (pull_request) Has been cancelled
wai-quantum tensor-engine member / member · tensor engine absent (linux-arm64) (pull_request) Has been cancelled
wai-quantum variational and algorithm library / parameters, gradients, optimisers, VQE, QAOA and builders · linux-arm64, release (pull_request) Has been cancelled
wai-quantum WebGPU member / member · GPU, Vulkan (jetson-hub) (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
The second review found finding 1 closed only for undeclared inputs. A program that
declared `input uint err;` and never used it passed the bit-flip lesson at proof, and
one that branched on the classical err passed the syndrome lesson.

A new constraint, `inject`, names the input whose value is the qubit an error flips.
The cases' programs may then differ in that one gate alone, an x on the qubit the case
names, every other gate, measurement and step the same (course::injected). So the error
is in the quantum state, the program cannot read it classically, and what finds and
corrects it is the program's quantum operations, the same in every case. A program
that never applies the error, reads it elsewhere, or flips another qubit fails, saying
which. A second, `qubits` ({"max": n}), closes the last way round: an answer kept on a
qubit no error reaches. bit-flip-code and syndrome set both; their solutions and wrong
answers keep their results. The exercise schema names both, and a case set an
injection cannot be made from is refused.

Test an_injected_error_is_corrected_from_the_qubits_and_never_read, failing on
ba59c776e for the reason it states (the declared, unused input passed bit-flip-code).
Course tests 13 -> 14 in wai-quantum-docs.yml.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 07:58:36 -05:00
Transaction Science
Merge main into wai/quantum-check-exercise
Some checks failed
wai-quantum extension points / the registry and the example · linux (pull_request) Has been cancelled
wai-quantum extension points / the registry and the example · linux-arm64 (pull_request) Has been cancelled
wai-quantum extension points / the registry under wasm32-wasip2 (wasmtime) (pull_request) Has been cancelled
wai-quantum service / service · linux (pull_request) Has been cancelled
wai-quantum matrix-extension member / member · matrix extension, emulated (aarch64 Linux) (pull_request) Has been cancelled
wai-quantum studio and desktop / studio · browser (pull_request) Has been cancelled
wai-quantum studio and desktop / desktop app · linux (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 variational and algorithm library / parameters, gradients, optimisers, VQE, QAOA and builders · linux, release (pull_request) Has been cancelled
wai-quantum variational and algorithm library / parameters, gradients, optimisers, VQE, QAOA and builders · linux-arm64, release (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 verdicts and repairs / verdicts, repairs and the intent set · linux (pull_request) Has been cancelled
wai-quantum verdicts and repairs / the intent set and the verdict under wasm32-wasip2 (wasmtime) (pull_request) Has been cancelled
wai-quantum views in agent hosts / views · the page and its engine (pull_request) Has been cancelled
wai-quantum views in agent hosts / views · a scripted host (pull_request) Has been cancelled
wai-quantum WebGPU member / shader checks · browser build · wasip2 inertness (pull_request) Has been cancelled
wai-quantum WebGPU member / member · software Vulkan (linux) (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 Studio / the catalogue's actions, the unit tests and the core · linux (pull_request) Has been cancelled
WAI Studio / Studio in WebKit · linux (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
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 03:17:44 -05:00
Transaction Science
wai-quantum: a T count, a two-qubit count and an estimate's bound are "at most n" alone
The course words these bounds as "at most n" (constraint.t_count, two_qubit, estimate),
and the check read a min too: {"t_count": {"min": 2}} showed the model "at most ? T and
T† gates" while it failed every program with fewer than two. The reader now takes
{"max": n} alone for them (engine::course::at_most), and exercise.v1.json says so
($defs/at_most), with the T count's description saying how T gates are counted. No
lesson uses a min there.

Found sweeping the review's family of claims the check makes that the code does not keep.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 03:09:51 -05:00
Transaction Science
wai-quantum: check_exercise reads its exercise first, binds every case's inputs, and counts T gates as gates
A check of an exercise that is no lesson's held vacuously where it read nothing, and
the writer makes that check the only gate on a pass. Now:

- engine::course::exercise_form holds a document to a lesson's form as far as a check
  reads it, and check_exercise refuses what it refuses before anything runs: a bound
  that is not whole numbers, a constraint or field the course does not name, a job
  beyond shots, seed and noise (a non-object job panicked the check; a repair or
  dyadic_bits made the engine prove another program than the one recorded), more than
  MOST_CASES (16) cases or MOST_INTENTS (8) intents. read_exercise shares the same
  reading, and a lesson's cases are still named in every locale.
- A case's inputs bind: a program that does not declare one is refused in that case
  (Q114), where it ran without it (the bit-flip lesson passed with no flip). A case
  whose intent is null takes the exercise's, and a case named with one string is
  shown by it.
- The constraints hold in every case's program, not the first one's, and a broken one
  names its case.
- t_count counts T gates, not names: p and rz by an odd multiple of pi/4 count one, a
  Clifford gate none, and any other gate does not hold to a T count. A three-qubit gate
  does not hold to a two-qubit count. The t-count lesson passed with every T written as
  p(pi/4).

Three tests, each failing on the branch's previous head for the reason it states
(13015f77a: a {"t_count": 0} bound was checked and passed; the no-flip program passed
the bit-flip lesson; the respelled t-count answer passed): course tests 10 -> 13 in
wai-quantum-docs.yml, run on Linux x86_64 and macOS aarch64.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 02:47:34 -05:00

2026-11-05

Transaction Science
Merge main into wai/quantum-check-exercise
Some checks failed
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Successful in 23m41s
wai-quantum portable tensor program / tensor program · Metal and the arm64 CPU (macos) (pull_request) Successful in 18s
WAI examples / WAI examples · the archive, the readiness check, the browser and Apple · macos (pull_request) Successful in 20m18s
wai-quantum CPU vector units / member · vector unit absent (macos) (pull_request) Successful in 18s
joule-code conformance gate / joule-moq-relay, every target (pull_request) Has been cancelled
joule-code conformance gate / joule-moq-ingest, every target (pull_request) Has been cancelled
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Has been cancelled
standards workspaces build + test / joule-code-rs (joule-code/joule-code-rs, joule-code-rs, linux-arm64, true) (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Has been cancelled
WAI conformance / v2 vocabulary · manifests validate as stated (pull_request) Has been cancelled
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Has been cancelled
WAI conformance / each feature of the independent verifiers' steps compiles alone (pull_request) Has been cancelled
WAI conformance / delivery telemetry · CMCD and CMSD against an independent library (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Has been cancelled
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Has been cancelled
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Has been cancelled
WAI examples / WAI examples · android-app · linux-arm64 (pull_request) Has been cancelled
wai-quantum HIP member / member · HIP absent (linux-arm64) (pull_request) Has been cancelled
wai-quantum npu-cores member / member · npu-cores absent (linux-arm64) (pull_request) Has been cancelled
wai-quantum pulse and dynamics / the same bits · linux-arm64 (pull_request) Has been cancelled
wai-quantum extension points / the registry and the example · linux-arm64 (pull_request) Has been cancelled
wai-quantum tensor-engine member / member · tensor engine absent (linux-arm64) (pull_request) Has been cancelled
wai-quantum studio and desktop / desktop app · macos (pull_request) Has been cancelled
wai-quantum variational and algorithm library / parameters, gradients, optimisers, VQE, QAOA and builders · linux-arm64, release (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-quantum WebGPU member / member · Metal (macos) (pull_request) Has been cancelled
WAI Studio / Studio in Chromium and Firefox · 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 / 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
Main's two newer commits (the marks, #653) touch nothing this branch does.
No conflict.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-11-05 17:25:09 -05:00
Transaction Science
wai-quantum: check_exercise's changelog entry is a file of wai/changes/
Main now takes one file an entry (wai/changes/README.md), and its
repository checks fail a pull request opened since that adds to the head
of wai/CHANGELOG.md, which is what this branch did. The entry moves, word
for word, to wai/changes/2026-11-05-quantum-any-exercise-checked-as-lesson.md,
and wai/CHANGELOG.md is main's again.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-11-05 16:55:39 -05:00
Transaction Science
Merge main into wai/quantum-check-exercise
Main gained fourteen commits since this branch was cut, among them the
changelog's new layout (one entry a file under wai/changes/). Nothing
conflicted; the entry this branch added to the head of wai/CHANGELOG.md
moves to a file in the next commit.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-11-05 16:55:22 -05:00
Transaction Science
wai-quantum-docs.yml: the course's new test is required by name, and its count is ten
Some checks failed
wai-quantum portable tensor program / tensor program · Metal and the arm64 CPU (macos) (pull_request) Successful in 21s
wai-quantum CPU vector units / member · vector unit absent (macos) (pull_request) Successful in 18s
wai-quantum service / service · macos (pull_request) Successful in 5m8s
wai-quantum WebGPU member / member · browser WebGPU (macos) (pull_request) Successful in 2m5s
wai-quantum neural-processor member / member · neural processor (macos) (pull_request) Successful in 8m45s
wai-quantum WebGPU member / member · Metal (macos) (pull_request) Successful in 4m38s
WAI examples / WAI examples · the archive, the readiness check, the browser and Apple · macos (pull_request) Successful in 20m6s
wai-quantum studio and desktop / desktop app · macos (pull_request) Failing after 11m46s
wai-quantum for Python / python · macos (pull_request) Failing after 15m2s
wai-sink-android native sink library / every ABI, the AAR, and the instrumented tests in a headless emulator · macos (pull_request) Successful in 10m59s
WAI Studio / Studio in Chromium and Firefox · macos (pull_request) Successful in 10m30s
wai-sink-swift native sink package / libwai slices, desktop tests, simulator tests · macos (pull_request) Successful in 16m57s
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Failing after 1m34s
WAI conformance / v2 vocabulary · manifests validate as stated (pull_request) Successful in 29s
standards workspaces build + test / joule-code-rs (joule-code/joule-code-rs, joule-code-rs, linux-arm64, true) (pull_request) Successful in 7m16s
WAI conformance / delivery telemetry · CMCD and CMSD against an independent library (pull_request) Successful in 28s
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Successful in 45s
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Successful in 2m12s
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Successful in 18m15s
WAI conformance / each feature of the independent verifiers' steps compiles alone (pull_request) Successful in 18m39s
wai-quantum HIP member / member · HIP absent (linux-arm64) (pull_request) Successful in 1m23s
wai-quantum npu-cores member / member · npu-cores absent (linux-arm64) (pull_request) Successful in 41s
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Successful in 11m57s
WAI examples / WAI examples · android-app · linux-arm64 (pull_request) Successful in 5m19s
wai-quantum pulse and dynamics / the same bits · linux-arm64 (pull_request) Successful in 2m4s
wai-quantum tensor-engine member / member · tensor engine absent (linux-arm64) (pull_request) Successful in 44s
wai-quantum extension points / the registry and the example · linux-arm64 (pull_request) Successful in 2m46s
wai-quantum variational and algorithm library / parameters, gradients, optimisers, VQE, QAOA and builders · linux-arm64, release (pull_request) Successful in 2m27s
wai-sink-android native sink library / the JNI layer and the platform-free half on the host JVM · linux-arm64 (pull_request) Successful in 3m40s
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Successful in 1h35m23s
The workflow pins how many course tests pass and names each one, since a module filter is satisfied
by any one test. check_exercise added a tenth, so the step failed with every test passing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-05 10:46:59 -05:00
Transaction Science
wai-quantum: any exercise is checked as a lesson is (engine::course::check_exercise)
Some checks failed
WAI energy receipts / energy receipts · macos (pull_request) Has been cancelled
WAI examples / WAI examples · the archive, the readiness check, the browser and Apple · macos (pull_request) Has been cancelled
WAI examples / WAI examples · android-app · linux-arm64 (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 editors / editors · 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-quantum OpenCL member / member · OpenCL GPU (macos) (pull_request) Has been cancelled
wai-quantum pulse and dynamics / the same bits · linux-arm64 (pull_request) Has been cancelled
wai-quantum pulse and dynamics / the same bits · macos (pull_request) Has been cancelled
wai-quantum for Python / python · macos (pull_request) Has been cancelled
wai-quantum-qpu / credentials in the keychain (macos) (pull_request) Has been cancelled
wai-quantum extension points / the registry and the example · linux-arm64 (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-quantum studio and desktop / desktop app · macos (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 variational and algorithm library / parameters, gradients, optimisers, VQE, QAOA and builders · linux-arm64, release (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 Studio / Studio in Chromium and Firefox · macos (pull_request) Has been cancelled
The course's check held a program to a lesson's exercise: its cases and intents, its constraints,
the engine's verdict at each, and what went wrong in words. Only the lesson lookup tied it to the
course. check_exercise takes the exercise as a document in the course's own form
(wai.quantum.exercise/1) and checks a program against it the same way, with `lesson` null.

It is the first step toward the job service writing a program for an intent: each attempt is held
to the task as a lesson's answer is, and what went wrong is the feedback for the next attempt.

check now finds its lesson and calls the same function, so a lesson's check is the same bytes as
before. A new test holds both:
- a lesson's own exercise, given as a document, checks byte for byte as the lesson does, for a
  right and a wrong program;
- an exercise written from nothing but a distribution passes a Bell pair by proof and fails a
  program without its CNOT, naming the distribution.

The course's ten tests pass (cargo test --features full --lib engine::course).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-05 07:47:19 -05:00