Commit History
-
Precomputed cache: schema gate + live-API regeneration
TheYuchenThe 36 shipped entries predated the provenance rework (no transformation/distribution/seed fields) yet still validated as RunResponses, so a hit would render a crippled first run. Worse-and- better at once: every key was already unreachable — the key hashes QPY bytes (changed by the qiskit upgrade) and the script's preset mirror had drifted from the frontend's defaultData (JS `500` vs Python `500.0`, missing fidelity params). * run_cache: stamp cache_schema=2 on write, treat unstamped/old entries as misses (logged once per key); writes scrub the seed envelope (disk cache is seed-free by design; per-step seed_used stays as the honest record). 6 new unit tests; lane now 86 green. * Delete the 36 dead files; regenerate qucad+compvqc x 9 samples (18 entries) from the LIVE Space via the new resumable scripts/regenerate_precomputed_cache_live.py, which refuses to run unless local qiskit == live /api/health qiskit (key parity). Torch-heavy presets (qubound/qshot/full) stay unca…61a5f88 -
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
-
Neutralise dev-process metadata in code comments
Yuchen YuanEarlier audits caught keyword-level leaks (tokens, paths, emails). This pass goes one level up: comments throughout the codebase narrated the project's history — "Jovin's Streamlit prototype", "the handover snapshot", "Jovin's old prototype's flowChartProto", "Batch 2 circuits", etc. — which read like internal team notes rather than product code, and exposed the development trajectory (research handover → rewrite → packaging) to anyone reading the public repo. Replaced or trimmed the offending comments while keeping legitimate attribution (e.g., "author: Tong Li" in qshot/__init__.py docstring). No behavior change: docstrings + line comments only. Files touched: - qlib/qiskit_utils.py – module docstring rewritten - qlib/qucad.py – default-config attribution generalised - qlib/compvqc.py – "the original prototype did..." → factual - qlib/qshot/__init__.py – "handover snapshot" → "reference code" - app/services/workflow_service.py – Qshot docstring de-narrated - a…fa87757 -
Comment-vs-behavior audit: fix four real mismatches
Yuchen Yuan- run_cache: docstring claimed `_normalize_node` drops node id, code actually keeps it. Rewrite docstring to match behavior + explain why the cache still hits in practice (frontend presets and precompute script both use the same n1, n2... convention). - precompute_preset_results: qshot preset existed in frontend but was missing from the script's PRESETS dict, so qshot+ry_chain_6q always cache-missed. Add it. - viz/Sparkline: docstring said "non-negative integers" but the code defensively handles negatives (Math.min(...data, 0)) and short arrays (returns null on len<2). Rewrite docstring to match. - ResultsPane: EmptyHint said QuBound takes "about 2 minutes" while RunningHint says "1-3 minutes" for QuBound or Qshot. Unify both to 1-3 min and mention both slow paths.8e6747e
-
Cache pipeline runs by (circuit, graph) content hash
Yuchen Yuan +1: Claude Opus 4.7For the demo flow -- pick a sample, pick a preset, hit Run -- the server was re-executing the full QuCAD + LSTM + QAOA stack every click, which is 30-90s per preset. Most visitors just want to see what each algorithm produces on a bundled sample; they bounce long before the pipeline finishes. This commit adds a read-only, content-addressed cache for run responses. Key is sha256(qpy_bytes(circuit) + normalized(nodes+edges) + use_live_ibm) truncated to 16 hex chars. The /workflow/run handler looks up the key before dispatching run_pipeline; hits return the stored RunResponse with from_cache=true. Live-IBM runs always bypass the cache, since calibration drifts and the point of "live" is to hit hardware. The precompute script under scripts/ runs every PRESET x every sample and serializes responses to backend/cache/precomputed_runs/<key>.json. Those files are checked in and bundled into the image, so first-visit users see results in <1s with a "cached" pill in the ResultsPane header expla…e4e737d -
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