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
-
Revert "Add before/after circuit diff on QuCAD and CompressVQC steps"
Yuchen YuanThis reverts commit 73f63904abba9a42f464877bea7c622380054954.fb05400 -
Add before/after circuit diff on QuCAD and CompressVQC steps
Yuchen Yuan +1: Claude Opus 4.7QuCAD prunes variational parameters (by setting θ=0) and CompressVQC folds redundant rotations — both modify ctx["circuit"]. Until now the results panel only showed summary numbers. Visitors had no way to see what the algorithm actually did to the circuit. Backend - New _diagram_snapshot() helper in workflow_service captures {depth, size, num_parameters, ops, diagram_text} for a circuit. - QuCAD and CompressVQC handlers now attach matching `before` and `after` blocks to their step.summary (schema unchanged — summary is dict[str, Any]). Frontend - New <CircuitDiff> component in ResultsPane reads summary.before / summary.after and renders: · an inline metric header (depth X → Y (-Z), gates X → Y (-Z)) · a collapsible side-by-side pair of ASCII circuit diagrams (stacked on mobile so long diagrams don't clip) - Embedded in QuCADCard and CompressVQCCard. QuCAD gets an extra hint line explaining that its "after" has the same gate layout with θ=0 on pruned paramete…73f6390
-
Ship precomputed preset results so demo visitors see instant responses
Yuchen Yuan +1: Claude Opus 4.7All 9 sample circuits x 4 preset pipelines (36 entries) precomputed into backend/cache/precomputed_runs/. Cache keys are content hashes (qpy bytes + normalized graph), so they only hit when the user runs exactly a shipped sample + preset combo. 4 of 36 are CompressVQC on circuits with no matching gate types (efficient_su2_4q, hardware_efficient_4q, qaoa_maxcut_4, ry_chain_6q); those responses capture the same structured error users would see from a live run. 248 KB total, bundled into the Docker image. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>26787d0