Learn track, part B1: toy sim grows the Deutsch oracle (+ node-lane proofs)
TheYuchen
ac9eae8
deutschOracle(rule) in lib/quantumToy.ts — the four hidden coin rules
(always0/always1/copy/flip) as |x>|y> -> |x>|y xor f(x)>, all real
permutation matrices, so the exact real-amplitude subset is untouched.
The node lane asserts the truth table on the computational basis and
the full Deutsch run (|0>|1>, H both, oracle, H on q0) reads q0 with
CERTAINTY for all four rules, plus the interference step's ghost-route
identities (routes into 0 agree, routes into 1 cancel; a Z between the
H's swaps the sides).
Learn track, part A1: scientific audit fixes + toy sim grows Z and stateAngle
TheYuchen
f1c44e4
Audit (copy vs the exact sim):
- shots gloss: "repeated measurements" implied re-asking one qubit;
now "prepared and measured from scratch" (each shot is a fresh
preparation).
- step 0 caption "holds: a lean" foreclosed phase — the lean is the
measurement distribution, not the whole state; it now reads "a
first approximation; step 4 refines it".
- Dial docstring updated (the gates step's wire end moves to the
full circle in part A2; the semicircle can only show leans).
Sim: applyZ1 (diag(1,-1) — the sign flip, still REAL, so the exact
real-amplitude subset stays exact) and stateAngle (the circle
convention: |0> top, |+> right, |1> bottom, |-> left; Bloch angle
doubling; global sign modded out — unphysical). Glossary gains
phase and amplitude.
Node lane asserts the new physics: Z|+>=|->, H|->=|1>, ZZ=I,
HZH=X, all four angle conventions, global-sign invariance, and the
reachable-set truth: from |0> the X/H/Z words generate a dihedral
orbit of 8 signed pairs at 45-degree mult…
Learn from zero, part 2: steps 3-5 + handoff (marker: learn-complete)
TheYuchen
d70dffe
Step3Bell "Two qubits, one fate": the fixed Bell recipe on two wires
(BellRecipe.tsx, read-only SVG), two dials whose needles snap TOGETHER
on every draw, and a 2x2 PairGrid (the Tally idiom folded into the
fourfold table) where only 00/11 ever populate — a certainty claim the
exact sim licenses. "Break the link" swaps CX for H(x)H (NOT mere
deletion, which would pin q1 at 0) so all four cells fill as the
honest independent contrast; both marginal dials read 50% in both
modes — only the joint tally reveals the link.
Step4Noise "Real machines misread": same recipe + grid, a perfect/
noisy machine switch (applyReadoutNoise, seeded) with an eps slider
(0-15%): 01/10 leak warn-tinted counts and the live agreement score
(reported pair == drawn pair; ~88% at 6% noise since both bits must
survive) is fidelity in miniature, bridged to the Noisy simulator
block by name.
Step5Certainty "How many looks is enough?": the noisy agreement score
becomes the estimand, drawn as a live mini funnel in t…
Learn from zero, part 1: exact toy sim + LearnLab frame + steps 0-2 (marker: learn-lab)
TheYuchen
2af5086
lib/quantumToy.ts: tiny EXACT simulator over REAL amplitudes ([a,b] /
[a00..a11]) — exact quantum mechanics for the lesson gate set X/H/CX
(real matrices keep |0...0> in the real subspace), so H·H|0> returns
|0> by sign cancellation and Bell is exactly half/half. Complex phases
are deferred, not denied (module header states the stance); seeded rng
(mulberry32), probs/measureOnce/measureMany/applyReadoutNoise.
Asserted in scripts/check_quantum_toy.test.ts (plain-node lane).
components/LearnLab.tsx: the beginner track BEFORE the guided lessons
— full center-column overlay (same pattern as board/theater, z-30 in
App <main>, both branches), own header (step k of 6, prev/next,
progress dots, ×), progress in localStorage quda.learnLabStep. Copy
rules enforced by the frame: one bold idea sentence + one guiding
line + one interactive per step; percentages only, no formulas.
components/learn/: Dial (semicircular lean control — drag, keyboard,
snap-to-pole collapse animation), Tally (counts_to…