Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
160 changes: 160 additions & 0 deletions tracks/qmc/solutions/yanwang-66/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
# Dynamic atom reloading for loss-tolerant surface-code memory

## 评委入口(Start here)

> ### [▶ 直接打开自包含 HTML 技术报告(建议首先阅读)](https://htmlpreview.github.io/?https://github.com/Thatht137/quantum.harness/blob/challenge/qmc-atom-reload-surface-code/tracks/qmc/solutions/yanwang-66/report/report.html)
>
> 核心结论、4 张矢量图、独立种子确认、因果配对设计、证据边界与复核命令均集中在此。

[GitHub 可读结果摘要](https://github.com/Thatht137/quantum.harness/blob/challenge/qmc-atom-reload-surface-code/tracks/qmc/solutions/yanwang-66/RESULTS.md) · [HTML 源文件 / 离线下载](https://github.com/Thatht137/quantum.harness/blob/challenge/qmc-atom-reload-surface-code/tracks/qmc/solutions/yanwang-66/report/report.html) · [机器可读汇总](https://github.com/Thatht137/quantum.harness/blob/challenge/qmc-atom-reload-surface-code/tracks/qmc/solutions/yanwang-66/results/summary.json) · [Challenge #66](https://github.com/QuantumBFS/quantum.harness/issues/66)

## Team yanwang

| | |
|---|---|
| **Members** | 王介人、何思成、赵志轩 |
| **Contributor for #66** | 何思成 |
| **Track** | Quantum Monte Carlo / circuit simulation |
| **Challenge** | Addresses #66 — How much does atom reloading help loss-tolerant surface-code memory? |

## Headline result

> **Across 179.2 million discovery cell-shots, active atom-reload policies
> produce 502 provisional helpful and zero harmful FDR classifications among
> 1,960 paired comparisons. A separate-seed confirmation reaches the registered
> precision target in all 32/32 comparisons.**

This is a direct paired test, not a comparison between unrelated simulation
batches. Every reload policy sees the same counter-addressed Pauli,
measurement, loss and reload-outcome streams for each shot. The result therefore
isolates the decision to reload from random trajectory luck.

| Quantity | Verified result |
|---|---:|
| Discovery cell-shots | `179,200,000` |
| Discovery paired comparisons | `1,960` |
| Helpful / no difference / harmful | `502 / 1,458 / 0` |
| Independent confirmation cell-shots | `12,800,000` |
| Confirmation precision | `32 / 32` |
| Precision fraction | `1.0` (required: `0.8`) |
| Accepted engineering volume | `192,000,000 cell-shots` |
| Sealed holdout | `0 / 1`, unspent |

Discovery and confirmation are independent evidence streams; the 192 million
total describes accepted engineering volume and is not pooled as one
statistical sample.

## Scientific interpretation

- **Strong parameter-region signal.** After 20,000-resample paired intervals
and Benjamini-Hochberg correction over all 1,960 comparisons, 25.6% favor
active reload and none are classified harmful at the highest verified
Discovery phase.
- **Independent precision success.** All 32 policy-versus-none comparisons in
the independent-seed headline slice meet the frozen interval-width target.
- **Conservative final gate.** The formal deadline disposition remains
`inconclusive_at_deadline`: only 81/2,240 Discovery cells and 4/40
confirmation cells reached the deliberately high logical-failure count
target.
- **Claim boundary.** The evidence supports the existence of useful reload
regions. It does not identify one policy as universally optimal and does not
turn finite `d=3,5` data into an asymptotic threshold claim.

## What is new

1. **Dynamic loss is part of the decoder model.** Missing sites generate
round-dependent super-stabilizers and an erasure-aware matching graph; the
mask is not merely logged beside an unchanged no-loss decoder.
2. **Reload policies are compared causally.** Counter-addressed common random
numbers preserve external events across `none`, `immediate`, `periodic(R)`
and `threshold(theta)`.
3. **Recovery is auditable.** Checkpoints, append-only shot ranges, atomic
publication and SHA-256 manifests prevent preempted Slurm jobs from
contaminating accepted evidence.
4. **Decoder inputs are future-proof.** The versioned data contract separates
syndrome + loss/reload history + metadata from the final logical label, so
future learned decoders can use the same benchmark without label leakage.

## Why we trust the baseline

1. **Frozen physics.** The round timeline, reload semantics, policy thresholds,
noise matrix and stopping rules were fixed before the large grid.
2. **Independent oracles.** Exhaustive small-geometry graph checks and a
separate policy state-machine oracle test the simulator outside its own
implementation path.
3. **Causal isolation.** Prefix-causality and label-poison tests reject access
to future loss or final logical outcomes.
4. **Negative controls.** Wrong-answer, timeout, environment-escape,
background-process and hard-coded candidates all fail closed.
5. **Exact replay.** The accepted candidate reached
`185.979924557991` validated decoded shots/s and reproduced immutable shard
hashes under the locked environment.
6. **Independent seed.** The confirmation stream is separate from Discovery
and passes its precision gate in every comparison.

## Model and policies

- Rotated surface-code memory at `d={3,5}`, memory-X/Z and `T={d,2d}`.
- Per-round data Pauli errors, measurement flips and stochastic atom loss.
- Site state machine:
`ACTIVE -> LOST_UNDETECTED -> LOST_DETECTED -> RELOADING -> ACTIVE`.
- Policies: `none`, `immediate`, `periodic(1|d|2d)` and
`threshold(0.02|0.05|0.10)`.
- Baseline decoder: loss-history-conditioned erasure-aware MWPM.
- Statistics: paired 95% bootstrap intervals and BH FDR `q=0.05`.

Reload restores a fresh carrier, not the unknown quantum state held by the
lost atom. This distinction is enforced in the event model and report.

## Included artifacts

| Path | Role |
|---|---|
| `report/report.html` | Standalone judge-facing report with embedded vector figures |
| `report/report.json` | Structured four-section challenge report |
| `RESULTS.md` | Compact scientific result and claim boundary |
| `results/summary.json` | Machine-readable public headline numbers and hashes |
| `results/*/*.parquet` | Verified compact cell/comparison aggregates |
| `src/reload_qec/` | Simulator, policy, decoder, analysis and artifact pipeline |
| `tests/` | Core, Discovery, confirmation and sensitivity contracts |
| `research/reference/` | Independent graph and policy oracles |
| `research/DATA_SCHEMA.md` | Decoder-ready input/label separation and boundary semantics |
| `research/MODEL.md` | Frozen physical and timing model |
| `research/SCIENCE_GATE.md` | Deadline gate audit |
| `slurm/` | Reproducible SCNet/xh5 batch entry points |

Large per-shot arrays stay on the cluster. Their original artifact names and
digests remain in the committed analysis manifests; the compact files included
in this PR have directly runnable subset checksum lists.

## Compact verification

From `tracks/qmc/solutions/yanwang-66` in the locked Python environment:

```bash
python3 -m pytest \
tests/test_experiment_core.py \
tests/test_discovery_contract.py \
tests/test_confirmation_contract.py

(cd results/discovery-phase-3 && sha256sum -c included-checksums.sha256)
(cd results/confirmation-phase-5 && sha256sum -c included-checksums.sha256)

python3 ../../../../skills/report/render_report.py report
```

The report was generated by the repository's `challenge-report` / `report`
pipeline and is self-contained after rendering.

## Honest boundary

The highest verified Discovery artifact is a post-deadline supplement. It
strengthens the public signal but does not retroactively change the frozen
deadline disposition. Cost sensitivity was not started because the registered
Discovery prerequisite did not complete, and the sealed holdout was not
queried. No `d=7,9` experiment was run, so no asymptotic threshold is claimed.

The result is nevertheless concrete: it advances Challenge #66 from an open
engineering question to a reproducible benchmark with broad positive
finite-size signals, independent precision confirmation, compact public
aggregates, and a clear route to a decisive future stopping run.
73 changes: 73 additions & 0 deletions tracks/qmc/solutions/yanwang-66/RESULTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Challenge 66 result record

## Headline

Across the highest verified public artifacts, dynamic reload policies produce
**502 provisional helpful and zero harmful FDR classifications** among 1,960
paired policy-versus-none comparisons. An independent-seed confirmation reaches
the target confidence-interval precision in **32/32 comparisons**.

This is promising evidence for parameter-dependent benefit, not a claim that a
single policy wins everywhere. The registered cell-level stopping rule remains
incomplete, so the deadline disposition is `inconclusive_at_deadline`.

## Discovery Phase 3

| Quantity | Value |
|---|---:|
| Physical groups | 280 |
| Cells | 2,240 |
| Policy-versus-none comparisons | 1,960 |
| Cumulative cell-shots | 179,200,000 |
| Helpful, provisional | 502 |
| No significant difference, provisional | 1,458 |
| Harmful, provisional | 0 |
| Cells meeting the failure target | 81 |
| Lockstep groups completing the target | 4 |

The 20,000-resample paired intervals are corrected across all 1,960
comparisons with Benjamini-Hochberg `q=0.05`. Phase 3 was verified after the
deadline and is reported as a supplement; it does not rewrite the frozen
deadline decision.

## Independent-seed confirmation Phase 5

| Quantity | Value |
|---|---:|
| Headline groups | 8 |
| Cells | 40 |
| Comparisons | 32 |
| Cumulative cell-shots | 12,800,000 |
| Comparisons meeting precision | 32 / 32 |
| Precision fraction | 1.0 (required: 0.8) |
| Cells meeting the failure target | 4 / 40 |

The precision gate is a concrete success: every candidate-versus-none
comparison has reached its registered interval width. The remaining blocker is
the deliberately conservative count of observed logical failures, not unstable
confidence intervals.

## What the result supports

- Active reload deserves parameter-region optimization rather than a blanket
always/never rule.
- Common-random-number pairing resolves policy differences efficiently.
- A round-level erasure-aware surface-code simulator can be made deterministic,
causal, restartable and independently auditable on public HPC systems.
- The decoder-ready interface cleanly separates observation history from the
final logical label.

## Claim boundary

- The study does not identify a universally best reload policy.
- `d=3,5` finite-size data do not establish an asymptotic loss threshold.
- Cost sensitivity was not run because its registered discovery prerequisite
did not finish.
- The sealed holdout remains unused at `0 / 1`.

The machine-readable source for every number above is `results/summary.json`.
The two result subdirectories contain the verified aggregate Parquet tables,
their original analysis summaries and checksum manifests. The original
`analysis-checksums.sha256` files also name large cluster-only artifacts;
`included-checksums.sha256` provides a directly runnable check for the compact
files committed in this PR.
58 changes: 58 additions & 0 deletions tracks/qmc/solutions/yanwang-66/environment/requirements.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
stim==1.15.0 \
--hash=sha256:f0fb249f1a2897a22cbe4e0c2627abf49188cbbf19b942d4749972d1c3bdf12c
pymatching==2.2.2 \
--hash=sha256:166abeb45525cbbcb656e66e4400ff24a11b2cf29495dc7b213885809f45d237
numpy==2.1.3 \
--hash=sha256:bc6f24b3d1ecc1eebfbf5d6051faa49af40b03be1aaa781ebdadcbc090b4539b
scipy==1.14.1 \
--hash=sha256:fef8c87f8abfb884dac04e97824b61299880c43f4ce675dd2cbeadd3c9b466d2
pandas==2.2.3 \
--hash=sha256:c124333816c3a9b03fbeef3a9f230ba9a737e9e5bb4060aa2107a86cc0a497fc
pyarrow==18.1.0 \
--hash=sha256:e31e9417ba9c42627574bdbfeada7217ad8a4cbbe45b9d6bdd4b62abbca4c6f6
matplotlib==3.9.3 \
--hash=sha256:d3c93796b44fa111049b88a24105e947f03c01966b5c0cc782e2ee3887b790a3
pytest==8.3.4 \
--hash=sha256:50e16d954148559c9a74109af1eaf0c945ba2d8f30f0a3d3335edde19788b6f6
psutil==6.1.1 \
--hash=sha256:97f7cb9921fbec4904f522d972f0c0e1f4fabbdd4e0287813b21215074a0f160
jsonschema==4.23.0 \
--hash=sha256:fbadb6f8b144a8f8cf9f0b89ba94501d143e50411a1278633f56a7acf7fd5566
attrs==26.1.0 \
--hash=sha256:c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309
contourpy==1.3.2 \
--hash=sha256:3859783aefa2b8355697f16642695a5b9792e7a46ab86da1118a4a23a51a33d7
cycler==0.12.1 \
--hash=sha256:85cef7cff222d8644161529808465972e51340599459b8ac3ccbac5a854e0d30
fonttools==4.63.0 \
--hash=sha256:d76ac49f929aecaf82d83250b8347e099d7aecba0f4726c1d9b6df3b8bb5fe18
iniconfig==2.3.0 \
--hash=sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12
jsonschema-specifications==2025.9.1 \
--hash=sha256:98802fee3a11ee76ecaca44429fda8a41bff98b00a0f2838151b113f210cc6fe
kiwisolver==1.5.0 \
--hash=sha256:2517e24d7315eb51c10664cdb865195df38ab74456c677df67bb47f12d088a27
networkx==3.6.1 \
--hash=sha256:d47fbf302e7d9cbbb9e2555a0d267983d2aa476bac30e90dfbe5669bd57f3762
packaging==26.2 \
--hash=sha256:5fc45236b9446107ff2415ce77c807cee2862cb6fac22b8a73826d0693b0980e
pillow==12.2.0 \
--hash=sha256:8bd7903a5f2a4545f6fd5935c90058b89d30045568985a71c79f5fd6edf9b91e
pluggy==1.6.0 \
--hash=sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746
pyparsing==3.3.2 \
--hash=sha256:850ba148bd908d7e2411587e247a1e4f0327839c40e2e5e6d05a007ecc69911d
python-dateutil==2.9.0.post0 \
--hash=sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427
pytz==2026.3.post1 \
--hash=sha256:dd95840dd199baea12d9cc096a1d452caa6596a1c1e4b5f3dbd1541855d5e815
referencing==0.37.0 \
--hash=sha256:381329a9f99628c9069361716891d34ad94af76e461dcb0335825aecc7692231
rpds-py==2026.6.3 \
--hash=sha256:9c1255b302953c86a486b81d330d5ee1d5bd937691ce271b6be0ef0e299eaab7
six==1.17.0 \
--hash=sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274
tzdata==2026.3 \
--hash=sha256:dc096730c87af6cab1b171c9d532be840741ff5d459015e7f6947bd7d7e54931
typing-extensions==4.12.2 \
--hash=sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d
26 changes: 26 additions & 0 deletions tracks/qmc/solutions/yanwang-66/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[build-system]
requires = ["setuptools>=68"]
build-backend = "setuptools.build_meta"

[project]
name = "reload-qec"
version = "0.1.0"
description = "Challenge 66 dynamic atom-reload surface-code benchmark"
requires-python = ">=3.11"
dependencies = [
"numpy==2.1.3",
"pandas==2.2.3",
"pyarrow==18.1.0",
"pymatching==2.2.2",
"scipy==1.14.1",
"stim==1.15.0",
]

[tool.setuptools]
package-dir = {"" = "src"}

[tool.setuptools.packages.find]
where = ["src"]

[tool.pytest.ini_options]
testpaths = ["tests"]
45 changes: 45 additions & 0 deletions tracks/qmc/solutions/yanwang-66/report/assets/causal-benchmark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading