Commit History
-
Seed coverage for QuBound/Qshot + cost estimates from run history
TheYuchenCloses the two remaining claim-integrity gaps for "every run is exactly replayable" over "stochastic, costly experiments": Seeds. QuBound trains its LSTM on BOTH ok paths (live IBM history and the cached 14-day pickle) — there is no precomputed-only branch in the handler — so both now seed the global RNGs (_seed_stochastic_libs: random + numpy + lazily-imported, try/except-guarded torch) and thread node_seed into qlib (Aer seed_simulator + Sabre seed_transpiler in get_labels_fromNoise); results carry nondeterministic=True + seed_used. Qshot's pilot seed was 99991 + hash(str(base)) — str hashes are PYTHONHASHSEED-salted, i.e. "fixed" only until the next server restart. pilot_seed is now threaded predict → recommend_shots → compute_pilot_pf, making the recommendation reproducible across processes given the seed. Executor cache logic untouched: fresh runs draw fresh node seeds (honest new draw, cache-bypassed), pinned runs re-derive the same seeds (cacheable in the seed-salted namespace)…91b2cd9
-
QuBound: stop mutating caller's QuantumCircuit + handler defensive copy
Yuchen YuanQuBound's get_labels_fromNoise called qc.measure_all() in place to attach measurements for the Aer shots that train the LSTM. The comment said 'caller doesn't reuse qc after this point' — but the pipeline runner does: ctx['circuit'] points to the same object, so the measurement register leaked into every downstream step. Reproduction on the live server (ry_chain_6q → QuCAD → QuBound → Qshot → Fidelity → Output): Qshot crashed with 'ValueError: invalid literal for int() with base 2: "110100…"' because the counts string suddenly had a 'classical_register meas' delimiter splitting it. Two-layer fix: 1. qbound.get_labels_fromNoise now copies qc before measure_all. 2. _handle_qubound also copies ctx['circuit'] defensively when num_parameters == 0 (when >0, assign_parameters already returns a fresh circuit). Belt + suspenders so any future in-place mutation deeper inside QuBound still can't leak. Audited sampledFidelityEstimator and qshot recommender — both already copy…1c02f7a
-
qlib: cleanup pass — docstrings, type hints, constants, logging
Yuchen Yuan +1: Claude Opus 4.7Non-behavioral changes aimed at making qlib/ less intimidating to new contributors picking up JQub algorithm code: - Add module-level logger and replace scattered print() calls with logger.info / logger.debug so the live service stops dumping to stdout and precompute runs can be tuned via logging config. - Hoist hardcoded hyperparameters to named module-level constants: HISTORY_WINDOW_DAYS, CONFIDENCE_LEVEL, LSTM_* in qbound; QUCAD_DEFAULT_*, TWO_QUBIT_GATES, COBYLA_MAXITER in qucad; DEFAULT_THETA_GRID, LAMBDA_PENALTY, DECISION_THRESHOLD in compvqc. These were previously scattered inside function bodies. - Add type hints + docstrings to public functions used by workflow_service (call_QuBound, run_qucad_training_noisy, get_LUT, admmOptimizedCompVQC, etc.) and to internal helpers. - Remove commented-out dead code: abandoned transpile variants, debug prints, old example circuits. - qiskit_utils: prune unused helpers (display_circuit, qasmFile_toCircuit, transpile_…0571b1a
-
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