Learn track, part B2: "Waves that cancel" + signed amplitude bars
TheYuchen
bf4e707
learn/AmpBars.tsx — the arrow picture: one signed bar per outcome
(up=+ / down=-, height=|amplitude|), odds kept SEPARATE as a thin
overlay bar + %, so arrows-are-not-odds is visible; optional dashed
ghost route-arrows; bars animate through zero via scaleY.
Step4Interference.tsx — H·H on |0> as a <->-stepped three-frame story
(never autoplay); the last frame shows the two routes into each
outcome as ghosts (into 1: one +, one -, merging to zero); a Z toggle
between the H's flips the hidden sign and the cancelling swaps sides
(certain 1), in place. Glossary gains `interference`.
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…
Cleanup: dead touch-drag bridge, empty-state + tour copy, docs
TheYuchen
d17180a
- touchDrag / pendingTouchDrop machinery removed from the store and
FlowCanvas (selectors, both effects, the TouchDragPreview chip):
the shelf was its only producer — grep confirms zero remaining
references. Tap-to-add via the Add-block popover is the touch path;
the shared splice-highlight logic (findClosestEdge +
dropTargetEdgeId) stays, since the mouse drag-from-popover path
still uses it.
- EmptyCanvas teaches the two add paths ("+ Add block", drag from a
block's edge into empty space) and carries the five-stage grammar
line the shelf used to illustrate.
- Tour slide 2 (ComposeSlide) no longer claims a pipeline shelf
exists; minimal rewording to "+ Add block" + edge-drag, grammar
order kept.
- docs/EVIDENCE_WORKBENCH.md: the palette-as-grammar paragraph
rewritten honestly — shelf superseded by the chooser popover +
grammar-aware insertion; design principle stated (constant chrome,
growth in on-demand surfaces).
- Store/FlowCanvas comments updated to name t…
The pipeline grammar moves INTO the canvas. Two openers, one mini
chooser (CanvasInsertMenu, ~240px, internal scroll, Escape/outside
dismiss via useDismissOn):
(a) onConnectEnd — releasing a connection drag from a node's SOURCE
handle over EMPTY pane opens the menu at the drop point, filtered to
nextFamilies() of the dragged-from node's family. Picking a block
creates it there AND wires the pending connection to it.
(b) double-click on empty pane — same menu, unfiltered (all five
stage sections in mini form), no wiring. zoomOnDoubleClick is off so
the gestures don't fight.
nextFamilies lives in autoConnect.ts next to FAMILY_ORDER — the
grammar source of truth — and is derived from how autoConnect builds
chains: any later family can directly follow (empty buckets are
skipped when flattening); algorithm→algorithm and metric→metric may
repeat (unwarned legal chains); source→source and backend→backend are
excluded because they are exactly the shapes autoConnect's advisory
warnings flag;…
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…
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.
Global toast channel: store globalNotice + App-level host; palette alert() migrated
TheYuchen
535c56c
The store gains globalNotice ({text, tone} | null) + setter — the
cross-component notification bridge the audit backlog deferred. App.tsx
renders a GlobalToastHost fixed to the viewport's bottom-center at
z-50, styled to mirror the canvas toast (tone palette, auto-fade ok=4s
/ warn=8s, danger sticky with an explicit dismiss). NodePalette's
plugin-delete failure alert() now goes through it; window.confirm
stays as the blocking guard before destructive plugin deletes, and the
FlowCanvas-local canvas Notice stays local (positionally contextual).
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…
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 …
- 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 pane
Run-lifecycle guards: no canvas swaps, surprise runs, or false toasts mid-run
TheYuchen
72fe4f4
- restore consumer refuses (queues) while running; applies when the run ends
- pendingAutoRun expires on restore consume / loadPreset / clearGraph
- restore-path loadSample shares the preset path's generation guard
- replicate loop reports "stopped after i of N" on step failure or transport
error instead of the unconditional success toast
- Run button becomes "Stop after this run" while a replicate loop runs
(flag checked between iterations; the current run completes + archives)
- boot default-sample failure sets a warn notice; disabled Run buttons say
"No circuit loaded - pick one on the left"
- authoring locked while running: param editors, node delete x, preset picker
- config-context bar: liveHash reset on context switch + "computing identity"
state (no stale-hash flash); FlowCanvas publishes canvasKinds to the store
- runStream: after the read loop, flush the TextDecoder and parse the
remaining buffer — a final event without a trailing newline (or a
multi-byte char split across the last chunk) was silently dropped,
losing the last step or a cached response.
- Unknown JSON events are treated as StepResults only when
parsed.node_id is a string, so a future event type can't masquerade
as a pipeline step.
- docs/EVIDENCE_WORKBENCH.md: dedupe-admissions paragraph rewritten to
the new uniform rule; stale "+3 replicates" description fixed;
appended "Deep audit 2026-07-10 — Wave 1 fixes" section (one line
per fix).
- 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…
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…
Honest signals: gauge fill actually renders; QuCAD preflight tells the truth
TheYuchen
10b136b
- results/viz Gauge: theme tokens are raw RGB triplets, so
background: var(--color-ok) was invalid CSS and the fill rendered
as nothing — wrapped as rgb(var(--color-ok)) etc. (RibbonEdge
pattern). Whole file audited; these were the only occurrences.
- preflight: QuCAD-without-backend claimed "will use the default
FakeFez", but _handle_qucad hard-errors without a backend (the
FakeFez fallback exists only for QuBound/CompressVQC). Now severity
"error" with wording aligned to autoConnect and the backend handler:
"QuCAD needs a backend node upstream — it will error at run time."
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…
Palette taglines fit the tile: no mid-thought ellipsis
TheYuchen
c50b89a
At the 108px tile width the 9px tagline clamps at two lines, and three
built-ins ellipsized mid-thought live ("your quantum...", "predict
today's erro...", "recommend shot..."). Taglines are rewritten to
honest microcopy that reads complete inside the budget: your circuit /
simulated IBM chip / error bound / shot count / fold gates;
noise-aware pruning, fresh IBM calibration, how close to ideal?, and
final metrics & diagram already fit and stay. The full thought lives
in `description`, which is the tile's hover tooltip (unchanged), and
the NodeSpec.tagline doc now states the two-line budget so future
blocks cannot regress it.
UI speaks the field's language: precision correspondence + cost anchor
TheYuchen
a6120cc
* Glossary precisionTarget: adds the documented-practice
correspondence (IBM Estimator `precision`, default 0.0156 ~ ±3.1pp
at 95% two-sided; Quantum Volume's 97.5% one-sided gate). Our 95%
two-sided Wilson semantics stay unchanged -- comment explains why
(system-wide convention; QV mapping documented in doc 1.2, no
convention switcher). Flows into the toolbar select tooltip, the
theater target tags and the tour TipIcon via the shared gloss.
* Evidence Theater (marker cost-anchor): under "evidence spent", a
secondary estimate line translating the run's wall-clock duration
into IBM pay-as-you-go dollars ($1.60/s) and percent of the Open
Plan's 10 min/28d grant, labeled "simulator wall-time as proxy;
hardware timing differs"; only rendered when a duration is known.
Bottom margin 66->80 to make room. Shorter twin appended to the
cost chip tooltip. Constants + source in lib/costModel.ts.
* Claims map: "grounded in:" mini-line per contribution group.
* Tour slide 3: …
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 …
IA inversion 1/4: the Evidence board is home
TheYuchen
2e43c22
Store default workspaceMode = "multiverse"; the last mode is persisted
per device (quda.workspaceMode) and read synchronously at store
creation, so returning users boot straight into their mode and a
first-ever visit (no stored value) paints the board from the first
frame. That unifies the two landing paths: App.tsx's demo-import
branch that used to force the board landing is removed. Scenario boots
write the store field directly (useApp.setState) so scripted figure
states never overwrite the preference.
Labels renamed, internal ids FROZEN ("compose"/"multiverse" stay in
scenario uiState, localStorage and provenance): WorkspaceToggle now
reads "Evidence board" (home — every configuration and its evidence)
and "Pipeline editor" (define or modify one configuration), board
segment first; the label<->id mapping is pinned in the toggle + store
comments. Store also gains the editorContext / newConfigRequest
bridges the definition-view bar and the board's New-configuration
button consume (wi…
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.
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…
Doc: improvement wave section (export-gap + health blemishes closed)
TheYuchen
19e23d4
EVIDENCE_WORKBENCH.md gains the 2026-07-10 improvement-wave section
(all seven items with rationale and verification bar), the scenario
range references move F0..F6 -> F0..F7, and item 12's export claim was
already updated to now-true in the first commit of the wave.
New figure capability: when two archived runs share a config_hash and
both persisted per-batch traces, the Compare tab offers "overlay in
theater" — the evidence theater renders BOTH runs' funnels on one axis
pair (run A accent/blue, run B warn/amber, envelopes at .07 alpha,
constant ∓3.5px x-dodge on the shared batch grid, per-run stop
annotations in stacked top-band rows, a shared target corridor only
when both runs executed the same rule, per-run id+seed legend in the
context strip). The visual argument: the stopping rule is
deterministic, the draws are not — "two replays of one configuration —
same rule, different draws". The trace scrubber drives both series in
lockstep (scrubSeries clamps per series). Store: theaterOverlayIds;
closing the theater or starting a new run exits overlay mode; deleting
either record mid-view exits instead of rendering a stale pair. Figure
export takes the true-SVG path as evidence-theater-overlay_<slug>.svg
with both run_ids/root_seeds in the provenanc…
Archive export/import (archive-io): the promised cross-device channel
TheYuchen
3089d9e
runStore'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.
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.
Compare reachability: one hop from where the question arises
TheYuchen
8311ef0
* RunHistory: while exactly one compare checkbox is ticked, a status
chip at the panel top says what completes the gesture ("1 of 2
picked — tick one more run, or A/B a card in Multiverse"); the
first tick used to feed only a tab badge.
* Fidelity card: with >=2 archived runs of the current configuration
the across-runs strip grows a "compare vs previous run" link
(marker compare-vs-previous) setting compareIds to the two latest
run_ids via the new store action setCompareIds — the Evidence
pane's existing length===2 auto-switch takes over.
Remove the GMU-branded theme entirely
TheYuchen
ceee520
Double-blind treatment is no longer needed (reviewers see the paper,
not the site), and the branded palette was the last piece of identity
chrome with real maintenance cost: theme.ts gated it behind ANON,
vite.config.ts carried a CSS-stripping generateBundle hook, and every
new visual had to be checked under a third palette.
- theme.ts: ThemeKey is light|dark; gmu entry gone; stored "gmu"
preference migrates to the light default (comment documents it).
- index.css: [data-theme="gmu"] token block deleted.
- vite.config.ts: %THEME_KEYS% is always ["dark"]; the anon
CSS-stripping hook is retired (nothing left to strip). The rest of
the VITE_ANON machinery (titles, manifest) is unchanged.
- Stray "three themes" comments updated.
Residue grep: only the migration comment mentions the old key.
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…
Evidence Theater: steering becomes the visual protagonist (+F0 teaser)
TheYuchen
f686793
The system's most novel contribution -- anytime evidence steering
(streaming CI narrowing + optional stopping, Wave I) -- was the
smallest element on screen. New EvidenceTheater overlay (auto-opens on
the first step_progress frame, dismissable, localStorage auto-open
pref, toolbar + fidelity-card reopen affordances): one big SVG funnel
per sampled node -- per-batch Wilson CIs on a linear shots axis with
convergence envelope, first-interval-anchored auto-zoom, dashed target
corridor + early-stop annotation with unspent-shots region, client-
timed cost row (caveat commented) with server-total fallback, and a
context strip (config hue chip, live root-seed via new runStream
onMeta hook, pooled prior-evidence archive band). Store retains per-
node stamped traces until the next run so the theater outlives the
step; true-SVG figure export with embedded provenance.
Scenario F0 (the teaser): bell_state on FakeFez, 4096 shots, sampled
fidelity, target +/-2pp, pinned seed 2026 (probed live: all …
M1 scenarios.ts QUCAD_GRAPH is now a literal copy of bundled demo
record 5c2a6a71a7a4's graph (ids n1..n5, sampled fidelity, same
params/positions) instead of an s1..s5/statevector rebuild —
F1/F5 runs now group with the demo cards (same config_hash) and
pinned seed 336157917 replays the archived numbers bit-exactly.
M2 Optional-stopping honesty in three places: limitation block at
the stopping rule (qlib/qiskit_utils.py — width-based
data-dependent stopping perturbs exact nominal coverage of the
final fixed-n interval; confidence sequences are the rigorous
alternative), one sentence in the Wave I doc section, and a
clause in the precision-target tooltip.
M3 Anon builds scrub the branded theme completely: generateBundle
strips the [data-theme=gmu] CSS block, and theme.ts gates the
stored-preference fallback behind !ANON so the key literal is
dead-code-eliminated from VITE_ANON JS (runtime ?anon=1 behavior
unchanged). Anon dist grep…
* workflow_service: a step-cache hit now re-stamps the CURRENT
node's id onto the served StepResult. The prefix hash ignores node
ids, so a cached step written by a graph with different ids was
served verbatim (live-reproduced: an s1..s5 scenario run poisoned
a n1..n5 archive replay, which came back with node_ids s1..s3 the
frontend cannot map). NOTE this fix only repairs the id, not the
deeper pinned-cache identity hole — per-node seeds derive from
node ids but the pinned cache key does not include them, so
structurally-identical graphs with different ids can still serve
each other's draws under the same root seed (see audit report).
* FlowCanvas: ribbon-legend localStorage key renamed quaim-* ->
quda.* ("quaim" matched the identifying Space slug and shipped in
the VITE_ANON bundle, contradicting the doc's anon-audit claim).
* scenarios/doc: F3's expected stop corrected to the value the live
API actually produces (2,560 of 4096 shots; 512-shot batch
granulari…
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: correct F3 expected stop point (verified against live API)
TheYuchen
38c04fd
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 []).
Seed coverage for QuBound/Qshot + cost estimates from run history
TheYuchen
91b2cd9
Closes the two remaining claim-integrity gaps for "every run is
exactly replayable" over "stochastic, costly experiments":
Seeds. QuBound trains its LSTM on BOTH ok paths (live IBM history and
the cached 14-day pickle) — there is no precomputed-only branch in the
handler — so both now seed the global RNGs (_seed_stochastic_libs:
random + numpy + lazily-imported, try/except-guarded torch) and thread
node_seed into qlib (Aer seed_simulator + Sabre seed_transpiler in
get_labels_fromNoise); results carry nondeterministic=True +
seed_used. Qshot's pilot seed was 99991 + hash(str(base)) — str hashes
are PYTHONHASHSEED-salted, i.e. "fixed" only until the next server
restart. pilot_seed is now threaded predict → recommend_shots →
compute_pilot_pf, making the recommendation reproducible across
processes given the seed. Executor cache logic untouched: fresh runs
draw fresh node seeds (honest new draw, cache-bypassed), pinned runs
re-derive the same seeds (cacheable in the seed-salted namespace)…
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.
Information 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…
Composition comparison: two archived runs side by side, CIs not scalars
TheYuchen
d105dc7
Phase 3 (minimal viable) of the evidence-workbench rework. Pick any
two runs in the history panel (checkboxes, keep-latest-two) and a
comparison panel renders:
* configuration diff — params matched structurally by (kind,
occurrence) exactly like configHash, so node ids and layout don't
matter; circuit swaps surface as a "circuit" row;
* same-configuration detection — when the config hashes match the
panel says so explicitly ("differences are noise"), because that
changes how any metric gap must be read;
* fidelity compared as intervals — both Wilson CIs on one 0-1 scale
with the Δ in percentage points, and an explicit "intervals
overlap: not evidence" callout when the difference is within
run-to-run noise at these shot counts;
* step-by-step alignment with each side's transformation signature.
Transformation signatures: uniform circuit-delta vocabulary per step
TheYuchen
f956d64
Phase 2 (part 1) of the evidence-workbench rework. The executor now
snapshots the circuit's structure (shape + gate counts by op) before
and after every dispatched node and stamps a uniform transformation
payload onto each successful StepResult: before/after snapshots,
shape delta (qubits/depth/gates/params), per-op count delta, and a
changed flag distinguishing pass-through steps from mutating ones.
Captured centrally — handlers (and user plugins) never build this
themselves, which is what keeps the vocabulary identical across
QuCAD pruning, CompVQC folding, transpiles, and anything a plugin
does. Kind-specific detail stays in each handler's summary.
Frontend renders it at two densities: SignatureTile on canvas nodes
(nonzero delta channels only, e.g. "D-4 G-12 P-12"; decrease=green
since every optimizer in the catalog aims downward, increase=amber,
qubit-width neutral) and SignatureCard in the results pane
(before → after per channel + per-op chips). Pass-through steps say
so expli…
Provenance timeline: run archive, restore/replay/fork, replicates
TheYuchen
f2c03b7
Phase 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…
Provenance core: run identity, replayable seeds, distribution payloads
TheYuchen
2efd890
Phase 0 of the evidence-workbench rework. Every run now gets a
server-stamped provenance envelope (run_id, seed_mode, root_seed,
app_version) in both the eager and SSE routes; the SSE stream opens
with a run_meta event. Every run draws a root seed even when the
caller doesn't pin one, so any historical run is replayable later by
sending its recorded seed back.
Per-node seeds derive from sha256(root_seed, node_id) — independent
of execution order and of unrelated graph edits, keeping A/B
comparisons honest. Sampled fidelity accepts the seed
(seed_simulator) and reports a structured distribution payload:
binomial successes/shots, Wilson 95% CI, top-16 outcome histogram.
Cache semantics: seed-pinned runs live in a salted cache namespace
and may cache stochastic steps (reproducible by construction); fresh
runs keep today's namespace and the nondeterministic bypass.
Precomputed disk-cache responses are never served for pinned runs.
19 new unit tests (seed derivation, Wilson edges, salted…
Three concrete refactors that reduce surface area for future bugs and
make the codebase easier to maintain by hand or by LLM.
1. backend/app/services/workflow_service.py — run_pipeline and
run_pipeline_stream used to be two 100+ line copies of the same
dispatch loop. Extract a single _execute_pipeline generator and
make both functions thin wrappers (one collects into a list, the
other yields). Per-node dispatch (input / built-in / plugin /
skipped) and the post-step circuit_shape stamping are factored
into _dispatch_one_node. Plugin hydration becomes a named helper
instead of an inline block duplicated on both paths.
Also pulled out _clamp_shots and _set_backend_ctx so the two
backend handlers share their shots-clamping and ctx-writing
patterns; _cache_put's prefix_types argument becomes required
(all call sites pass it; the dead 'None means skip sidecar'
branch is gone); the run_cache.qpy_dump_bytes import moves to
the top of the file with the …