Commit History
-
Canvas/palette S3 sweep: id collisions, touch-cancel, caps, honest encodings
TheYuchenAudit backlog (docs/AUDIT_BACKLOG.md) wave 3, canvas area: - node ids: module counter kills the same-millisecond collision - touch drag cancel clears the splice highlight; restore-pulse timer held in a ref (cleared on re-restore/unmount) - cost effect reads nodes through a ref (stale closure) - ARCHIVE_WINDOW (runStore) consolidates the 50/100/200/500 listRuns caps; countRuns()/countRunsByConfig() back every displayed total (board header, config-context bar); exportArchive scans unbounded; listRunsByConfig keeps the newest window instead of an arbitrary primary-key subset; import preserves synthesized run_ids (no dupes on re-import) - stale post-run encodings: ribbons/edge labels dim at 0.45 when the live structural hash diverges from the run's hash - RibbonEdge: role=img on the aria-labelled group; deltaSize null (unknown) no longer renders as pass-through; "ops" -> "gates" - replicate loop: sticky progress notice (outlives the 4s fade) and per-iteration clearLivePr…728039f -
Run-lifecycle guards: no canvas swaps, surprise runs, or false toasts mid-run
TheYuchen- 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 store72fe4f4
-
Visual calm pass: fewer simultaneous strips, chips, keys
TheYuchen(a) RibbonLegend: still mounts only after the session's first run (verified — the parent gates on the in-memory `run`), and now fades out on its own after 20s (unmounts at 21s; mount-scoped timer, so re-runs don't resurrect it). The × dismissal remains the only persisted state. (b) Guidance-strip budget — at most ONE strip per view, demo banner > hint: the Multiverse orientation hint collapses to its header "?" while the demo banner is up (explicit "?" click force-shows it for the session); the History-tab archive-io strip starts collapsed to an "archive…" reopen chip when the banner renders. (c) Evidence-pane header chip budget: at most two chips — the seed chip absorbs the cached state as "cached · no seed" (a precomputed response IS a response no seed was drawn for), replacing the separate cached chip. (d) Node tiles audited: the post-run strip cannot exceed glyph + headline/chips row + micro-CI row (chips row is flex-nowrap, headline min-w-0 truncate, ≤3 shrink-0 chips); the layout…bdf2f0e
-
Copy fix: plugin-missing node no longer says 'Re-upload' (upload UI was removed); doc: correct plugin upload endpoint path
TheYuchen323d8cc -
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: 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 -
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 -
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
-
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
-
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 -
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
-
Polish pass on plugin Upload modal
Yuchen Yuan +1: Claude Opus 4.7 (1M context)Detail review surfaced four small but meaningful items. Storage listener over-fires (App.tsx) - Was triggered by any quda.* key — included pane widths, theme, live-IBM toggle. Tightened to e.key === "quda.pluginsRev" so only actual plugin upload/delete events refetch. bumpPluginsRev() already writes that exact key. Duplicate-install regex collision (UploadPluginModal) - /already have a plugin/i matched both the per-kind duplicate AND the 5-plugin cap message, so a user at cap who clicked Install on a sample saw a green success banner. Tightened to /already have a plugin with kind=/i so only the idempotent case surfaces as a friendly hint; the cap is now an honest error. - Added a Content-Type guard after the example zip fetch so a captive portal serving an HTML 200 surfaces "got <type>, not a .zip" instead of the confusing manifest-parse error from the backend. Modal UX restructure - Examples-first ordering when installedPlugins.length === 0 — a first-time visito…4d0158a -
Plugin protocol Phase 5: final audit fixes + polish
Yuchen Yuan +1: Claude Opus 4.7 (1M context)Defence-in-depth fixes from the security/UX/scientific audits: Backend safety: - Reject `\` and absolute paths in zip entry names (defensive even on Linux containers). - Cap stdin payload at 50 MB in the subprocess wrapper before parsing. - Drop the full `/tmp/quda_plugins/<user>/<kind>/` path from the "handler.py missing" error message — user already knows their kind. Frontend UX: - QNode now renders a red-bordered tombstone card with a "?" badge and a "plugin not installed" hint when a referenced plugin has been deleted, instead of silently disappearing. - App.tsx listens for `storage` events on `quda.*` keys to refresh the plugin list across tabs. - UploadPluginModal title now reads "Upload your own block" with a one-line explanation of what plugins do. - TrySlide adds a "Upload your own block" tip alongside the Export .py one so new users discover the plugin workflow. Docs: - README.md gains a User plugins section pointing to PLUGIN_SDK.md. - PLUGIN_SDK.md adds a "…d06bf19 -
Plugin protocol Phase 4: full UI integration
Yuchen Yuan* lib/nodeCatalog.ts — `synthesizePluginSpec(manifest)` builds a NodeSpec on the fly from a backend-served PluginManifest. `resolveNodeSpec(kind, plugins)` is the new single source of truth for spec lookups: returns the built-in spec if available, otherwise the synthesized plugin spec, otherwise undefined. Adds PluginNodeSpec (NodeSpec + isPlugin/initials/pluginColor). * UploadPluginModal.tsx — drag-drop or click-to-pick .zip, posts to /api/plugins/upload with the browser's anonymous user_id, surfaces backend validation errors verbatim, refreshes the in- store plugin list on success. Inline docs spell out the manifest + handler.py contract. * NodePalette — new "Upload" button next to "Add blocks"; merges plugin specs with NODE_CATALOG before filtering by search / family chips. Plugin tiles render with the manifest's color + first-letter badge instead of a Lucide icon, and grow an X delete affordance on hover (with confirm dialog). * BlockPicker — same merge…74b7708
-
Extract shared TipIcon; add hover-tooltip on family badge + live-IBM chip
Yuchen YuanPull the inline ⓘ tooltip from NodeParamEditor.FieldLabel into a shared `TipIcon` component so other places that need the same 'short label, long explanation behind a hover' affordance can reuse it without copying the named-group / no-aria-label / pointer-events gotchas. (Three iterations earlier in this session were spent re-discovering each one.) Two concrete spots where the shared component now adds context: * QNode family badge (SOURCE / BACKEND / ALGORITHM / METRIC / SINK). Useful tag for someone fluent in workflow-editor lingo, opaque to a non-quantum first-time visitor. New per-family hint explains what each role does in plain language. * TopBar 'live ibm: ...' status chip. Already had a long native `title` tooltip, but native titles race our CSS tooltips and have the 1-2 s display delay. Replaced with TipIcon next to the chip text — instant, theme-styled, and the chip stays clickable to toggle live mode. NodeParamEditor.FieldLabel collapses to a thin call-site…0f6846e -
Sharper visual affordance on params toggle + match desktop/mobile pane icons
Yuchen YuanTwo follow-ups from user feedback that the previous implementation was too subtle: * The block params toggle was a small chevron + tiny grey text — easy to miss as something clickable. Promote it to a chip-like button: SlidersHorizontal icon (signals 'tune'), uppercase 'PARAMS' label in tracking-wider, current-value summary on the right, ChevronDown that rotates on open. The whole row gets a hover background + border, so the affordance reads even on a first glance. Open state flips background and tints the icon accent for an obvious "active" cue. * Desktop's collapsed-strip used ChevronLeft / ChevronRight; mobile TopBar uses PanelLeft / PanelRight (lucide). Switching desktop to the same panel icons so the cue for 'open this side panel' is identical across breakpoints. Bumped icon size from w-4 to w-5 so it's easy to spot in the narrow 32px collapsed column.4d90ed6 -
Param editor collapses by default; misc review-driven cleanups
Yuchen YuanUser feedback: a tunable block shouldn't default to a fully expanded form on the canvas — that pushes the block visually big and clutters a multi-block pipeline. Default the param editor to a single-line disclosure with a chevron + a one-line summary of current values; the full editor only renders when the user clicks to expand. * QNode now owns local `paramsOpen` state (not in node-data — it's a pure UI affordance, shouldn't pollute share-links or auto-connect output). Header row shows `chev > params: <summary>`. Click toggles. * New `summariseParams()` helper builds the short summary from the schema: select values stay as their short keys (`pittsburgh_1`), numbers respect each param's `displayPrecision`. Kept under ~30 chars so it fits the block width. Three issues from an independent review of the recent Qshot work: * CRITICAL: workflow_service `_default_label()` was missing `"qshot"`, so step results in the right pane displayed lowercase "qshot" instead of "Qshot".…b89f3b2 -
Make sample-circuit selection visible on the canvas
Yuchen YuanSelecting a sample on the left pane previously updated the LOADED header there but left the canvas blocks completely silent. New users had no way to see (a) which circuit they'd actually wired their pipeline against, or (b) whether that circuit was suitable for the algorithms they'd dropped — they only found out after a 60-second Qshot pilot dumped a "GNN fallback / treat as best guess" banner on them. Two small in-block surfacings, no new pane: * Input circuit block now shows, under its tagline: "Loaded: <sample_key or 'uploaded'>" and a mono line with "<n>q · depth <d> · <p> params". Reactively updates when the user clicks a different sample or uploads a .qpy. * Qshot block now shows a small pill underneath its tagline: - in 5–8 qubits → green "in training range · Nq" - otherwise → warn "Nq · outside 5–8q range / will trigger GNN fallback" This is a *prediction* of the fallback path, computed purely from qubit count, so it's a heuristic — but it matches the dom…5daa19b -
Generalise inline param editor; tunables for QuCAD + fake_backend
Yuchen YuanThe Qshot block had a hand-written inline editor; promote it to a schema-driven component so other blocks can opt in by listing `params: NodeParamSpec[]` in their NodeSpec — no per-block wiring. The single rule for what becomes user-tunable: it has to be an actual function argument on the algorithm's public API (Qshot.predict args, QuCAD's run_qucad_training_noisy args, fake_backend handler's backend_name lookup). Module-level constants the original author tuned during training stay locked — exposing them would invalidate bundled state. What's now tunable from the canvas (in addition to Qshot): * QuCAD — three ADMM hyperparameters: - `iterations` (1..20, default 3) — more = sparser pruning, slower - `lam` regularisation strength (1e-4..0.05, default 0.005) - `rho` ADMM penalty (10..5000, default 500) Inline hints flag the trade-off direction. * fake_backend — 3-way dropdown over the Heron-family fakes the backend handler can actually load: FakeFez (default) / FakeMarrak…94039f2 -
Qshot UI surface: in-block param editor + tour slide card
Yuchen YuanUser-tunable knobs the author exposes via QshotRecommender.predict(): - noise_snapshot — six bundled IBM calibration snapshots - alpha — target fidelity fraction, clamped [0.50, 0.99] Everything else in predict() (k_struct, k_pf, pilot_points, pilot_reps) is a model hyperparameter the author tuned during training; touching those would invalidate the bundled clusters, so they're deliberately NOT exposed. Frontend: * New `frontend/src/lib/qshotSnapshots.ts` mirrors the backend registry. Six entries, ordered Pittsburgh × 3 → Marrakesh × 3, default `pittsburgh_1` (matches example_usage.py). * `QNode` gains a `QshotParamEditor` rendered in place of the static param read-out when `kind === "qshot"`. Dropdown for the snapshot, number input for alpha (HTML constraint min/max + JS clamp on the way in for safety). Wrapper carries the React Flow `nodrag` class so dragging the dropdown to make a selection doesn't get hijacked as a node-move gesture. Other node kinds (QuCAD / Q…f6e5d82
-
Make paper icon on canvas nodes always visible and accent-colored
Yuchen Yuan +1: Claude Opus 4.7Previously the FileText paper link only appeared on hover (opacity-0 group-hover:opacity-100) and used neutral mute/edge colors. Users had to know to hover to discover the link to the algorithm's paper. Now the badge is persistent with an accent-tinted background and border, so the paper is discoverable at a glance on QuCAD / QuBound / CompressVQC nodes. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>6b82faa -
Add preset pipelines dropdown and paper links
Yuchen Yuan +1: Claude Opus 4.7The canvas used to boot into one hardcoded 4-block demo and the only way to get back to it was a Reset button. Replaced that with a named preset registry (QuBound / QuCAD / CompressVQC / Full stack) exposed via a "Load preset" dropdown in the canvas header. Each preset is a pure-data graph spec; buildPresetGraph turns it into React Flow nodes/edges with a simple left-to-right layout. Adding new presets is a one-file edit. Also surfaced the underlying research papers: - QuCAD arXiv:2304.04666 (ICCAD 2023) - QuBound arXiv:2507.17043 (IEEE TCAD 2025) - CompressVQC arXiv:2207.01578 (ICCAD 2022) A NodeSpec.paper field carries url/title/venue. The algorithm node cards show a small paper icon on hover (top-left, mirroring the delete × on top-right), and the WelcomeTour AlgorithmsSlide now links each card's venue back to arxiv so the papers are discoverable without hovering. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>d9de684 -
Add sample diagram preview, upload hints, and block taglines
Yuchen YuanSample circuit preview: - Backend SampleCircuit now carries depth/size/params/diagram_text so the sample list exposes enough metadata to preview without a second round trip. - Each sample button has an eye-toggle that expands an ASCII circuit diagram inline. The Loaded card has a matching toggle. Upload affordance: - Button label is now 'upload .qpy / .qasm' with a descriptive title. - Empty Loaded card explains what formats are accepted and offers a 'download a sample' link so new users can try the upload flow with a known-good file. - New GET /api/circuits/samples/{key}/download serves the raw .qpy. Block discoverability: - Added NodeSpec.tagline (3-5 word human-friendly caption). - Palette tiles show the tagline under the label (tile height grew from 52px to 68px, width 92px -> 108px). - Canvas QNode also renders the tagline so users don't need the tooltip or the tour to recall what each block does.bd3a155 -
UX polish pass: results viz, sample descriptions, delete affordance
Yuchen YuanThree related changes aimed at making both experts and newcomers able to understand and play with the lab's algorithms through the demo. UX basics (Batch 1): - Fix all timing claims to match HF's shared CPU (~2 min, not ~60 s) - Rename "Fake backend" -> "Noisy simulator" with a plain-English description ("Simulates a real IBM quantum chip with its measured noise. Runs locally, no IBM account needed.") - Add a hover-X delete button on each canvas node, with a matching hint in the block palette about the Backspace shortcut - Sample circuit buttons now show a curated one-liner under the name, replacing the auto-generated "N-qubit circuit, depth D" text More demo circuits (Batch 2): - Add 4 new samples: w_state_3q, qft_3q, ry_chain_6q, hardware_efficient_4q - Each comes with a human-friendly description in the circuit picker Results visualization (Batch 3): - ResultsPane now renders per-algorithm cards instead of flat k/v rows: - QuBound: 0-1 gauge + "lower is better" caption …36d22d6 -
Initial JQub Quantum Flow demo
Yuchen Yuan- FastAPI backend serving QuCAD / QuBound / CompressVQC as a topologically-sorted pipeline under /api/workflow/run - React + Vite + React Flow frontend with drag-and-drop node palette - 14-day offline cache of ibm_fez calibration so the demo runs without an IBM Quantum token - Two-stage Dockerfile targeting HuggingFace Spaces (port 7860) Algorithms by Jovin Antony Maria (JQub); web refactor by Yuchen Yuan.1ee2bb3