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 -
exportPython: make the reproducibility claim true
TheYuchen- 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…fb2cd9e
-
Export script threads precision_target (honesty fix)
TheYuchenAn 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.09ac4f2
-
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
-
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
-
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 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 3 audit findings: export signatures, cache safety, accessibility
Yuchen Yuan1. CRITICAL — exportPython.ts CompressVQC template had 3 wrong function calls: - quadraticProgram_luttoqp(lut) → (qc, lut) - admmOptimizedCompVQC(qp, lut) → (qp) - resultsCompressVQC(qc, result, lut) → (result, qc) All verified against backend/qlib/compvqc.py actual signatures. Users who exported and ran pipeline.py would have hit TypeError. 2. MEDIUM — Step cache _cache_put now deep-copies QuantumCircuit objects via qc.copy() instead of storing references. Prevents a future handler that mutates circuit in-place from silently corrupting cached snapshots. Current handlers all reassign, so this is defensive, but the cost (one .copy() per step) is cheap. 3. MEDIUM — BlockPicker button now has aria-haspopup, aria-expanded, aria-label. Dropdown div has role="menu" and aria-label. Screen reader users can now navigate the block catalog.51365eb -
Fix build: remove unused vars in exportPython; fix setRun functional updater
Yuchen Yuan22b441d -
Feature: Export pipeline as runnable Python script
Yuchen YuanNew "Export .py" button in the canvas toolbar (Code2 icon). Generates a flat, readable Python script that reproduces the current pipeline: - Topologically sorts the canvas nodes using the edge list - For each block, emits the corresponding Python code with the actual parameter values from the canvas (iterations, lambda, rho, noise_snapshot, alpha, backend_name, etc.) - Includes import statements, parameter binding for parameterized circuits, and print statements for each step's output - Downloads as pipeline.py with a browser file-save dialog Supports all 9 block types: input_circuit, fake_backend, ibm_backend, qucad, qubound, compvqc, qshot, fidelity, output. IBM live backend generates commented-out code with instructions + a fake backend fallback. Also added to the mobile MoreMenu so the feature works on phones.90bf6ec