open-standards/wai/wai-quantum/course/lessons/folding/lesson.en.md
Transaction Science fb230d8a62 wai-quantum: the circuits course as data, each exercise checked by the engine, and wai-quantum learn in English and Chinese
engine::course reads the course from wai-quantum/course/: 21 lessons from a
first circuit through superposition, entanglement, interference, the standard
algorithms, noise and mitigation, error correction and fault tolerance to
resource estimates, each a Markdown text in English and Simplified Chinese and
an exercise.json with a schema. A check runs each case of an exercise (a
generator's inputs) with its intent and the verdict, measures its constraints
(the gates allowed, counts, the T count, the critique's smells, the resource
estimate's counts), and says what went wrong from the diagnostics, the verdict
and the critique, never from the solution. The tests hold every solution to
pass by proof, every known wrong answer to fail for its stated reason, and
every locale to every text and message.

wai-quantum learn shows, starts, checks, hints and explains a lesson, keeps
progress only on this machine, and speaks the language --lang or LANG names;
the command summaries and docs topics have Chinese translations held to the
English they came from. The verdict gains of_diagnostic for a generator's
refusal. llms.txt names the course.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-28 08:42:54 -04:00

1,020 B
Raw Permalink Blame History

Error mitigation improves a noisy device's answers without correcting its errors. One method is zero-noise extrapolation: run the circuit at its own noise, then again with the noise deliberately scaled up by known factors, and extrapolate the measured values back to zero noise.

To scale noise without changing what a circuit computes, fold it: replace a gate G by G G⁻¹ G. The three gates do what G does, and carry three times its noise. Fold every two-qubit gate to scale the dominant noise by 3; fold some of them for the factors in between.

With an expectation value E(1) at the device's noise and E(3) with the gates folded, the linear (Richardson) extrapolation to zero noise is

E(0) ≈ (3·E(1) − E(3)) / 2.

The intent here is equivalent: the folded program must be the same circuit as the original, which the engine proves by the stabilizer tableau. The Studio's noise fields, or --noise on the command line, run the two versions side by side, to see ⟨Z0 Z1⟩ fall as the noise is scaled.