Spaces:
Sleeping
Sleeping
Commit History
-
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