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…
Figure export: one <base>.bundle.zip download (STORE zip writer, no deps)
TheYuchen
c4e53ef
Packaging decision resolved: zip, without the dependency. New
frontend/src/lib/zip.ts is a minimal STORE-method ZIP writer (local
file headers + central directory + EOCD, table-driven CRC-32, ~100
lines, pure JS). exportFigure now collects the .svg, the .png (hybrid/
raster path only) and the .provenance.json and downloads exactly ONE
<base>.bundle.zip — a single camera click can no longer trip browser
multi-download blocking, which silently dropped the sidecar and/or
PNG. In-SVG provenance <metadata> unchanged. New node lane
scripts/check_zip.test.ts asserts the CRC-32 check vector
("123456789" -> 0xCBF43926), the archive structure, and interop:
the fixture is listed with `python3 -m zipfile -l` and CRC-tested
with `-t` (Done testing). Camera button/claims-map wording and the
Wave-Q export contract + filename notes updated. Backlog entry
removed.
Infra S3 sweep: boot honesty, theater stability, export provenance
TheYuchen
cab6fcb
Audit backlog wave 3, infra area:
- App boot: unknown ?scenario= keys warn instead of vanishing;
scenario activation runs before the demo-archive check and writes
its workspace mode before any await (mode flash); StrictMode
double-boot guard landed with the canvas batch
- EvidenceTheater: y-domain target band anchors on the FIRST batch
(no mid-run re-zoom); overlay stop annotations flip when the left
side would clip (shared estimateTextW); frame keys are composite
(shots_done can repeat); scrub-reset dep list documented and its
accidental window.open reference removed; "hatched" doc claim
corrected to the 5%-opacity wash actually drawn
- figureExport: regenerate string and scenario doc say F0..F8 (F8
existed, the string didn't); multiverse/history provenance lists
exactly the ARCHIVE_WINDOW the views render while id lookups scan
unbounded; the live run's config_hash comes from theaterRun (run
start) with lastConfigHash as fallback (archive-time value goes
sta…
Audit backlog wave 3, evidence area:
- dedupeDraws keys on (root_seed, shots, successes) [approved]: only
a bit-exact repetition of the whole draw is dropped — the same seed
with a different stopping point executed different measurements and
now pools as new evidence. Node-lane assertions added; F8
demo-archive numbers verified unchanged.
- Sparkline stops flattening sub-unit series (QuCAD loss traces);
divide-by-zero guard only fires on a truly flat trace
- KvRow never prints "[object Object]" (nested objects/arrays
JSON-stringify, truncated); viz fmt + CircuitDiff gateDiffOf
unexported (dead exports)
- QuBound/QuCAD NaN payloads render as absent ("—"), not "NaN" tiles;
Qshot's headline fidelity joins the % convention (formula + pilot
table keep the author's raw-unit notation); CI line tabular-nums
- fidelity histogram says what it hides ("+k more outcomes · n shots
not listed"); ReplicateStrip excludes errored runs, highlights the
newest matching dot with an ep…
exportPython: make the reproducibility claim true
TheYuchen
fb2cd9e
- input_circuit: sample runs emit a REAL loader (QPY downloaded from
/api/circuits/samples/<key>/download, cached beside the script)
instead of a hardcoded QuantumCircuit(4) placeholder under a header
claiming bit-exactness. Uploaded-circuit runs emit a sys.exit guard
BEFORE the placeholder so the script can never silently print wrong
numbers.
- fake/ibm/compvqc backends: qiskit.providers.fake_provider imports
(dead since Qiskit 1.0, and FakeFezV2 never existed there) replaced
with qiskit_ibm_runtime.fake_provider — the exact import the studio
backend (workflow_service / qlib) uses.
- qucad: removed the dead qc_bound block. Verified against
qlib/qucad.py: run_qucad_training_noisy trains the PARAMETERIZED
circuit (the backend passes ctx["circuit"] unbound; pre-binding
would leave zero trainable parameters), so the emitter now mirrors
_handle_qucad exactly and binds theta*mask after training.
- plugin/unknown steps: emitted as "# Step N: <kind> — plugin step,
no…
Statistical coherence: baseline + delta are per circuit (marker: same circuit)
TheYuchen
defe968
The board compared every card against ONE global baseline (the
most-populous configuration overall), so a vqc_2q_small card could
report "delta +50.0pp vs baseline" against a bell_state configuration --
fidelities of two different circuits are two different quantities, and
a delta between them is meaningless.
MultiverseBoard: pickBaseline -> pickBaselines, one baseline per
circuit identity (sample_key ?? upload:circuit_name, the exact
computeConfigHash circuitTag convention, so "same circuit" can never
disagree with configuration identity). Most-populous config per
circuit, ties toward most recent activity. Cards whose circuit has no
other configuration show no baseline chip, no diff dots and no delta
line. The delta line now names its reference inline -- "vs #hash (same
circuit)" -- instead of tooltip-only (owner's over-reliance-on-hover
complaint, item a).
DifferenceFunnel: cross-circuit gate in trace assembly.
useDifferenceEvidence returns status "different-circuit" when the two
s…
Third funnel scale, between-configuration: the Compare tab now draws
the 95% interval of the DIFFERENCE d(B-A) narrowing as replicates of
both configurations accumulate chronologically -- comparing two
configurations honestly means watching the interval of the
difference, not eyeballing two separate CIs.
* stats.ts: newcombe95 (Newcombe 1998 method-10 hybrid score interval
for p1-p2, built from the same Wilson bounds every other surface
uses; anchor 56/70 vs 48/80 -> [0.0524, 0.3339]), dedupeDraws
(pinned replays are the same draw bit-exactly -- never pooled
twice), differenceTrace (chronological accumulation, unequal run
counts and unequal shots-per-run pool on raw counts),
differenceVerdict (established / lost / sustained).
* DifferenceFunnel.tsx: one true-SVG chart in the theater's funnel
grammar -- x = shots consumed by both sides (evidence bought),
y = d(B-A) in pp always including the dashed "no difference" zero
line, per-step Newcombe intervals + envelope + po…
An early-stopped run's exported Python ran ALL requested shots — the
stopping rule was part of the run's provenance (RunRecord persists it,
replay re-sends it) but the export path dropped it, so the doc's
"reproduces the archived run's exact draw" overstated for early-stopped
runs. Now: ExportProvenance carries precisionTarget (read
server-authoritatively from the sampled step's distribution payload,
not the toolbar's current selection), the generated
sampledFidelityEstimator call re-sends precision_target=, and the
script header stamps stop_target. Shape-verified by
frontend/scripts/check_export_python.test.ts (esbuild bundle + node).
Doc claim updated to now-true.
Filmstrips: Evidence Theater gains a batch-index trace scrubber
(replayed/archived runs only; live path untouched) that renders the
chart AS OF batch k — truncated intervals/envelope, "so far" readouts,
stop annotation only once reached. Exports in a scrubbed state are
bit-exact per (trace, k) and embed trace_position in the provenance;
F0 filmstrip recipe (batch 2 / batch 4 / final) documented with
live-verified widths (±3.06 / ±2.16 / ±1.93pp).
Illustrator-grade true-SVG: new lib/svgPaper.ts holds the pure
presentation-inlining logic (whitelisted attributes resolved via
getComputedStyle to literals — zero var()/currentColor/class/<style>;
concrete font stacks; px normalized; viewBox-derived pt sizing;
standalone XML header) with a plain-node unit test
(scripts/check_svg_paper.test.ts) and a per-export safety audit.
Raster: hybrid PNG at explicit pixel dimensions (never
devicePixelRatio); 2.5x default, 4x via alt-click/long-press on the
camera. Files named <view>_<scenario|runid>[_b…
Auto-connect: per-algorithm backend warnings; tour drift fixes
Yuchen Yuan
2316315
Auto-connect was using a single blanket "algorithms that need a noise
model will error at run time" warning for any canvas missing a backend.
That's only true for QuCAD; QuBound and CompressVQC silently fall back
to FakeFez, and Qshot ignores ctx["backend"] entirely (uses its own
bundled noise snapshots). Replace the blanket line with per-algorithm
advisories driven by an ALGO_BACKEND_DEPENDENCY table:
- qucad: "required" (hard error without backend)
- qubound, compvqc: "optional" (soft fallback to FakeFez)
- qshot: "ignored" (warns the OTHER way: backend wired in front of a
qshot-only chain is dead weight)
Also drop the misleading "noise profile" dashed-edge label on
backend → qshot edges (the edge has no semantic meaning for qshot).
Backend → qucad/qubound/compvqc still gets the dashed sidechain
styling.
Tour slides drifted relative to the current four-algorithm lineup:
- WelcomeSlide named only QuCAD/QuBound/CompressVQC; add Qshot.
- PipelineSlide split algorithms into "mutate c…