Commit History
-
Compare reachability: one hop from where the question arises
TheYuchen* 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.8311ef0 -
Restore/replay: transient pulse on the rebuilt canvas
TheYuchenpendingRestore (History restore/replay and scenario boots — same bridge) swaps the whole canvas behind the pane the user clicked in; the silent mutation read as "nothing happened". Every restored node now pulses one 1.2s accent ring (.restore-pulse, index.css), class stripped after 1.4s via functional setNodes so mid-window drags survive and the next restore re-triggers. Global prefers-reduced-motion rule collapses the animation.123b5a8 -
TipIcon: portal the tooltip out of overflow containers
TheYuchenThe CSS-only bubble clipped inside every overflow ancestor (Evidence pane scroll body). createPortal to document.body, position:fixed from the trigger's rect, measured-then-placed, flips above/below by viewport space, clamps horizontally, closes on scroll/resize. Hover+focus preserved; sr-only hint keeps the accessible name inside the trigger (portal bubble is aria-hidden + pointer-events-none). Export-safe: trigger keeps data-export-strip, bubble lives outside every exported subtree. No new deps.d3d2c90 -
Typography audit: 9px floor, label/decimal convergence, conventions note
TheYuchenInventoried font sizes, label casing, chip styles and number formatting across the seven views. The system is already largely convergent; three real drifts fixed, and the convention is now written down next to the tokens (index.css UI-conventions block): - 9px floor: the only two sub-9px labels (CompareView "divergence point", BlockPicker "plugin" suffix) bumped from 8px to 9px. - Section-label convention: FinalMetrics' uppercase labels were the one instance missing tracking-wider. - Compact-line decimals: the fidelity card's across-runs line mixed a 2dp mean with a 1dp range in one sentence — now 1dp like every other strip/board stat (headline metrics and mono detail lines stay 2dp; targets stay whole pp). Deliberately NOT churned (documented instead): tracking-widest on palette family badges (distinct role), micro-chips in 28px history rows and tab count badges (px exceptions), CompareView's 2dp Δ (it sits in a 2dp mono detail line).2e22380 -
Comprehension audit: close the self-explanation gaps
TheYuchenWalked 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…530ca91 -
Restore the welcome tour, rewritten for the evidence workbench
TheYuchenThe Wave-P de-product pass deleted the product-era tour along with the identity chrome. Reviewers see the paper rather than the site, so onboarding affordances can return — but the old slides narrated a feature tour of a system that no longer exists. This resurrects the modal shell (keyboard nav, progress dots, first-visit localStorage flag, backdrop dismiss) and rewrites all content around the current narrative in five slides: 1 What this is — pipelines as seeded, archived, replayable experiments ("evidence, not just output") + schematic SVG. 2 Compose & run — palette → canvas → Run; ribbons as circuit flow, node faces as delta strip + CI bar. 3 Evidence accumulates — ×N replicates, lineage (hue=configuration, dot area=shots), the narrowing funnel, precision-target stopping. 4 Compare & explore — Multiverse small multiples, A/B with honest intervals ("overlap ≠ evidence"). 5 Try it — demo archive first moves; "Open Multiverse" button; ?scenario=F0 pointe…afdd2a9 -
Remove the GMU-branded theme entirely
TheYuchenDouble-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.ceee520 -
Audit D+E: theater annotation clamps, auto-run supersession, pool refresh, card wrap
TheYuchen- 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…5bd8443 -
Audit C+E4: lineage row crowding; compare selection survives deletion
TheYuchen- RunHistory rows: fixed-width chips (time, hash, demo, F=, stop, seed, 3 buttons) summed past a narrow Evidence pane's width and the overflow-x-hidden aside silently clipped the restore/replay/delete buttons. The middle metadata now lives in a min-w-0 overflow-hidden group (name truncates first, then chips clip) so actions stay reachable at any pane width; rows remain strictly single-line, so the gutter's RUN_H dot arithmetic is untouched. - Deleting a run that is selected for comparison now deselects it; CompareView additionally re-resolves on historyVersion and clears itself when either record is gone (it used to keep rendering the deleted run's data), and a lookup failure no longer leaves a stale pair. - CompareView header wraps: the verdict chip pushed the close X out of narrow panes.e200590 -
Audit A+B: header/toast stacking above overlays; toolbar wraps instead of clipping Run
TheYuchen- TopBar z-20 -> z-40: the ThemeSwitcher dropdown lives inside the header's stacking context, so the Multiverse board (z-20) and the Evidence Theater (z-30) overlays painted over it where it hangs below the bar. Mobile drawers (z-40/50, later in DOM) still cover. - CanvasToast z-30 -> z-40: run errors / replicate notices fire while the theater (which auto-opens on streaming runs) covers the canvas and were invisible behind it. - Canvas toolbar: min-h-12 + flex-wrap (row and action cluster, min-w-0 so wrapping actually engages). The cluster's md:/lg: label breakpoints key on the viewport while the row lives in a resizable column; at 1280-1440px windows with default panes the row overflowed and clipped the Run button. One-line case renders pixel-identical. - Copy: last "Results" remnants -> "Evidence" (TopBar drawer button title/aria, App resizer aria-label).a5c47fa -
Wave Q: paper figure pipeline (trace scrubbing, AI-grade SVG, 4x raster)
TheYuchenFilmstrips: 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…9ee0efc -
Evidence Theater: steering becomes the visual protagonist (+F0 teaser)
TheYuchenThe 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 …f686793 -
Audit M1-M3 + minors: lineage, stopping disclosure, anon scrub
TheYuchenM1 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…e52951c -
Audit fixes: cache-hit node_id re-stamp, anon key, honest copy
TheYuchen* 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…18ca665 -
Wave J: uncertainty-in-provenance (evidence-mass lineage, pooled CIs)
TheYuchenProvenance 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…75184f5 -
Demo archive: finish Wave-I re-record (3 vqc_2q_small records)
TheYuchenFire-and-repoll against the live Space: the first request warms the memoized noise model server-side (client times out by design), the re-request hits the pinned step cache instantly. All 17 records now carry per-batch traces; every trace's last frame equals the distribution totals; the same-seed replay pair (records 2/16) is bit-identical. run_ids / created_at / lineage preserved verbatim.0584fbb -
Wave P: correct F3 expected stop point (verified against live API)
TheYuchen38c04fd -
Wave P: paper-first reorientation
TheYuchenDe-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…79cd0aa -
Wave I: re-record bell demo records under batched draw scheme
TheYuchenThe Wave I per-batch seed schedule makes pre-Wave-I sampled records non-replayable (a single 2048-shot draw != 8 seeded 256-shot draws). Re-recorded all 14 bell_state demo records (512 + 2048, incl. the same-seed replay pair) against the live API via the resumable script; each now carries the per-batch trace and replays bit-exact. The 3 vqc_2q_small (QuCAD) records still carry old-scheme numbers — the loader degrades gracefully (omits the funnel, keeps the CI bar); finish them with scripts/rerecord_demo_archive.py on an idle Space. Doc: migration status + live regression numbers recorded.a892a99
-
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 -
First-contact evidence: bundled real demo archive, multiverse landing
TheYuchenfrontend/src/data/demoArchive.json: 17 genuine RunResponses recorded against the live deployed API (post noise-model-memoization build), 79 KB: * Config A — bell_state | fake_backend(FakeFez, 512 shots) -> fidelity(sampled) -> output; 8 seeded replicates, fidelities 0.457-0.508 (real shot noise, Wilson CI width ~0.086). * Config B — same pipeline at 2048 shots; 5 replicates, CI width ~0.043 -> the A/B interval-width story in compare is real. * Config C — vqc_2q_small | fake_backend -> qucad -> fidelity (sampled) -> output; 3 runs, ~0.967, QuCAD keeps 1 of 2 params (P-2 delta glyph + gate-level diff payloads present). * One replay pair: Config A run f0cb7403bbae re-run under its own pinned seed 815033775 -> distinct run_id, bit-identical fidelity, forkedFrom lineage edge + pinned ring in the timeline. All runs are seed-pinned (client-drawn random seeds) because that is what makes each record replayable bit-exact from the archive — and what made coll…8829e2f -
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 -
Seed coverage for QuBound/Qshot + cost estimates from run history
TheYuchenCloses 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)…91b2cd9 -
Multiverse board: configurations as small-multiple evidence
TheYuchenThe 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.4bf1a9d -
Circuit ribbon canvas: the pipeline itself becomes the visualization
TheYuchenPost-run, circuit-flow edges render as tapered ribbons (custom React Flow edge type): band thickness = clamp(1.5·sqrt(gates), 3, 18)px at each end, sampled-bezier polygon so the taper shows each downstream transformation; downstream half tinted ok/green when the step shrank the circuit, warn/amber when it grew. Backend side-channel edges stay thin/dashed (they carry calibration, not a circuit); pre-run edges unchanged. Node faces: delta-strip glyph now anchors the full tile width (stretch prop, preserveAspectRatio=none keeps the encoding invariant) and sampled-fidelity steps get a 3px CI bar (interval band + point tick, 0-1 scale) on the tile. Dismissible bottom-left legend chip (localStorage) keys ribbon width / taper tint / delta strip.324791f -
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 -
Gate-level circuit diff: qubit-lane LCS alignment per step
TheYuchenBackend: - New services/circuit_diff.py: lane_sequences() tokenizes each qubit's gate sequence (name + 3dp param fingerprint; unbound params keep symbol names; 2q gates on both lanes with c/t role tags, symmetric ops undecorated; measures kept, barriers skipped) and diff_lanes() aligns before/after lanes with a standard LCS diff (kept/removed/added in merged order). Hard cap 12 qubits / 600 combined ops -> truncated marker. - Executor: copy the circuit BEFORE dispatch (handlers may mutate ctx["circuit"] in place -- the historical QuBound measure_all bug shape), stamp gate_diff into StepResult.transformation when the step changed the circuit. Best-effort: any diff failure is logged and omitted, never breaks a run. - tests/test_gate_diff.py: 14 torch-free unit tests incl. an executor wiring test that mutates in place. Frontend: - New CircuitDiff.tsx inside SignatureCard, collapsed <details> ("Gate-level diff / N removed / M added"): one mono-labelled row per qu…94e47b0 -
Signature glyph: designed delta-strip encoding replaces text chips
TheYuchenThe transformation signature is now a real glyph, not typography: a fixed-order strip of horizontal diverging bars (D, G, P, Q top to bottom) around a center zero axis. Bar length is relative change (delta/before, capped at +/-100%) so a depth halving reads the same size on any circuit; decreases extend left in the ok tone (every optimizer here aims to shrink), increases right in warn; qubit changes are neutral accent either way (width is a property, not a cost). Zero channels render as faint ticks so the 4-row silhouette is constant - glyph recognition depends on the constant frame. New export SignatureGlyph({t, size}) draws the strip from a raw payload at two densities: tile (46x14, tooltip carries numbers) on canvas nodes and in the CompareView step table (replacing sigText cells; sigText survives as tooltip), and card (180x56, channel letters + printed deltas) in the results pane, beside the exact before->after grid. Per-op chips become a |delta|-sorted diverging bar list. All fil…4288025 -
Provenance lineage view: timeline becomes a real visualization
TheYuchenReplace the run-history list body with a vertical lineage graph (newest at top). An SVG gutter, absolutely positioned inside the scroll container so it scrolls with the rows, encodes: - node hue = config_hash (stable hash->hue pastel; same configuration is the same color everywhere), constant node size by design; - ring around the dot = pinned/replayed seed_mode, bare dot = fresh; - hollow node + red slash = errored run; - curved bezier edges = forked_from descent, drawn in the child's hue so a configuration's origin can be traced by its own color; - rounded band + spine = contiguous replicate block of one config; - per-block distribution strip (>=2 replicates with headline values): dots on a 0-1 scale for every value archived up to that block, so distribution buildup is visible while scrolling down the past; bright dots = this block, faint = older, tick = mean. Hovering a row or its dot highlights the full lineage chain (ancestors via forked_from plus all descendants) by d…cfb84a4 -
Composition comparison: two archived runs side by side, CIs not scalars
TheYuchenPhase 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.d105dc7 -
Transformation signatures: uniform circuit-delta vocabulary per step
TheYuchenPhase 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…f956d64 -
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 -
Provenance core: run identity, replayable seeds, distribution payloads
TheYuchenPhase 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…2efd890
-
Polish pass: dedupe pipeline runners, shared chip component, emitter map
Yuchen YuanThree 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 …4ee621f -
Fix sampled fidelity being frozen by the per-node step cache
Yuchen YuanThe SSE run path caches each step's StepResult+ctx snapshot keyed on the pipeline prefix. For deterministic blocks (statevector fidelity, QuCAD output, etc.) that's a feature: re-runs reuse the trained model or computed metric. For sampled fidelity it was a silent scientific bug — the first shot draw got frozen and replayed forever. Reproduced live: 5 SSE runs of bell + FakeFez + fidelity(method=sampled) returned identical 0.5938 with from_step_cache=true after the first run. Fix: handlers can mark a StepResult as nondeterministic. The stream loop carries a sticky flag — once a nondeterministic step is emitted, both cache lookups AND cache puts are disabled for the rest of that run, including all downstream steps (their ctx depends on the fresh draw, so a lookup hit would restore a contradictory state). Frontend renders a 'live' chip on those steps so users know the cache is intentionally bypassed. Statevector fidelity is unchanged (still cacheable). QuBound / Qshot / QuCAD are als…b3ebd47 -
Fix exported script header URL: point to jqub21-quaim space
Yuchen YuanThe exportPython header was still referencing the qudastudio-app mirror. Since we now only maintain jqub21/quaim, point users at the canonical URL.50e62eb
-
Second-order checks: export gaps, pre-flight rule, backward compat
Yuchen Yuan +1: Claude Opus 4.7 (1M context)Audit pass after Fidelity/QuBound/Backend changes to catch the downstream code that wasn't updated. exportPython.ts — 4 gaps fixed - fake_backend + ibm_backend export: now writes the user-set shots into the generated script. - qubound export: now writes the threshold + pass/fail check + margin printout so the exported script matches the canvas's behaviour. - fidelity export: the call signature changed (returns tuple, takes unbound_param_policy). Previously called the old signature, which would have crashed on every exported pipeline. Now branches on method: * statevector: calls simpleFidelityEstimator(qc, unbound_param_policy=...) * sampled: calls sampledFidelityEstimator(qc, backend, shots=shots, unbound_param_policy=...) Tuple unpacking captured both fidelity + meta. Print line identifies which method is in use. Pre-flight rule added Fidelity in `sampled` mode needs a backend upstream — that's where the noise model and shots come from. Without a backen…adb5d6a -
Fix Fidelity on parameterized circuits + QuBound threshold + Backend shots
Yuchen Yuan +1: Claude Opus 4.7 (1M context)Three user-reported issues, all addressed with proper logging and actionable error surfaces. Issue 1 — Fidelity crashed on parameterized circuits simpleFidelityEstimator used Statevector.from_instruction(qc), which refuses circuits with unbound parameters. ry_chain_6q has 12 such parameters; Fidelity throw "TypeError: Parameter expression with unbound parameters … is not numeric" which surfaced as a generic "unexpected error" in the result card. The estimator now takes an `unbound_param_policy` argument: * "bind_zero" (default) — auto-binds free params to 0, matching the convention QuBound already uses internally, and reports `bound_unbound_to_zero: N` in the summary so the user sees what we did. * "error" — refuses and raises UnboundParametersError with the actionable message naming the offending param count and suggesting the upstream fix. _handle_fidelity catches UnboundParametersError specifically and maps it to a clean error step (the message is shown v…286193c
-
Self-explanatory edge labels + un-clip toolbar dropdowns
Yuchen Yuan +1: Claude Opus 4.7 (1M context)User feedback: "2q · d2 · 2g" was cryptic for anyone not steeped in quantum vocabulary, and the Load preset dropdown was being clipped behind the canvas. Edge labels: spell it out Was: "2q · d2 · 2g" Now: "2 qubits · depth 2 · 2 ops" The chip is a few characters wider but no longer needs a legend. "ops" instead of "gates" because Qiskit's circuit.size() counts all operations (gates + barriers + measurements), so "ops" is also slightly more accurate. Toolbar overflow no longer clips dropdowns Canvas toolbar previously had `overflow-x-auto` so narrow viewports could scroll the row instead of pushing items off-screen. CSS spec gotcha: when one axis is auto/scroll/hidden, the other axis can't be `visible` — it's coerced to auto. That meant the PresetPicker and MoreMenu dropdowns (which anchor below the trigger via `absolute top-full`) got CLIPPED by the toolbar's height. Removed overflow-x-auto. To still fit on mobile, the toolbar Run button is now `hidden md:flex` — the bottom-rig…89b1792 -
Canvas becomes data-aware: shapes, headline metrics, perf tint, pre-flight
Yuchen Yuan +1: Claude Opus 4.7 (1M context)After a Run, the canvas itself shows what's happening at every node and every edge — instead of just being a connection diagram with the real numbers banished to a sidebar. circuit_shape on every StepResult (backend) StepResult schema gains a CircuitShape sidecar field ({num_qubits, depth, size, num_parameters}). workflow_service snapshots ctx["circuit"] AFTER every successful handler and attaches it to the step. Built-in handlers and plugin steps both populate; ctx-less steps (source plugins with no upstream, errored steps) leave it as None. Edge data-flow labels (frontend) styledEdges memo in FlowCanvas reads the SOURCE node's circuit_shape and attaches a tiny monospace label to the React Flow edge: "5q · d8 · 17g". Falls back to no label when the source step doesn't have a shape (no run yet, or source errored). Drop-target highlight during drag-to-insert composes on top. Per-node headline metric + duration chip + tone (frontend) New lib/headlineMetric.ts table picks the most r…33e7bee -
Global code-quality polish: DRY + named constants + leak cleanup
Yuchen Yuan +1: Claude Opus 4.7 (1M context)Targeted refactor pass based on a structured audit. Pure maintainability wins; no behaviour changes. Frontend: collapse 8 popovers into one hook 8 components (AuthButton, ThemeSwitcher, MoreMenu, PapersPopover, SupportPopover, DevelopersPopover, BlockPicker, PresetPicker) each carried an identical 16-line "close on mousedown + Escape" effect block. Extracted to lib/useDismissOn.ts; ~150 lines deleted, one hook to audit instead of eight. useDismissOn(open, rootRef, useCallback(() => setOpen(false), [])) Behaviour is intentionally identical to the inlined block so older git-blame on the call sites stays coherent. Backend: consolidate effective-user-id resolution routes/plugins.py and routes/workflow.py each carried a subtly different implementation of "session cookie wins over query_user_id, anon hf_ prefix is reserved". Pulled into auth_service.resolve_effective_user_id(request, query, *, required). - required=True path raises ValueError → routes/plugins maps to 400 - required=…57f0b3e -
Hide IBM live-mode chip entirely when server can't go live
Yuchen Yuan +1: Claude Opus 4.7 (1M context)User feedback: "live ibm: unavailable" / "ibm: n/a" chip adds noise without value on a deployment that has no IBM token configured — it's a permanent dead chip the user can't act on. Now the chip only renders when the server actually supports live mode (token configured AND ALLOW_LIVE_IBM=true). The 3-branch state-machine collapses to 2 (on / off-using-cache); the dead "unavailable" branch is gone. setUseLiveIbm + the useLiveIbm store state are kept untouched since the run code still reads them when the server IS live-capable. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>89aa5b4 -
Fix popover clipping + IBM-chip transparency bleed-through
Yuchen Yuan +1: Claude Opus 4.7 (1M context)User report: two visible glitches on the screenshots — (1) on a desktop browser, the icons in the TopBar's right cluster appeared to be visually stacked behind/inside the "ibm: n/a" chip on the left cluster; (2) on iPhone Safari, opening the Theme dropdown made the menu slide off the left edge of the screen. Root cause (1) — opacity-70 on the IBM chip When the server has no IBM token, the chip was rendered with class `opacity-70`. That made the WHOLE element 70% translucent, including its background. At narrower viewports where the right- cluster icons (Lab/Papers/Developers/Theme/Tour/Support/Auth) flex- squeeze closer to the chip, anything sitting under or behind it became visible through the alpha. Fixed by replacing opacity-70 with `!bg-canvas` (solid surface color) + the existing `text-mute` for the dimmed-disabled look. Identical visual intent, no alpha transparency. Root cause (2) — 3 popovers lacked the mobile-safe anchor pattern PapersPopover, Support…db325d1 -
Mobile + large-touchscreen UX overhaul
Yuchen Yuan +1: Claude Opus 4.7 (1M context)Addresses a 15-finding audit covering viewport handling, safe areas, touch behavior, hit-target sizing, and iOS Safari quirks. Viewport + PWA chrome - viewport meta gains viewport-fit=cover + interactive-widget= resizes-content so safe-area-inset(*) applies and the iOS keyboard triggers layout reflow instead of just overlaying content. - theme-color set for light + dark via prefers-color-scheme media queries — browser chrome now blends with our surface instead of flashing white. apple-mobile-web-app-* meta + apple-touch-icon let the app feel native if added to home screen. - New /public/manifest.webmanifest registered, minimal but sufficient for installable-PWA detection. Dynamic viewport (100dvh) - App.tsx root: h-screen → 100dvh inline (with fallback). Was clipping ~80px under iOS Safari's collapsing address bar on first paint. - UploadPluginModal max-h moved from calc(100vh-2rem) to calc(100dvh-1rem) + safe-area-inset-bottom padding so the modal fits even whe…5c7eb51 -
Display fix + focus trap + mobile touch drag-to-edge-insert
Yuchen Yuan +1: Claude Opus 4.7 (1M context)DevelopersPopover layout fix When Yuchen Yuan's row gained a second link chip (LinkedIn), the single-row "icon + truncated name + chip + chip" layout squeezed the name down to its first letter ("Y") inside the 320px popover. Restructured to two rows per person: name on top (full width, no truncation), link chips below with flex-wrap. Single-link entries still look natural — the chip row simply contains one chip. Focus trap for modals + drawers New lib/focusTrap.ts useFocusTrap hook implements WAI-ARIA Authoring Practices for dialog focus management: - On open, focus moves into the container (prefers the container itself if tabIndex=-1, else first focusable child). - Tab from the last focusable wraps to first; Shift+Tab from first wraps to last. - Defensively re-routes focus into the container if something else steals it (e.g. async overlay). - Caller restores focus on close — we already do this for the upload modal and auth dropdown via their existing openerRef pattern. App…defa0ba -
Mobile + a11y + defense-in-depth fixes from broader audit
Yuchen Yuan +1: Claude Opus 4.7 (1M context)Mobile + keyboard access to palette tiles (CRITICAL) Previously the only way to add a block to the canvas was HTML5 drag- and-drop, which doesn't fire on touch devices and has no keyboard analogue. Tiles were <div draggable> with no role, no tabIndex, and no click handler — so mobile users could only use the BlockPicker dropdown, and keyboard users had no path at all. - PaletteTile is now a <button type="button"> with onClick → addBlocksToCanvas([kind]) plus a Space override (Enter is handled by the native button semantics). - Drag-and-drop still works for mouse users on top of this — the button element preserves draggable + onDragStart so drag-to- insert keeps working. - focus-visible:ring-2 ring-accent makes the focused tile obvious to keyboard users. - aria-label per tile now reads "Add Gate Counter block to canvas. Tally gate types in the current circuit." (label + tagline) rather than relying on title-attr-only. Touch-friendly delete X (IMPORTANT) Both the palett…524287c -
Plugin output: typed figures (markdown / table / bar / svg / png)
Yuchen Yuan +1: Claude Opus 4.7 (1M context)Plugins can now emit a list of typed visual outputs beyond the flat summary dict. Each figure is a small JSON object with a `type` field; the result card renders them inline below the summary table. Five types ship today - markdown — headings, lists, bold/italic/code, fenced code blocks. Raw HTML is rejected by the backend; the frontend renderer never reaches for dangerouslySetInnerHTML on this path. - table — headers (≤ 12 cols) + rows (≤ 100 rows), primitives only. - bar — inline SVG bar chart, up to 50 bars, zero JS deps. - svg — escape hatch with sanitisation: rejects <script>, javascript:, <foreignObject>, <iframe>, <object>, <embed>, and any on*= event-handler attribute. Up to 256 KB. - image_png_b64 — base64-encoded PNG, ≤ 1 MB decoded, must have the PNG magic bytes (JPEG/GIF/other formats rejected). Each figure also accepts an optional `title` (≤ 120 chars) rendered as the panel header. Total `figures` list capped at 10 entries. Backend - New plugin_run…725a720
-
Drag-to-insert + plugin lifecycle UX fixes
Yuchen Yuan +1: Claude Opus 4.7 (1M context)Drag-to-insert (new feature) When the user drags a block from the palette and the cursor passes within ~60 flow-units of an existing edge, that edge lights up with an accent-coloured dashed animation. Dropping the block onto a lit edge splices it in: the old edge is removed and replaced by two new edges (upstream → new node, new node → downstream). Implementation: - New _findClosestEdge_ helper does line-segment-distance hit testing against every edge's source-right-center → target-left-center approximation. Threshold is in flow coordinates so it scales with zoom. Falls back to default 200x56 node footprint when React Flow hasn't measured yet. - _onDragOver_ checks for the palette's `application/reactflow` data type and computes the closest edge each frame, setting dropTargetEdgeId. - _onDragLeave_ clears the target so the dashed highlight doesn't linger if the user abandons the drag outside the canvas. - _onDrop_ captures dropTargetEdgeId, clears it, then either splices…dca3016 -
Full audit pass: leak fixes, sign-in clarity, functional bugs
Yuchen Yuan +1: Claude Opus 4.7 (1M context)Triggered by user request "全方位的检查、测试" covering visualization, user comprehension, page logic, ease-of-use, science, info leakage, and security. Three parallel audits ran (info-leak, sign-in clarity, visual/a11y, functional/scientific); fixes batched below. Critical functional bugs - workflow_service.run_pipeline + run_pipeline_stream now call plugin_service.hydrate_from_dataset_if_needed before dispatch. Without this, a logged-in user running a pipeline on a fresh container (or on the mirror Space) would see "plugin not found" even though it sits safely in their HF Datasets backing store. - plugin_runner._scrub_scalars / _scrub_value drop NaN and ±Inf instead of passing them through. Standard JSON has no representation for either; model_dump_json emits NaN/Infinity which the browser's JSON.parse refuses, so any plugin returning a numerically degenerate scalar used to make the entire /run response fail to parse client- side. NaN → dropped from scalars dict; Inf → nul…4c566b4 -
Multi-user: HF OAuth login + per-user plugin persistence
Yuchen Yuan +1: Claude Opus 4.7 (1M context)What this lets users do - Anyone can click "Sign in" in the top bar and authenticate with their Hugging Face account (OpenID Connect via the HF OAuth flow). No account creation, no password management on our side. - Each signed-in user gets their own private namespace for uploaded plugins. Other users (and other browsers from the same person) cannot see them. - Plugins uploaded while signed in are mirrored to a private HF Dataset repo (qudastudio/quda-user-data) so they survive container restarts and follow the user across devices. - Guest (anonymous) mode is fully preserved: visitors can still drop a .zip without signing in; those plugins continue to live in /tmp and are per-browser, exactly as before. Architecture Browser ──cookie──▶ FastAPI ──HfApi──▶ HF Dataset (private) │ └──▶ /tmp (volatile cache) Identity = session cookie's hf_<username> (when signed in) ∥ anon UUID query par…b6faf15