open-standards/wai/wai-web
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Transaction Science 7152e2a9cc wai-quantum 0.6.5 and the service: programs that measure in the middle
The library:
- Tableau::measure measures a qubit of the wide tableau and leaves the state
  the outcome selects; a random outcome is the caller's to choose, so a
  branch can be followed on purpose. The anticommuting stabilizer is
  multiplied into every other row at once, each row's phase summed mod 4 in
  two bit planes. Tableau::is_random answers in one column scan.
- StateVector::probability_one (fixed-chunk sum) and StateVector::collapse.
- Tests: against the state vector's projection over 60 random circuits of six
  measurements each; on wide tableaux, measuring every qubit lands in the
  support held before, one random outcome per dimension. Mutants caught:
  signs kept, Y phase swapped, destabilizer not moved.

The service:
- reads measurement and reset anywhere, if/else on measured bits (bit,
  !bit, ==, !=, OpenQASM 2's if(c==n)), and `bit b = measure q;`. A program
  that needs them is kept as steps (qasm::Instr); every other program is
  exactly what it was.
- runs such a program on statevector or stabilizer (src/dynamic.rs): counts
  split their shots at each measurement and reset as independent shots
  would, each outcome running on in its own copy; expectation values are the
  exact mixture over the branches, of the state before the final
  measurements. Noise in such a program, amplitudes of one, and loops are
  refused with their reasons.
- Tests: teleportation (<Z> = cos θ, <X> = sin θ exactly; the tableau and the
  state vector agree), reset and re-measurement, a bit-flip syndrome that
  corrects the flip, the step structure with its jumps, the planner. Mutants
  caught: terminal measurements made, a branch's outcome swapped, reset
  without its flip, condition bits reversed.

Lockfiles: wai-quantum 0.6.5 in every workspace that pins it; cargo's
rewrite of wai-rs's also re-picks two Windows-only edges (windows-sys
0.52, getrandom 0.3), both already in the lock.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 06:31:58 -04:00
..
demo int_world gate 2: the renderer through world/1, beside the direct one; every golden through the lowering 2026-10-15 23:42:23 -04:00
reach wai-web reach: the record leg runs the record's own demo scripts 2026-10-11 03:44:06 -04:00
src wai: D2c M7b gate 6: the switch; the decode's networks run through the operator set 2026-10-18 02:00:19 -04:00
Cargo.lock wai-quantum 0.6.5 and the service: programs that measure in the middle 2026-10-19 06:31:58 -04:00
Cargo.toml wai-quantum WebGPU member in a browser: wai-web bundle, page, check, CI 2026-10-11 05:50:30 -04:00