Learn track, part B3: scale + Deutsch steps, the 10-step ladder (marker: learn-scale)
TheYuchen
6746262
Step6Scale.tsx — qubit-count stepper 1..30: up to 5 qubits the wall
draws the actual 2^n arrow slots; beyond, a log-scale bar + plain
count with modest anchors (10 a spreadsheet, 20 a photo's pixels,
30 a laptop's RAM — no hype), then the honesty turn as a readout
funnel: 2^n arrows in, n bits out per look; cross-link chips to the
interference and Deutsch steps (StepProps gains optional goToStep).
Step7Deutsch.tsx — the payoff game: seeded mystery coin-rule box;
classical verdict locked until TWO queries; the quantum act stages
the real Deutsch circuit over 4-slot AmpBars (ghost routes on the q0
mix), reads the verdict certain in ONE question, replayable; honesty
card scopes the claim (structure, not universal speed).
LearnLab frame reordered to the final ladder — lean, measure, gates,
phase, interference, Bell (moved unchanged), scale, Deutsch, noise,
certainty; entry copy de-counted (tour/board/TopBar said "six");
docs paragraph updated to the final ladder.
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…
Guided lessons: four beginner micro-experiments (marker: guided-lessons)
TheYuchen
edfa7f5
New lib/lessons.ts + components/LessonCard.tsx — an integrated
beginner path, not a separate mode. Each lesson step rides the SAME
machinery scenario boots use (pendingRestore + autoRunAfter through
the store bridges), and every lesson run is tagged via the existing
RunRecord.scenario field ("L1"…"L4") so lesson runs never pollute
evidence pools — the theater prior-pool filter and the F6/F7/F8
pickers already exclude scenario-tagged records (comments at all
three sites now name the lesson tags too).
The four lessons, numbers grounded like scenarios are:
L1 "Measurement is sampling" — bell_state, sampled fidelity, 128
shots fresh ("why isn't it exactly 50%?"), follow-up button runs
4096 → the funnel visibly narrows.
L2 "Noise costs fidelity" — vqc_2q_small twice: statevector under
bind_zero is EXACTLY 1.0 (RY(0)+CX on |00⟩ is identity in
effect), sampled on FakeFez lands ~0.97; after the second run the
card selects both runs into Between configurations.
L…
Canvas/palette S3 sweep: id collisions, touch-cancel, caps, honest encodings
TheYuchen
728039f
Audit backlog (docs/AUDIT_BACKLOG.md) wave 3, canvas area:
- node ids: module counter kills the same-millisecond collision
- touch drag cancel clears the splice highlight; restore-pulse timer
held in a ref (cleared on re-restore/unmount)
- cost effect reads nodes through a ref (stale closure)
- ARCHIVE_WINDOW (runStore) consolidates the 50/100/200/500 listRuns
caps; countRuns()/countRunsByConfig() back every displayed total
(board header, config-context bar); exportArchive scans unbounded;
listRunsByConfig keeps the newest window instead of an arbitrary
primary-key subset; import preserves synthesized run_ids (no dupes
on re-import)
- stale post-run encodings: ribbons/edge labels dim at 0.45 when the
live structural hash diverges from the run's hash
- RibbonEdge: role=img on the aria-labelled group; deltaSize null
(unknown) no longer renders as pass-through; "ops" -> "gates"
- replicate loop: sticky progress notice (outlives the 4s fade) and
per-iteration clearLivePr…
Board/theater/export: overlay stacking, figure honesty, export text metrics
TheYuchen
77fb334
- boot "Connecting" overlay at z-50 (painted under board/theater/header)
- band run-start effect skips the band Evidence overlay when the theater
will auto-open (no double overlay)
- DemoArchiveBanner + board hint strips carry data-export-strip (F2 figures
drop guidance chrome); scenario force-reimport after "Clear demo data"
says so in the banner, and the Clear tooltip drops its "never" claim
- shared svgPaper.estimateTextW(chars, fontSize, bumped) budgets the x1.25
PAPER_FONT_BUMP in theater layout math: stop-label flip/intrusion,
panel title-dx, and the cost-anchor line (splits into two tspans when
the bumped width would clip; svg gets bottom pad for the second line)
- DifferenceFunnel viewBox width is two-tier: pane tier derives from the
container (labels stay >=9px effective; legend wraps to two lines),
export tier keeps the documented 760px geometry via a hidden twin
- F6/F8 pair picker excludes scenario-tagged records (F7's guard verified
already in place) and …
- Scenario auto-runs archive tagged (RunRecord.scenario, threaded
scenario key through pendingRestore -> pendingAutoRun ->
runPipeline -> buildRunRecord; preserved across archive import).
Scripted figure states are excluded from the theater's
prior-evidence pool and from the F7 overlay picker, so repeated F0
boots can no longer pollute the archive into a fake replicate group
or distort the evidence the figures claim to show (documented in
scenarios.ts).
- dedupeDraws ("exact replays counted once") now applies to EVERY
undisclosed pooling surface: theater archive band, fidelity-card
replicate strip, multiverse pooled band + pooled line, and the
lineage certainty funnel (seen-seed skip, same rule). Labels and
tooltips updated to say so; stats.ts's known-looseness note replaced
by the uniform truth.
- timesTrusted: a displayed run with no run_id is trusted only WHILE
streaming — a restored / cache-served run must not inherit the
previous run's seed chip, config…
Provenance state: no false forks, no stale pins, one-shot board replicates
TheYuchen
1cd2cb9
- clearGraph / loadPreset now clear restoredFrom, pinnedSeed,
precisionTarget and editorContext (mirroring the New-configuration
bridge, which also clears precisionTarget now): a preset or cleared
canvas is not a fork of whatever was restored before, and must not
replay an unrelated pinned seed.
- restoredFrom is consumed after the FIRST post-restore run archives:
only that run is the fork; later runs no longer inherit a false
forked_from lineage.
- The restore consumer writes the pin unconditionally — including
null — so board "Open" clears a stale pin from an unrelated replay.
- Board "+3 replicates" no longer mutates global toolbar state: a new
one-shot replicateOnce field rides the pendingRestore -> auto-run
bridge and is consumed by that single run; replicateCount is never
written.
- Palette-add appends nodes only: when the canvas already has edges
(hand-drawn or restored) it no longer recomputes the whole edge set
(which silently destroyed hand wiring) — i…
Layout: no horizontal page scroll at any width >= 768px (band overlay)
TheYuchen
78949f0
At 864px CSS the app rendered wider than the viewport: persisted pane
widths from a wider monitor were only clamped on window-resize EVENTS
(never on mount), and even freshly clamped the 768-1200px range cannot
host both panes in flow at all -- LEFT_MIN + RIGHT_MIN + MIN_CANVAS_W +
two resizers = 808px, so the Evidence pane and toolbar cluster sat past
the right edge and the board grid computed auto-fill columns from a
container wider than the screen.
App.tsx now carries an explicit RESPONSIVE CONTRACT comment block and
implements it: 768-1199px is the compact-desktop "band", where the
Evidence pane never takes layout width -- it boots collapsed to its
32px strip and, when expanded (strip click, run-start auto-expand, the
hintExpandRightPane bridge), opens as a right-anchored overlay over the
center column (bandEvidenceOpen: session state, never persisted, so
band sessions cannot rewrite the >=1200px preference). The mount+resize
clamp is band-aware and runs once at mount. The center …
The board header row (title, counts, New configuration, ?, plus an
lg-only "squares = pipeline stages / dot above / strip" note) crowded
the 768-1200 band. The inline note duplicated the header TipIcon's card
key verbatim and partially duplicated the orientation strip, so it is
removed rather than squeezed; the "?" reopener's strip now carries the
key inline (squares = stages, dot above = differs from baseline, one
dot per replicate) so the consolidation loses nothing recoverable.
Header keeps title, counts, New configuration, ?, export.
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…
IA inversion 2/4: board cards expand in place (marker card-expand)
TheYuchen
f10a7ab
The Evidence board becomes a working surface, not a menu. A chevron
(or the strip area) expands one card at a time — spanning two grid
columns only when the grid actually measures two (a span-2 in a
1-column auto-fill grid would mint a phantom implicit column) — into
an inline scale-2 summary:
* run-dots timeline: the newest 12 archived runs of the configuration,
chronological, on the SHARED evidence-mass encoding (dot area ~
sqrt(shots), ring = pinned seed, hollow red slash = errored, ink
outline = newest). The encoding is lifted from RunHistory into
lib/evidenceMass.ts so lineage and board size dots identically.
* the pooled Wilson interval as a labeled line (same pool the
collapsed band draws), or an honest "pooling needs >=2 runs with
counts" note.
* quick actions: replay latest (pins the run's seed, auto-runs),
+3 replicates (clears any stale pin, replicateCount=3, auto-runs),
open in editor, A/B. Replay/replicates stay ON the board: the
covered canvas consumes …
(a) RibbonLegend: still mounts only after the session's first run
(verified — the parent gates on the in-memory `run`), and now fades
out on its own after 20s (unmounts at 21s; mount-scoped timer, so
re-runs don't resurrect it). The × dismissal remains the only
persisted state. (b) Guidance-strip budget — at most ONE strip per
view, demo banner > hint: the Multiverse orientation hint collapses
to its header "?" while the demo banner is up (explicit "?" click
force-shows it for the session); the History-tab archive-io strip
starts collapsed to an "archive…" reopen chip when the banner
renders. (c) Evidence-pane header chip budget: at most two chips —
the seed chip absorbs the cached state as "cached · no seed" (a
precomputed response IS a response no seed was drawn for), replacing
the separate cached chip. (d) Node tiles audited: the post-run strip
cannot exceed glyph + headline/chips row + micro-CI row (chips row is
flex-nowrap, headline min-w-0 truncate, ≤3 shrink-0 chips); the
layout…
Evidence tabs = the three scales (three-scales IA)
TheYuchen
b54486e
Tab labels now mirror the paper narrative exactly: This run (scale 1,
within a run), This configuration (scale 2, replicates of one
configuration), Between configurations (scale 3). Internal ids
(current/history/compare) stay STABLE — scenario uiState, the
pendingEvidenceTab bridge and figure-export provenance key on them;
comments in ResultsPane + scenarios.ts pin the mapping. Tooltips are
one line per scale. The toolbar Theater button is gone: the theater is
This-run's expanded mode, so its entry affordance moved onto the
funnel card ("expand · theater", marker open-theater unchanged);
auto-open on streaming unchanged. This-configuration gains a compact
scale line ("every archived run; same-color runs are replicates of
one configuration") above the legend key. Every user-visible
cross-reference ("History tab", "Compare tab", "sends two cards to
Compare"…) updated coherently.
Multiverse orientation strip (multiverse-hint)
TheYuchen
3a0370e
The board had an empty-state intro but no guidance once cards exist
(the known first-contact rough edge from the UX wave). A slim
dismissable one-liner now sits pinned above the grid: "Each card is one
configuration - its pipeline, its outcome distribution, delta vs the
baseline card. Open rebuilds it; A/B sends two cards to Compare."
Same recoverable-dismissal contract as the lineage legend: localStorage
quda.multiverseHintDismissed, and a small "?" in the board header
brings it back.
* EvidenceTheater: right-margin readouts (final/so-far, target, pool)
go through dodgeMarginLabels (sorted anchors pushed >=12px apart,
clamped to the plot) in the multi-node small-multiple layout only —
single-panel F0 exports are recorded bit-exact SVGs and keep their
original anchors (the dodge subsumes the old pool-vs-final nudge
where active).
* Multiverse PipelineStrip: node cap 14 -> 11 (+k chip). 14 squares
= 233px and overflow the 240px card floor's ~210px content box;
long pipelines now degrade to an explicit count, not a crop.
Comprehension audit: close the self-explanation gaps
TheYuchen
530ca91
Walked every interactive element (toolbar, Evidence pane, history
rows, multiverse cards, theater, pickers, param editors) asking "does
this explain itself where the user finds it?". Most surfaces already
carry task-language titles/TipIcons; six gaps fixed:
- ×N replicate selector now states the caching consequence (the
deterministic prefix is served from cache after run 1; only
stochastic steps re-run) — previously only the cost chip said so,
and only once N>1 with history present.
- Precision-target selector states that the target is archived with
the run and restored on replay (an early stop reproduces exactly).
- Evidence tabs (Current run / History / Compare) gained one-line
title tooltips; the count badges inherit context from them.
- The two funnels now explain their relationship in both directions:
the fidelity-card funnel (shot batches inside one run) and the
lineage funnel (runs across a replicate group) cross-reference each
other as one motif in two contexts…
- EvidenceTheater stop annotation: a late stop (batch 7 of 8) ran the
~330px label past the 1000px viewBox; it now flips to the left of
the stop line only when the right side would clip. Threshold keeps
the verified F0 teaser label on its right side, bit-identical.
- Target corridor: yDomain clamps to [0,1], so with a point near the
scale ends a corridor value can fall outside the domain and y()
extrapolated the dashed line into the panel title. Out-of-domain
lines are skipped and the label y is clamped into the plot band.
- Manual Run now clears a still-pending scenario auto-run (the
consumer only defers on `running`, so it used to fire a second
unasked run after the manual one finished).
- Theater's pooled prior-evidence band refreshes on historyVersion
(deleting archived runs while the theater is open left it stale);
the created_at < startedAt cutoff makes the refetch idempotent
during replicate loops.
- Multiverse card stats row wraps at the 240px card minimum…
Wave J: uncertainty-in-provenance (evidence-mass lineage, pooled CIs)
TheYuchen
75184f5
Provenance views stop pretending states are deterministic — lineage
nodes ARE distributions, so the timeline now shows how certainty
accumulated over the session. Minimal honest version, one task per
mark:
* evidence mass (marker `evidence-mass`): lineage dot AREA propto
sqrt(executed shots), radius 3-7px against a fixed 2048-shot
reference; early-stopped runs are visibly lighter. Ring / slash /
edges / hover target track the radius; tooltip gains "N shots of
evidence".
* replicate-band certainty funnel: pooled Wilson CI half-width at
each row (counts summed oldest->newest; valid within a config
group: same underlying p), mirrored polylines around the lane
spine, narrowing upward ~1/sqrt(N) — Wave I's funnel motif, second
context. Tooltip: "pooled +/-X.Xpp after n runs / N shots".
* lib/stats.ts (new): wilson95 ported from
app/services/stats.py::wilson_interval with unit-anchor comments;
runEvidence / poolEvidence helpers.
* Multiverse cards: "pooled mu x.x% +/-y.y…
Wave P: paper-first reorientation
TheYuchen
79cd0aa
De-product: remove WelcomeTour(+slides), AuthButton/session UI,
Support(NSF)/Papers/Developers popovers, Lab link, UploadPluginModal
trigger; plugin protocol stays live via API. Neutral index.html
title/meta + PWA manifest. Header = name/tagline/env chip/live
toggle/theme.
Anonymous mode (double-blind): lib/anon.ts. VITE_ANON=1 build folds
identifying strings out of the bundle (EvidenceQ codename, no paper
bibtex, no GMU theme, vite plugin rewrites index.html+manifest);
?anon=1 runtime fallback hides the same surfaces on normal builds.
Audit: zero user-visible identifying strings in the anon dist.
Figure export with embedded provenance: lib/figureExport.ts + camera
buttons on canvas toolbar / Multiverse header / Evidence header.
True-SVG for svg targets, foreignObject-SVG + 2.5x PNG for HTML
composites; paper transform (white bg, fonts x1.25, chrome stripped);
SVG <metadata> + .provenance.json carry app version, export time,
run_ids/root_seeds/config_hashes of every visible run and t…
Backend: sampled fidelity always runs as B=min(8,max(2,shots//128))
batches; batch i seeded sha256(f"{node_seed}:batch:{i}") so replays
are bit-exact regardless of any run's stopping point. Streaming SSE
interleaves {"step_progress": {node_id, batch_i, n_batches,
shots_done, successes, point, ci95}} frames (worker thread + queue in
the executor; eager path unaffected). RunRequest.precision_target
(CI half-width, (0,0.5]) = server-honoured optional stopping, min 2
batches; distribution records shots executed vs requested,
stopped_early, and the full per-batch trace. qlib duplicates the
Wilson fn (no app import from qlib); twins pinned equal by test.
Frontend: toolbar precision-target select (off/±5/±2/±1pp); live
narrowing CI band + shot counter on node faces from streamed frames;
evidence-funnel in the fidelity card (one line per batch, opacity
ramp, target ticks at point±target, early-stop annotation); RunRecord
persists precision_target + stopped_early; restore/replay writes the
tar…
Backend: AerSimulator.from_backend / NoiseModel.from_backend rebuilt
the full 100+ qubit device noise model on every sampled-fidelity and
QuCAD step (~40-90 s of GIL-bound Python per fresh run — the dominant
cost of every uncached run on the Space). Fake* snapshots are frozen,
so the derived model is memoized by backend name (live IBM backends
never cached). qlib/qiskit_utils.aer_simulator_for / noise_model_for.
Frontend: plumbing for a bundled first-visit evidence archive —
RunRecord.demo flag, lib/demoArchive.ts (ensureDemoArchive imports
data/demoArchive.json via buildRunRecord on first visit only, decided
flag quda-demo-decided, clearDemoRuns), DemoArchiveBanner on the
Multiverse board + History tab, per-row demo chip, multiverse landing
for first visits, welcome-slide tagline reframed to the evidence
story. Archive JSON itself ships in the next commit (placeholder []).
Multiverse board: configurations as small-multiple evidence
TheYuchen
4bf1a9d
The set of configurations the analyst has tried becomes a first-class
workspace. A Compose|Multiverse segmented toggle in the canvas toolbar
flips the center column to a MultiverseBoard: one card per config_hash
group, each with a topological pipeline schematic (family-colored 8px
squares, warn dots on stages whose params differ from the baseline),
the outcome distribution on a shared 0-1 scale (group hue, mean tick,
latest emphasized), Δmean vs the most-tried (baseline) configuration
in pp with an "(n small)" honesty flag under 3 replicates, and
Open/A-B actions wired into the existing restore + compare bridges.
The board overlays the canvas instead of replacing it so React Flow
graph state and the pendingRestore watcher survive mode flips.
hashHue/hueCss move to lib/hues.ts, shared by RunHistory and the
board so a configuration keeps one color everywhere. Tour welcome
slide gains one sentence pointing at the mode.