Repository navigation
Conversation
🤖 AI Code Review (gemini-3-flash-preview)🇬🇧 English Analysis1. Executive Summary
2. AI Content Analysis
3. Engineering & Economic Assessment
4. Quality Assurance
5. Security & Privacy Check
🇨🇳 中文分析1. 摘要
2. AI 成分分析
3. 工程与经济评估
4. 质量保证
5. 安全与隐私检查
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new unified benchmark:
QuantumComputing/task_04_quantum_error_decoder— a classicaldecoder for a rotated surface-code memory experiment, scored against minimum-weight perfect
matching (MWPM).
The candidate implements
decode(problem, detection_events)and must turn a graphlike detectorerror model plus a syndrome batch into logical-observable predictions. Per regime:
so ignoring the syndrome scores
0.0, matching MWPM scores1.0, and beating it scores above1.0(uncapped).combined_scoreis the mean over four development regimes; two further regimesat unseen noise strengths are reported as
robustness_scoreand never entercombined_score.Source
Ported from the
optimizationbranch of ScientistsLastExam(
benchmarks/Physics/QuantumErrorDecoder), where it is aflagship/T3 task under the domainQuantumErrorCorrection. The circuit-level scoring design, the difficulty ladder and thecalibration points come from that implementation; the evaluator here is a re-implementation
against the Frontier-Eng unified contract. Provenance and the upstream-measured calibration
numbers are recorded in
references/known_best.md.Why this is a real engineering problem: in a fault-tolerant quantum computer the decoder runs in
the control loop and sets the logical error rate, hence the physical-qubit overhead of any useful
algorithm. MWPM is the community reference, not the optimum — it discards the X/Z correlations
that circuit-level depolarizing noise creates — so the anchor is a documented baseline and the
open-ended region above
1.0is live research.Files
New task under
benchmarks/QuantumComputing/task_04_quantum_error_decoder/:baseline/solution.py: evolve entrypoint withEVOLVE-BLOCKmarkers. Shipped baseline neverpredicts a flip, so it scores
0.0by construction.verification/evaluate.py: builds and samples the regimes with Stim, recomputes the MWPManchor on the same shots, and scores the candidate.
verification/candidate_runner.py: loads the candidate in a separate interpreter thatreceives only the error model and the syndromes, and refuses
stim/pymatchingimports.verification/requirements.txt: pinned evaluator dependencies (stim==1.13.0,pymatching==2.4.0,numpy>=1.24,<2).frontier_eval/: the nine unified metadata files plusrun_eval.sh.README.md,README_zh-CN.md,TASK.md,TASK_zh-CN.md,references/known_best.md.Updated shared files:
benchmarks/QuantumComputing/README*.md: task list now four entries; the domain no longerclaims all tasks are
mqt.bench-based.TASK_DETAILS.md,TASK_DETAILS_zh-CN.md: task row added.scripts/env/specs/frontier-v1-main.json: added this task'sverification/requirements.txt.benchmarks/QuantumComputing/.gitignore: ignore the localeval_report.json.Verification & Testing
task_name:QuantumComputing/task_04_quantum_error_decoderDependencies (Stim + PyMatching are not in the default runtimes):
The pins matter: Stim's seeded sampling stream is not stable across versions, and Stim 1.13
wheels exist for CPython 3.8-3.12.
frontier-v1-mainis Python 3.12 and now lists thisrequirements file, so
bash scripts/env/setup_v1_task_envs.shprovisions it.Single-task evaluator:
cd benchmarks/QuantumComputing/task_04_quantum_error_decoder python verification/evaluate.py --candidate baseline/solution.pyFramework compatibility:
What was actually run
Executed locally on a Windows host with the pinned versions (CPython 3.11,
stim 1.13.0,pymatching 2.4.0,numpy 1.26.4):python verification/evaluate.py --candidate baseline/solution.py->combined_score=0.0000,valid=1, ~1.2 s.import pymatchingis rejected(
valid=0.0); a candidate returning the wrong shape is rejected withfeasibility_rate=0.0.d5_p0.010by scoring crafted arrays: trivial ->0.0000,MWPM ->
1.0000, 25/50/75% oracle ->0.2082 / 0.4684 / 0.9986, truth ->5.8991. The scaleis continuous, hits exactly
1.0at the anchor, and is not clamped above.load_unified_task_spec): allcopy_filesentries resolve,readonly_filescoversverificationandfrontier_eval/run_eval.sh, placeholders render.python scripts/ops/audit_unified_metadata_readonly.pydoes not flag this task under thedefault (non-strict) mode; under
--strictit reports the same "recommended" gaps as theexisting task_01-03 in this domain (they use
evaluate.py, notevaluator.py).Not run: the end-to-end
python -m frontier_eval ...invocation and the bash wrapper itself.This machine has no
uv-built.venvs/and nobash(no WSL distro), so the unified path couldnot be exercised here.
run_eval.shmirrors the established pattern from task_01-03 in thisdomain; please run the unified command above on Linux to confirm.
Measured anchors
references/known_best.mdrecords the re-measured anchors for this port, e.g.d3_p0.005trivial 0.105333 / MWPM 0.014833 and
sealed_d7_p0.008trivial 0.426750 / MWPM 0.059250. Theupstream task reports slightly different absolute rates on its own host (a few percent), which is
Stim's seeded samplers not being bit-identical across platforms; scores stay self-consistent
because the anchor is recomputed from the same shots within one run.
Known limitations
Stated in
README.mdas well, because they bound what a score means here:but unvectorized decoder times out and scores nothing.
0 -> 1range is largely reproduction of a documented baseline; only> 1.0is frontier.QEC_DEV_SEED,QEC_SEALED_SEED) so an operator can run a genuinelysealed evaluation against an unpredictable shot set.