open-standards/wai/quantum-conformance/qec-text
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Transaction Science 55208351c3 wai-quantum: the rest of the review's fixes on the reader-scaling branch
- A named method that needs standard gates reads them, so a program they
  cannot hold is refused as the reader refuses it: on its line, with Q208
  or Q210 and no J011. Both refusals past 16 controls say how a job holds
  the gate, and no longer say the bit-exact method does so by default.
- A verdict with no intent reads the program as it ran, so a gate past 16
  controls runs over MCP, as the docs say; an intent is checked in
  standard gates, and a job with one is refused there, on its line.
- lint's dynamic_steps counts standard steps, beside gates.
- options.controls is read: another value, or "whole" on a job that runs
  standard gates, is refused (J003), and the schema, methods list, API
  description, README and both MCP servers name it.
- accuracy.global_phase is stated against method statevector's state, not
  the language's, whose U and gphase differ from it; below_table and
  moved_angles say they count phase gates, at 1e-14 of a turn.
- operations is an engine member.
- Gates held whole may take 2,000,000 qubits in all (Q210), which holds
  nothing the standard form holds.
- A metered plan says `metered`, its work what the meter allows, and such a
  job does not set the method's measured rate.
- The refusal, service and QEC pages and the corpus say what changed; the
  tests are named in CI; the conformance set holds the new text forms; the
  service snapshot and the agent docs are regenerated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-07 01:44:51 -05:00
..
circuits wai-quantum: the rest of the review's fixes on the reader-scaling branch 2026-11-07 01:44:51 -05:00
models wai-quantum: the rest of the review's fixes on the reader-scaling branch 2026-11-07 01:44:51 -05:00
refuse wai-quantum: the rest of the review's fixes on the reader-scaling branch 2026-11-07 01:44:51 -05:00
README.md wai-quantum: the rest of the review's fixes on the reader-scaling branch 2026-11-07 01:44:51 -05:00
vectors.json wai-quantum: the rest of the review's fixes on the reader-scaling branch 2026-11-07 01:44:51 -05:00

qec-text

The error-correction text formats, as the engine reads and writes them: noisy Clifford circuits with detectors and observables (circuits/), and detector error models (models/). The reader and writer are wai_quantum::quantum_qec_text; the circuits' meaning, sampling and models are wai_quantum::quantum_frame.

Every file here is in the writer's layout (NAME[tag](a, b) t1 t2, a block's body four spaces in), so each must come back from reading and writing byte for byte. vectors.json pins, for each:

field what
qubits, measurements, detectors, observables the circuit's counts after its blocks are unrolled
tags the tags its instructions carry, each once, in order
text_blake3 BLAKE3 of the file
model, model_blake3, mechanisms the file holding the circuit's detector error model, as the engine writes it (coordinates, tags, decompositions), and its hash and size
generator for a circuit the crate writes, the call that writes it: the file must be what the code writes today

A model's vector gives its detectors, observables and mechanisms after its repeat blocks are unrolled and shift_detectors applied, how many are decomposed (parts joined by ^) and how many tagged.

The files:

  • surface_z_d3_r3, surface_z_d5_r1: the rotated surface-code memory experiment, Z basis, every noise knob at p.
  • bb72_z_c2, bb72_x_c1: the [[72,12,6]] bivariate-bicycle memory, its depth-8 syndrome cycle, in each basis.
  • tagged: written by hand. Tags on a gate, on noise and on a REPEAT; Pauli-target observables (OBSERVABLE_INCLUDE(1) X0 X1 X2 on a three-qubit cat state, OBSERVABLE_INCLUDE(0) rec[-1] Z2 beside a measurement record); an inverted measurement target (M !0 1); coordinates shifted by SHIFT_COORDS. A tag on a noise instruction is the tag of every mechanism it makes, and mechanisms with one symptom set but different tags stay apart.
  • correlated: written by hand. C_XYZ and C_ZYX on a qubit that a detector reads through them; E and CORRELATED_ERROR on Pauli targets, so the circuit holds one qubit more than its text names; PAULI_CHANNEL_1, as the independent flips with its law, one rate above 1/2.
  • refuse/no_independent_flips.circuit: PAULI_CHANNEL_1(0.1, 0.1, 0), which no independent flips give.
  • models/decomposed.dem: written by hand. Decomposed errors, a tagged one, a repeat block with shift_detectors, detector coordinates and a declared observable no error flips.

refuse/ holds text the engine must refuse, each with its line and the words of its refusal in vectors.json: an instruction it does not implement (T, and a Pauli product measurement it reads but does not run), an observable that is random without noise, a record before the first measurement, a tag left open, an empty part of a decomposed error, and an unknown model instruction.

The test is wai/wai-quantum/tests/qec_text_conformance.rs:

cargo test --release --features full --test qec_text_conformance
WAI_QUANTUM_BLESS=1 cargo test --release --features full --test qec_text_conformance   # rewrite the generated files