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]>
873 B
873 B
Amplitudes are not probabilities. They have signs, and in general complex phases, and they add. When two paths lead to the same outcome, their amplitudes can reinforce or cancel. That is interference, and it is the one thing a quantum computer does that a coin cannot.
Two Hadamards in a row do nothing: the paths to |1⟩ cancel and the paths to |0⟩ add up.
OPENQASM 3.0;
include "stdgates.inc";
qubit[1] q;
bit[1] c;
h q[0];
h q[0];
c = measure q;
This program measures 0 every time. A phase in the middle changes which paths cancel. The phase itself is invisible to a measurement made right away, but a later gate that mixes |0⟩ and |1⟩ turns it into a different outcome.
The engine's critique flags gates that cancel, such as h q[0]; h q[0];, as a smell: wai-quantum critique names it with its lines, and the Studio marks it on the drawing.