Commit History
-
Guided lessons: four beginner micro-experiments (marker: guided-lessons)
TheYuchenNew 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…edfa7f5
-
Canvas/palette S3 sweep: id collisions, touch-cancel, caps, honest encodings
TheYuchenAudit 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…728039f -
Evidence pane: compare-selection lifecycle, honest empties, marker clamps
TheYuchen- pane auto-switch keyed on compareIds identity (pair replacement re-fires) - compare selection pruned after Clear demo data / archive import; setCompareIds dedupes; CompareView renders "runs no longer archived" instead of a silent blank when records are gone - interval-bar point markers clamp at the 0/1 scale edges (cards clipped by overflow-hidden; CompareView twins overhung) - RunHistory restore/replay titles tell uploaded-circuit records' truth ("re-upload to reproduce"); lineage footer names the 50-run window - PluginFigures bar with data:[] renders a stub instead of crashing the panef2fb736 -
Evidence pooling honesty: scenario tagging, replay dedupe everywhere, timesTrusted
TheYuchen- 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…65e036f
-
Archive export/import (archive-io): the promised cross-device channel
TheYuchenrunStore's header has promised "export/import of archives covers cross-device hand-off" since the provenance rework; nothing implemented it. Now: exportArchive(runIds?) downloads {schema: 1, exported_at, records} (oldest first so ancestors precede forks), importArchive(file) validates the top-level shape, re-normalizes every record through buildRunRecord — the file's config_hash/headline/derived fields are never trusted — preserves created_at + the demo honesty flag verbatim, skips run_id collisions, and bumps historyVersion once. UI: an archive-io strip under the History tab's legend key with "export archive" / "import" buttons and a per-action report line; import is also reachable in the zero-runs empty state (a fresh device is exactly where a handed-off file arrives). This is the user-study data-collection channel — the server stays stateless by design, so the participant's browser archive is the only copy until exported.3089d9e
-
Wave I: anytime evidence steering (live CIs, optional stopping)
TheYuchenBackend: 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…7fa375a -
Memoize fake-backend noise models; first-visit demo archive machinery
TheYuchenBackend: 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 []).b84dc32 -
Evidence pane: tabbed IA, shared-prefix folding, reproducible export
TheYuchenInformation architecture: the results pane is now the Evidence pane with three tabs — Current run (step cards + final metrics + hints), History (lineage view, always expanded, no own collapse toggle when embedded), Compare (instruction pointing at History's checkboxes until two runs are picked). Badges: History = archive size via a new countRuns() IndexedDB count (refreshed on historyVersion), Compare = selection count. Auto-switch: starting a run -> Current; ticking the 2nd compare checkbox -> Compare. flex-wrap tab bar so the pane still works inside the mobile drawer; collapsed strip + drawer title renamed to Evidence. Comparison: consecutive leading step rows that are identical on both sides (same node kind, no structural param diff for that kind, equal transformation-signature deltas) fold into one expandable "shared prefix - N steps" <details> row; the first divergent row carries an accent left border + "divergence point" label. Rationale in code: the analytical question is where…f25d955 -
Provenance timeline: run archive, restore/replay/fork, replicates
TheYuchenPhase 1 of the evidence-workbench rework. Every completed run is now archived client-side (IndexedDB — the server stays stateless by design) as an immutable RunRecord: the graph in share-link serialization, the full per-step response, and the seed envelope. Run history panel (results pane): newest-first timeline with a structural configuration hash chip — runs sharing a chip are replicates of the same experiment. Actions per entry: restore (canvas + circuit come back exactly), replay (restore + pin the recorded root seed, so Run reproduces the exact draw), delete. Restores thread forked_from lineage into subsequent records. Replicate execution: a ×1/×5/×10/×20 selector runs the same configuration N times with fresh seeds, sequentially, archiving each draw. The fidelity card now renders sampled results as what they are — a draw, not a number: Wilson 95% CI on a fixed 0-1 scale, the top-outcome histogram, the consumed seed, and an across-runs strip that accumulates one dot per archived…f2c03b7