menik1126 commited on
Commit
f7129ca
·
1 Parent(s): 3a24375

Add Stage3 typed exact [[210,10,16]] evidence

Browse files
README.md CHANGED
@@ -19,14 +19,31 @@ configs:
19
  data_files: data/stage2_best_verified.jsonl
20
  - config_name: historical_exact_fom11
21
  data_files: data/historical_exact_fom11.jsonl
 
 
22
  ---
23
 
24
  # QLDPC FOM>12 Search Evidence
25
 
26
- This is a **human-review snapshot**, not a winner announcement. It contains a compact selection of twisted-torus CSS quantum-code candidates, their check matrices, replay-oriented evidence summaries, and a readable description of the automated five-stage search pipeline.
27
 
28
  > Status at snapshot: **in progress**. Sealed rounds: **1–4**. Certified novel candidates with exact `FOM > 12`: **0**.
29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  ## Stage 2 verified near-miss update (2026-08-16)
31
 
32
  A separate `stage2_best_verified` configuration now publishes 13 fully
@@ -56,6 +73,7 @@ certificate schema. See
56
  |---|---:|
57
  | Selected candidates | 51 |
58
  | Sealed trusted audits | 24 |
 
59
  | Exact non-winners | 3 |
60
  | Rejected with replayable witness | 21 |
61
  | Formally open lower-bound candidates | 27 |
@@ -81,11 +99,17 @@ The strict target is checked with integer arithmetic: **`k*d*d > 12*n`**. Equali
81
  4. [`data/candidates.jsonl`](data/candidates.jsonl) — one compact record per selected code.
82
  5. [`evidence/proofs.jsonl`](evidence/proofs.jsonl) and [`matrices/`](matrices/) — evidence and `H_X/H_Z` matrices.
83
 
84
- Run `python -B scripts/verify_dataset.py .` to validate every checksum, matrix, CSS commutation relation, reconstructed `k`, FOM field, and included logical witness.
 
 
 
85
 
86
  ## 中文说明
87
 
88
- 这是供人类专家复核的**进行中快照**,不是“已经发现新纪录码”的声明。数据集收录精选 twisted-torus CSS 候选、`H_X/H_Z`、证据等级、FOM 区间、每轮统计和五阶段流水线说明。当前没有任何新候选被严格认证为 `FOM>12`。BP/OSD 的较大数值只是启发式距离上界,不能当作性能下界或最终结果。
 
 
 
89
 
90
  ## Attribution and non-endorsement
91
 
 
19
  data_files: data/stage2_best_verified.jsonl
20
  - config_name: historical_exact_fom11
21
  data_files: data/historical_exact_fom11.jsonl
22
+ - config_name: stage3_typed_exact_fom_gt_12
23
+ data_files: data/stage3_typed_exact_fom_gt_12.jsonl
24
  ---
25
 
26
  # QLDPC FOM>12 Search Evidence
27
 
28
+ This repository contains the original **human-review snapshot** plus separately versioned result lanes. It includes twisted-torus CSS quantum-code candidates, their check matrices, replay-oriented evidence summaries, and a readable description of the automated search pipeline.
29
 
30
  > Status at snapshot: **in progress**. Sealed rounds: **1–4**. Certified novel candidates with exact `FOM > 12`: **0**.
31
 
32
+ ## Stage 3 typed exact FOM>12 update (2026-08-19)
33
+
34
+ The separate `stage3_typed_exact_fom_gt_12` configuration publishes one
35
+ `[[210,10,16]]` CSS-BB code with exact Stage 3 FOM
36
+ `256/21 ~= 12.19047619047619`. The integer target check is
37
+ `10*16^2 = 2560 > 2520 = 12*210`.
38
+
39
+ The lower result is bound to a pinned DistQLDPC/MaxCDCL binary and the upper
40
+ bound is a replayable weight-16 X-logical witness. The typed Stage 3 handoff
41
+ replayed successfully, but the run used `--no-certify`: Stage 4 and Stage 5
42
+ publication gates were not run, and no portable DRAT/LRAT lower-bound proof is
43
+ available. It is therefore labelled
44
+ `STAGE3_TYPED_EXACT_PENDING_STRICT_GATE`, not `CERTIFIED_EXACT_WIN`. See
45
+ [`docs/STAGE3_TYPED_EXACT_FOM_GT_12.md`](docs/STAGE3_TYPED_EXACT_FOM_GT_12.md).
46
+
47
  ## Stage 2 verified near-miss update (2026-08-16)
48
 
49
  A separate `stage2_best_verified` configuration now publishes 13 fully
 
73
  |---|---:|
74
  | Selected candidates | 51 |
75
  | Sealed trusted audits | 24 |
76
+ | Separate Stage 3 typed exact `FOM > 12` lane | 1 (`[[210,10,16]]`) |
77
  | Exact non-winners | 3 |
78
  | Rejected with replayable witness | 21 |
79
  | Formally open lower-bound candidates | 27 |
 
99
  4. [`data/candidates.jsonl`](data/candidates.jsonl) — one compact record per selected code.
100
  5. [`evidence/proofs.jsonl`](evidence/proofs.jsonl) and [`matrices/`](matrices/) — evidence and `H_X/H_Z` matrices.
101
 
102
+ Run `git lfs pull --include='matrices/**'` and then
103
+ `python -B scripts/verify_dataset.py .` to validate every checksum, matrix,
104
+ CSS commutation relation, reconstructed `k`, FOM field, and included logical
105
+ witness, including the separate Stage 3 typed-exact lane.
106
 
107
  ## 中文说明
108
 
109
+ 这是供人类专家复核的进行中数据集。原 rounds 1–4 快照仍没有通过完整
110
+ Stage 4/5 发布门的 `FOM>12` 候选;新增独立配置发布了一个 Stage 3 typed
111
+ exact 的 `[[210,10,16]]` 结果,FOM 为 `256/21`。其下界依赖固定版本的
112
+ DistQLDPC/MaxCDCL,且本轮使用了 `--no-certify`,所以等待后续严格发布门。
113
 
114
  ## Attribution and non-endorsement
115
 
THIRD_PARTY_NOTICES.md CHANGED
@@ -5,3 +5,4 @@
5
  - Related context: *Evolutionary Discovery of Bivariate Bicycle Codes with LLM-Guided Search*, arXiv:2606.02418.
6
  - Known-code provenance includes Aydin–Tamo–Barg, arXiv:2606.17268, with repository/source hashes recorded by the pipeline. The upstream action catalog is not redistributed here.
7
  - The FOM>12 challenge target is linked to Shuxiang Cao's public gist. No endorsement by Shuxiang Cao or NVIDIA is implied.
 
 
5
  - Related context: *Evolutionary Discovery of Bivariate Bicycle Codes with LLM-Guided Search*, arXiv:2606.02418.
6
  - Known-code provenance includes Aydin–Tamo–Barg, arXiv:2606.17268, with repository/source hashes recorded by the pipeline. The upstream action catalog is not redistributed here.
7
  - The FOM>12 challenge target is linked to Shuxiang Cao's public gist. No endorsement by Shuxiang Cao or NVIDIA is implied.
8
+ - The Stage 3 typed-exact record binds results from DistQLDPC at source commit `c01fa93eb5e1e62948e4861e2c164a6b64fe88eb` (GPL-3.0-or-later) and its MaxCDCL optimization backend. No third-party solver binary or source is redistributed in this dataset; only allowlisted result metadata and cryptographic hashes are included.
data/stage3_typed_exact_fom_gt_12.jsonl ADDED
@@ -0,0 +1 @@
 
 
1
+ {"authority":{"exact_under_pinned_solver_trust_model":true,"independent_release_gate_complete":false,"pipeline_promotion":false,"pipeline_stage4_certificate":false,"pipeline_stage5_final_gate":false,"portable_unsat_proof_certificate":false,"public_dataset_record":true,"publication_certificate":false,"stage3_typed_handoff_replay":true},"candidate_id":"5f773fbfbce9775bc30b","canonical_digest":"4ba2bcc894b883eb930bf727148c2f57bcf4963c903a940528613b2f542a607c","code":"[[210,10,16]]","construction":{"A_terms":[[7,3],[18,4],[20,0]],"B_terms":[[2,3],[18,1],[19,2]],"ell":21,"family":"css-bb","geometry":{"family":"twisted_torus","schema_version":1,"twist":3},"m":5,"representation_id":"css-bb-twisted-torus-generator-v1"},"distance":{"exact":16,"lower_bound":16,"lower_bound_backend":"DistQLDPC/MaxCDCL","status":"EXACT_PROVEN","upper_bound":16,"upper_bound_backend":"python-sat/cadical195"},"evidence_class":"STAGE3_TYPED_EXACT_PENDING_STRICT_GATE","fom":{"exact":{"decimal":12.19047619047619,"denominator":21,"numerator":256},"excess_over_12":{"decimal":0.19047619047619047,"denominator":21,"numerator":4},"strict_integer_margin":40},"known_answer_context":{"gate_file_sha256":"7adf6f4a93cb321fa0501cbb62723370cdbc3a85db7d9e2565cc086ea6a00687","release_replayed":false,"trust_file_sha256":"1e67120095a358bbcb2166a6804479655dc3bdd8b36c4d12bc56f73d5e741140"},"matrices":{"gx":{"content_sha256":"ac1f362008313f8456c289e94b488dceae8db8c2f01c6b181cadf4c1dc024dce","file_sha256":"cc65886a45b83992356b667cc1efa7bd7629a5a2ea80c245804bcc26db05e332","path":"matrices/5f773fbfbce9775bc30b/Gx.mtx.gz","shape":[10,210]},"gz":{"content_sha256":"47b0c2c19c89b88b729fc74838a091b381d3105633a163e6b5649a9274bbda68","file_sha256":"eab940182d17452c1d154715ea948bfc4c4bfe93fbc250f4aa31df4c130ac590","path":"matrices/5f773fbfbce9775bc30b/Gz.mtx.gz","shape":[10,210]},"hx":{"content_sha256":"3e84de485357b46239174805f8fc3378eeb0e4207a06fc3a95568e5630c58c8e","file_sha256":"a8d53c3e14419e0b0c30e2960621394475e06d0cff30a6c1f0c9635c8f5bf9ea","path":"matrices/5f773fbfbce9775bc30b/Hx.mtx.gz","shape":[105,210]},"hz":{"content_sha256":"21b89580009d0ce19cab3c537ddc53c0211a962d88e4aaa1cf3b9a6752d502ab","file_sha256":"fae00c16429f8312a9a5f1c8e7f025431f986ac8dcc13a433887111f5503baa4","path":"matrices/5f773fbfbce9775bc30b/Hz.mtx.gz","shape":[105,210]}},"matrix_checks":{"commutation_violations":0,"css_commutation":true,"k_recomputed":10,"logical_basis_complete":true,"logical_duality":true,"max_check_weight":6,"max_qubit_degree":6,"max_sector_qubit_degree":3,"rank_x":100,"rank_z":100},"novelty":{"matched_entries":[],"novel":true,"registry_file_sha256":"265f1a3fefef884adeaa980a5dce2441dee4f6f6d71c253ba7a6491360733689","registry_internal_sha256":"536c733d68d344ed9fef9992bbeb1000900174ad0c500ddb7004126ae5c98408","registry_version":"2026-08-12.twisted-published-volume-v2","release_current_registry_replayed":false,"scope":"pinned known-code registry with explicit construction/matrix replay","source_stage3_replayed":true,"status":"COMPLETE"},"parameters":{"k":10,"n":210},"record_kind":"stage3_typed_exact_fom_gt_12","record_sha256":"81ae9e7c377896e87f9a374a9700a0d12a8839933687ec0b38fceee22509195d","release_status":"PENDING_STAGE4_STAGE5","schema_version":1,"source":{"known_answer_gate_sha256":"7adf6f4a93cb321fa0501cbb62723370cdbc3a85db7d9e2565cc086ea6a00687","known_answer_trust_sha256":"1e67120095a358bbcb2166a6804479655dc3bdd8b36c4d12bc56f73d5e741140","qcode_commit":"ade9dc706a455427384e4ba82c0981d9cc9f6671","stage3_aggregate_byte_sha256":"ee2965586cff334caf22d1c0b360127c22cca34c5136f58c88cdd150a5ffeefd","stage3_aggregate_self_seal_sha256":"fa03b3a2a8f43d77131c8a5491efbb56d98800d9e215b45e9e5b3e7f86509159","stage3_lower_raw_terminal_evidence_sha256":"75ac260531dba3618c14fb459e86e2e8bfe39d205a1705da61d516528d0db581","stage3_lower_resumed_evidence_sha256":"fb0bb3fc7b3dc6312952ad7ba9d324346ebd16db35e59e3b894ae3c0f70d489e","stage3_lower_terminal_byte_sha256":"9def4c1d0134165bbf3166382d8b07b361b816504e00e2473615fe9c45a26218","stage3_ranked_byte_sha256":"b8a0f2a7dd4191dd6d578addaec67cee60786104a748dd78203a822e196e3129","stage3_summary_byte_sha256":"4579c4472879e78da8a77b66e240b6e2ea66a1d47ca782f889247b3186b0a5ab","stage3_threshold_byte_sha256":"1c3a4bcf0a4598fc7c91236c01513f375746ba0d8c635d88630800be9f5bfcd6","stage3_typed_claim_sha256":"1a2a076a891a790a92359d903f7874f989d12a2f684518fd227923bbe7f0c2c9","stage3_typed_request_artifact_sha256":"ed3f639b3b7254566b248e3314dcca9aed82a8a91f0465a61d920571b2c9c6d3","stage3_typed_request_sha256":"ce20b44a85b000cf59b24fa4fa69196ccd596ba3d42c78ab325bad1fac99caad","stage3_upper_raw_terminal_evidence_sha256":"8da3a1ee2523a0e7e4c4e21a627c8a780d8160cd09d9beb5130044cd8936fdbe","stage3_upper_resumed_evidence_sha256":"d637b58008f17e1380fb1a3ed6f262b4183b7e19f4c420555d89df0c33340d5b","stage3_upper_terminal_byte_sha256":"f1fe9686eaac799ecf4583d48fe39858381b29e7a47844af5c447e6e21ebc86e"},"source_stage":"stage3_direction_audit","source_status":"EXACT_PROVEN","source_target":{"binding_sha256":"47877e252a30cebfbdc3d172d1d5212f42ba1ae088831a5ca4fbd8f382150878","mode":"scalar-fom-inclusive-v1","required_distance":16,"strict":false},"target":{"certified_win":false,"left_hand_side":2560,"passes_strict_target":true,"required_distance":16,"right_hand_side":2520,"strict_predicate":"k*d*d > 12*n"}}
docs/REPRODUCE.md CHANGED
@@ -3,10 +3,17 @@
3
  From the dataset root:
4
 
5
  ```bash
 
6
  sha256sum -c manifests/SHA256SUMS
7
  python -B scripts/verify_dataset.py .
8
  ```
9
 
10
- The verifier uses only Python's standard library. It reads the compressed Matrix Market files, checks their content and file hashes, verifies `H_X H_Z^T = 0` over GF(2), recomputes both ranks and `k`, checks the strict FOM arithmetic, and validates every included logical witness against the published matrices.
 
 
 
 
 
 
11
 
12
  The exact public pipeline parameters and source bindings are recorded in `config/run_config.public.json` and `manifests/selection.json`. Full stochastic search replay requires the source revision and matching dependencies; this compact expert package intentionally omits model transcripts, internal prompts, process state and checkpoints.
 
3
  From the dataset root:
4
 
5
  ```bash
6
+ git lfs pull --include='matrices/**'
7
  sha256sum -c manifests/SHA256SUMS
8
  python -B scripts/verify_dataset.py .
9
  ```
10
 
11
+ The verifier uses only Python's standard library. It reads the materialized
12
+ compressed Matrix Market files, checks their content and file hashes, verifies
13
+ `H_X H_Z^T = 0` over GF(2), recomputes both ranks and `k`, checks the strict
14
+ FOM arithmetic, and validates every included logical witness against the
15
+ published matrices. The Stage 3 typed-exact verifier additionally reconstructs
16
+ the twisted `Hx/Hz`, validates the complete `Gx/Gz` logical basis, and
17
+ replays the weight-16 upper witness under the stated pinned-solver boundary.
18
 
19
  The exact public pipeline parameters and source bindings are recorded in `config/run_config.public.json` and `manifests/selection.json`. Full stochastic search replay requires the source revision and matching dependencies; this compact expert package intentionally omits model transcripts, internal prompts, process state and checkpoints.
docs/SCHEMA.md CHANGED
@@ -12,3 +12,12 @@
12
  `evidence/proofs.jsonl` contains the matching proof summaries. `formal_lower_bound_evidence` stores the two-sector low-weight exclusion record; `logical_basis_upper_bound_evidence` stores a replayable logical witness; `trusted_audit` stores a sanitized view of the sealed audit artifact. Local paths, interpreter paths, PIDs, commands, prompts, and logs are not exported.
13
 
14
  `evidence/matrix_index.jsonl` indexes Matrix Market files. All matrices are binary even though Matrix Market labels entries as integers. Coordinates are one-based.
 
 
 
 
 
 
 
 
 
 
12
  `evidence/proofs.jsonl` contains the matching proof summaries. `formal_lower_bound_evidence` stores the two-sector low-weight exclusion record; `logical_basis_upper_bound_evidence` stores a replayable logical witness; `trusted_audit` stores a sanitized view of the sealed audit artifact. Local paths, interpreter paths, PIDs, commands, prompts, and logs are not exported.
13
 
14
  `evidence/matrix_index.jsonl` indexes Matrix Market files. All matrices are binary even though Matrix Market labels entries as integers. Coordinates are one-based.
15
+
16
+ The separate `stage3_typed_exact_fom_gt_12` configuration is intentionally
17
+ outside the sealed rounds 1–4 snapshot. Its candidate row is stored in
18
+ `data/stage3_typed_exact_fom_gt_12.jsonl`, its allowlisted solver/handoff
19
+ summary in `evidence/stage3_typed_exact_proofs.jsonl`, and its four-matrix
20
+ solver-instance index in `evidence/stage3_typed_exact_matrix_index.jsonl`.
21
+ `Hx` and `Hz` define the CSS code; `Gx` and `Gz` are the logical
22
+ representatives used by DistQLDPC. This lane distinguishes Stage 3 typed exact
23
+ evidence from Stage 4/5 publication certification.
docs/STAGE3_TYPED_EXACT_FOM_GT_12.md ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Stage 3 typed exact FOM>12 result
2
+
3
+ ## Result
4
+
5
+ The `stage3_typed_exact_fom_gt_12` configuration publishes one twisted-torus
6
+ CSS-BB code:
7
+
8
+ ```text
9
+ [[n,k,d]] = [[210,10,16]]
10
+ FOM = k d^2 / n = 256/21 ~= 12.19047619047619
11
+ strict gate: 10 * 16^2 = 2560 > 12 * 210 = 2520
12
+ ```
13
+
14
+ Its public identifier is `5f773fbfbce9775bc30b`; the Stage 3 canonical
15
+ digest is
16
+ `4ba2bcc894b883eb930bf727148c2f57bcf4963c903a940528613b2f542a607c`.
17
+
18
+ The construction uses `ell=21`, `m=5`, twisted-torus parameter `twist=3`,
19
+
20
+ ```text
21
+ A = x^7 y^3 + x^18 y^4 + x^20
22
+ B = x^2 y^3 + x^18 y + x^19 y^2.
23
+ ```
24
+
25
+ The release includes `Hx`, `Hz`, and the exact `Gx`, `Gz` logical-basis files
26
+ used by the pinned DistQLDPC instance. The public verifier reconstructs `Hx`
27
+ and `Hz` from the construction, checks both GF(2) ranks (`100` and `100`),
28
+ CSS commutation, `k=10`, logical-basis completeness and duality, and the
29
+ weight-16 X-logical upper witness.
30
+
31
+ ## Evidence and trust boundary
32
+
33
+ Stage 3 ended in `EXACT_PROVEN` with two terminal proof units:
34
+
35
+ - lower bound and exact value: DistQLDPC/MaxCDCL, `mto` cardinality mode,
36
+ clean return code, no timeout, and terminal `d_lb=d_ub=d=o=16`;
37
+ - upper bound: a replayed python-sat/CaDiCaL witness of X weight 16.
38
+
39
+ The typed Stage 3 handoff was independently replayed after the run and found
40
+ no conflicting exact distance or lower-weight witness. The public record binds
41
+ the source aggregate, both terminal files, source revision, matrix instance,
42
+ runtime adapter, and pinned DistQLDPC binary by SHA-256.
43
+
44
+ This is deliberately labelled
45
+ `STAGE3_TYPED_EXACT_PENDING_STRICT_GATE`. The run used `--no-certify`, so it
46
+ did not produce a Stage 4 certificate or Stage 5 publication-gate result. The
47
+ strict FOM arithmetic is true, but `certified_win` remains `false` until those
48
+ later gates are completed.
49
+
50
+ DistQLDPC/MaxCDCL does not emit a portable DRAT/LRAT certificate for this
51
+ optimization result. Consequently, the lower bound is exact under the pinned
52
+ solver/runtime trust model, not an independently checkable proof trace. The
53
+ matrix algebra and upper witness are portable and independently replayed by
54
+ the included verifier.
55
+
56
+ ## Files and verification
57
+
58
+ - `data/stage3_typed_exact_fom_gt_12.jsonl`
59
+ - `evidence/stage3_typed_exact_proofs.jsonl`
60
+ - `evidence/stage3_typed_exact_matrix_index.jsonl`
61
+ - `matrices/5f773fbfbce9775bc30b/{Hx,Hz,Gx,Gz}.mtx.gz`
62
+ - `manifests/stage3_typed_exact_fom_gt_12.json`
63
+
64
+ After cloning, materialize the LFS objects before verification:
65
+
66
+ ```bash
67
+ git lfs pull --include='matrices/**'
68
+ sha256sum -c manifests/SHA256SUMS
69
+ python -B scripts/verify_stage3_typed_exact_fom_gt_12.py .
70
+ ```
71
+
72
+ No local paths, process IDs, commands, prompts, raw solver output, or
73
+ checkpoint/progress paths are included in the public evidence summary.
evidence/stage3_typed_exact_matrix_index.jsonl ADDED
@@ -0,0 +1 @@
 
 
1
+ {"candidate_id":"5f773fbfbce9775bc30b","canonical_digest":"4ba2bcc894b883eb930bf727148c2f57bcf4963c903a940528613b2f542a607c","k":10,"matrices":{"gx":{"content_sha256":"ac1f362008313f8456c289e94b488dceae8db8c2f01c6b181cadf4c1dc024dce","file_sha256":"cc65886a45b83992356b667cc1efa7bd7629a5a2ea80c245804bcc26db05e332","path":"matrices/5f773fbfbce9775bc30b/Gx.mtx.gz","shape":[10,210]},"gz":{"content_sha256":"47b0c2c19c89b88b729fc74838a091b381d3105633a163e6b5649a9274bbda68","file_sha256":"eab940182d17452c1d154715ea948bfc4c4bfe93fbc250f4aa31df4c130ac590","path":"matrices/5f773fbfbce9775bc30b/Gz.mtx.gz","shape":[10,210]},"hx":{"content_sha256":"3e84de485357b46239174805f8fc3378eeb0e4207a06fc3a95568e5630c58c8e","file_sha256":"a8d53c3e14419e0b0c30e2960621394475e06d0cff30a6c1f0c9635c8f5bf9ea","path":"matrices/5f773fbfbce9775bc30b/Hx.mtx.gz","shape":[105,210]},"hz":{"content_sha256":"21b89580009d0ce19cab3c537ddc53c0211a962d88e4aaa1cf3b9a6752d502ab","file_sha256":"fae00c16429f8312a9a5f1c8e7f025431f986ac8dcc13a433887111f5503baa4","path":"matrices/5f773fbfbce9775bc30b/Hz.mtx.gz","shape":[105,210]}},"n":210,"record_kind":"stage3_typed_exact_matrix_index","record_sha256":"3c766edc736cfcbcabcc9daba4a9cd464877793a4a701dcadb1c2fcc800b22ac","schema_version":1}
evidence/stage3_typed_exact_proofs.jsonl ADDED
@@ -0,0 +1 @@
 
 
1
+ {"authority":{"exact_under_pinned_solver_trust_model":true,"independent_release_gate_complete":false,"pipeline_promotion":false,"pipeline_stage4_certificate":false,"pipeline_stage5_final_gate":false,"portable_unsat_proof_certificate":false,"public_dataset_record":true,"publication_certificate":false,"stage3_typed_handoff_replay":true},"candidate_id":"5f773fbfbce9775bc30b","canonical_digest":"4ba2bcc894b883eb930bf727148c2f57bcf4963c903a940528613b2f542a607c","distance_claim":{"exact":16,"lower_bound":16,"status":"EXACT_PROVEN","upper_bound":16},"evidence_class":"STAGE3_TYPED_EXACT_PENDING_STRICT_GATE","evidence_sha256":"58e76850bc08bd263ff9756668a35b5092d4c30d8f09de5692166eaae7afadc3","limitations":{"independent_checks":"The public verifier reconstructs Hx/Hz, checks CSS ranks and commutation, validates the complete logical basis, and replays the weight-16 upper witness. It cannot independently certify the solver-derived lower bound without a portable proof trace.","portable_unsat_certificate":"Not available. The lower bound is a replay-bound result under the pinned DistQLDPC/MaxCDCL binary and runtime trust model."},"lower_bound_evidence":{"aggregate_resumed_evidence_sha256":"fb0bb3fc7b3dc6312952ad7ba9d324346ebd16db35e59e3b894ae3c0f70d489e","backend":{"binary_sha256":"9e09c544d5151d872dc1037dcb1440509e27b8b485a7f9ea5a15d6e55b36d3fa","binary_size":2105096,"distribution":"DistQLDPC","identity_sha256":"b4bebbffdc8e8b8fe8f666fccaaf8471a518ba99490d70a6500de52e374f04b3","interface":"distqldpc-cli","repository":"https://github.com/guluchen/DistQLDPC","source_commit":"c01fa93eb5e1e62948e4861e2c164a6b64fe88eb"},"cardinality_mode":"mto","checkpoint_identity":{"candidate_digest":"4ba2bcc894b883eb930bf727148c2f57bcf4963c903a940528613b2f542a607c","cardinality_mode":"mto","construction_symmetry_sha256":null,"coverage_mode":"first-nonzero","logical_detector_sha256":"ba20e6b2fdc6806244f8eebc23e5fc78bf7d0ceb8abfda9a8b4591276752e26a","lower_backend":"distqldpc","phase":"lower-distqldpc","stage3_gate":"qldpc-frontier-sat-sector-exact-screen","target_binding_sha256":"47877e252a30cebfbdc3d172d1d5212f42ba1ae088831a5ca4fbd8f382150878","target_mode":"scalar-fom-inclusive-v1","translation_symmetry":{"block_size":105,"generators":[{"axis":"x","hx_row_set_preserved":true,"hz_row_set_preserved":true,"order":105,"permutation_sha256":"f4f316808964070d043b88db1badfc38a747581e61eb94dd8fb21171e4e51e6b"},{"axis":"y","hx_row_set_preserved":true,"hz_row_set_preserved":true,"order":5,"permutation_sha256":"0d8a8605cb48181d9af9b35177f2a6d22932b92cda15359e336d9abf0ce56e5b"}],"geometry":{"ell":21,"family":"twisted_torus","m":5,"schema_version":1,"twist":3},"method":"bb-quotient-translation-row-set-v2","orbit_representatives":[0,105],"orbit_sizes":[105,105],"relation_basis":[[0,5],[21,3]],"shape":[21,5],"verified":true},"xz_sector_isometry_sha256":"6662b328e912918c26a36bb68d3279302329b9dd063952cc8ad8367f3358a4c5"},"decision_complete":true,"elapsed_s":14318.210796710104,"evidence_kind":"qcode-css-distqldpc-distance-evidence","exact_distance":16,"formulation":"css-full-distance-distqldpc-maxcdcl-v1","hard_timeout_s":21600.0,"instance_binding_sha256":"3cb72f08d8d681df64c3cee531df620a251c7fb34872274868b348a247dfd992","logical_detector":{"css_commutation":true,"k":10,"logical_duality":true,"method":"css-logical-detector-dimension-replay-v1","n":210,"report_sha256":"ba20e6b2fdc6806244f8eebc23e5fc78bf7d0ceb8abfda9a8b4591276752e26a","sectors":{"X":{"detector_kernel_dimension":100,"logical_count":10,"trivial_rank":100,"trivial_space_in_detector_kernel":true,"verified":true},"Z":{"detector_kernel_dimension":100,"logical_count":10,"trivial_rank":100,"trivial_space_in_detector_kernel":true,"verified":true}},"verified":true},"lower_bound":16,"outcome":"exact","parsed_output":{"d":16,"d_lb":16,"d_lb_values":[1,2,4,8,16],"d_ub":16,"d_ub_values":[30,28,26,24,22,20,18,16],"d_values":[16],"o":16,"o_values":[16],"reported_timeout":false,"unknown_final":false},"raw_terminal_evidence_sha256":"75ac260531dba3618c14fb459e86e2e8bfe39d205a1705da61d516528d0db581","raw_terminal_replay_verified":true,"retryable":false,"returncode":0,"runtime_source":{"adapter":{"module":"evaluation.distance_distqldpc","sha256":"9077ad558b4205a9ee84a1300ee7ee83a5a959fa55e1670441a1e7529eeda574"},"identity_sha256":"9059539f43f6134b26f6cda4e94bca45ec8b7f5d262f1082cee47bbe014293ce","protocol":"qcode-distqldpc-supervisor-v1","supervisor":{"module":"evaluation.distqldpc_supervisor","sha256":"fd6ed1198831aa1208932daf974faa11348e98c9c98ec26c8c39bfbe8ae833b8"}},"solver_instance_array_sha256":{"Gx":"c0edc012903bdf5f705703f32424fb7ea394d89dc06989da5bca8942ceb9906d","Gz":"aabf9ab4f3b8b3213442312efc83a855419efc6ed621584357640b54182c1f0d","Hx":"b47d720dc1ce145109447c527fd39cdcb70a00d8d9ea275d49e8489c74897eeb","Hz":"500f8c93ab788543c9635b97d8d4f932eeda7b86b651a680a438a96a1d28da07"},"stderr_sha256":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","stdout_sha256":"775f9de7a9bbadb0763475fffd1d13af69433b39fe203e2998b6208763c8711d","terminal_file_sha256":"9def4c1d0134165bbf3166382d8b07b361b816504e00e2473615fe9c45a26218","threshold_infeasible":true,"timed_out":false,"upper_bound":16},"record_kind":"stage3_typed_exact_fom_gt_12_evidence","release_status":"PENDING_STAGE4_STAGE5","schema_version":1,"source_status":"EXACT_PROVEN","stage3_typed_handoff":{"attempted_proof_units":23,"backend":"distqldpc","completed_proof_units":2,"distqldpc_conflict":false,"distqldpc_conflict_details":null,"distqldpc_exact_distances":[16],"expected_proof_units":27,"gate":"qldpc-frontier-sat-sector-exact-screen","known_answer_gate_sha256":"7adf6f4a93cb321fa0501cbb62723370cdbc3a85db7d9e2565cc086ea6a00687","known_answer_trust_sha256":"1e67120095a358bbcb2166a6804479655dc3bdd8b36c4d12bc56f73d5e741140","low_witnesses":[],"lower_bound_threshold":15,"qcode_commit":"ade9dc706a455427384e4ba82c0981d9cc9f6671","source_retryable_units_at_terminal":21,"stage3_aggregate_byte_sha256":"ee2965586cff334caf22d1c0b360127c22cca34c5136f58c88cdd150a5ffeefd","stage3_aggregate_self_seal_sha256":"fa03b3a2a8f43d77131c8a5491efbb56d98800d9e215b45e9e5b3e7f86509159","stage3_lower_raw_terminal_evidence_sha256":"75ac260531dba3618c14fb459e86e2e8bfe39d205a1705da61d516528d0db581","stage3_lower_resumed_evidence_sha256":"fb0bb3fc7b3dc6312952ad7ba9d324346ebd16db35e59e3b894ae3c0f70d489e","stage3_lower_terminal_byte_sha256":"9def4c1d0134165bbf3166382d8b07b361b816504e00e2473615fe9c45a26218","stage3_ranked_byte_sha256":"b8a0f2a7dd4191dd6d578addaec67cee60786104a748dd78203a822e196e3129","stage3_summary_byte_sha256":"4579c4472879e78da8a77b66e240b6e2ea66a1d47ca782f889247b3186b0a5ab","stage3_threshold_byte_sha256":"1c3a4bcf0a4598fc7c91236c01513f375746ba0d8c635d88630800be9f5bfcd6","stage3_typed_claim_sha256":"1a2a076a891a790a92359d903f7874f989d12a2f684518fd227923bbe7f0c2c9","stage3_typed_request_artifact_sha256":"ed3f639b3b7254566b248e3314dcca9aed82a8a91f0465a61d920571b2c9c6d3","stage3_typed_request_sha256":"ce20b44a85b000cf59b24fa4fa69196ccd596ba3d42c78ab325bad1fac99caad","stage3_upper_raw_terminal_evidence_sha256":"8da3a1ee2523a0e7e4c4e21a627c8a780d8160cd09d9beb5130044cd8936fdbe","stage3_upper_resumed_evidence_sha256":"d637b58008f17e1380fb1a3ed6f262b4183b7e19f4c420555d89df0c33340d5b","stage3_upper_terminal_byte_sha256":"f1fe9686eaac799ecf4583d48fe39858381b29e7a47844af5c447e6e21ebc86e","status":"EXACT_PROVEN","summary_retry_required":false,"terminal_reason":"distqldpc_exact_plus_upper_witness","typed_replay_verified":true},"symmetry":{"covered_sectors":["X","Z"],"orbit_representatives":[0,105],"translation_verified":true,"xz_sector_isometry_sha256":"6662b328e912918c26a36bb68d3279302329b9dd063952cc8ad8367f3358a4c5","xz_sector_isometry_verified":true},"upper_bound_evidence":{"aggregate_resumed_evidence_sha256":"d637b58008f17e1380fb1a3ed6f262b4183b7e19f4c420555d89df0c33340d5b","anchor_indices":[0,105],"backend":{"distribution":"python-sat","solver":"cadical195","version":"1.9.dev7"},"cnf":{"anchor_unit_clauses_sha256":"4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945","cardinality_encoding":"kmtotalizer","cnf_sha256":"6930ac736f6a4ca5cd85fa448e4b35b576bf357eb0719490dd0cdf0e0f2ecad8","num_clauses":6540,"num_variables":2013},"decision_complete":true,"evidence_kind":"qcode-css-threshold-sat-evidence","formulation":"css-global-logical-threshold-cnf-v1","instance_binding_sha256":"ce40d444e02bfe900f38d29ebe4bc72d2ed0b7241039c21d3a016cbaa47caba7","logical_syndrome":[1,0,0,0,1,1,0,1,0,1],"objective":16,"operator":{"length":210,"packed_hex":"450000020000000000004910001200008000200000000082000500","sha256":"ff3b54a8cfd0857a27a12dda5d602405175f8b01c21687b97475861ad7503a77","weight":16},"outcome":"sat","raw_terminal_evidence_sha256":"8da3a1ee2523a0e7e4c4e21a627c8a780d8160cd09d9beb5130044cd8936fdbe","retryable":false,"sector":"X","terminal_file_sha256":"f1fe9686eaac799ecf4583d48fe39858381b29e7a47844af5c447e6e21ebc86e"}}
manifests/SHA256SUMS CHANGED
@@ -1,15 +1,15 @@
1
  ffe79769ee48619a33c8049eef31be7f633ca00cf0fa1d4d852cbd1e4f9d8936 CITATION.cff
2
  c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 LICENSE
3
- 48cb87c52461a7e60cab860750bbfff717f4aaaea3892a3725e12480e72f748c README.md
4
- 95a5ec2a8c23f4aab17998c6fad05490a316c083983d7183feaad075e3dff397 THIRD_PARTY_NOTICES.md
5
  9476a8f02cd6c3e09e0ff73f4d5013f3b98902b3d157072c233f5012cd60d00b config/run_config.public.json
6
  6db5c6d622831117e5e8276d9d87d22b01889082b1f6fd74b770ed1b4abb6edb data/candidates.jsonl
7
  c0490e6b4addfe648c3361cef28a6425e7a50a8aae7846cd1db89874420ceb29 data/round_summary.jsonl
8
  d50ff81a755020f0ec2f17cc4c631598bd418861eabb6c074fc85d3dae02c6ee docs/EXPERT_REVIEW_CHECKLIST.md
9
  c3b085a3f0a46a237e4fe5bcc994d5a235c4c1c3a5984f960a9fd9db0fa22ac7 docs/METRICS.md
10
  745938561f172be13a48d6a08631d563794c6fc1aba1a7a1afc220fedcae74cd docs/PIPELINE.md
11
- eaf8cf89a55f23442832b0a288e4aabb34cb71d39584bb834df6fd56751f4ddf docs/REPRODUCE.md
12
- cc63fce6340729359e7c9ff9d6c5125735c853bdf3e859e98de941a64439b9e5 docs/SCHEMA.md
13
  3c0d76df652ae3075301ab8256f008a1cd3fae9c2da2a0566df35d409c0dffb5 evidence/matrix_index.jsonl
14
  aadf5903fb4b75994aba7b0f7ba47e390c73002188ae2d5bb7fc8a282416b753 evidence/proofs.jsonl
15
  7229d846f74aedc2f53b7331abbee9f55dca4adcb981328e471003274840e0a1 manifests/selection.json
@@ -117,7 +117,7 @@ a0f710dd60e6383e495524189f794d8cbf48fef7c56923fc347456806d268f27 matrices/fe0e3
117
  258877ea83b848cde7baa21d030ee1351bd63bb3ecf9dbd49516017cd4422824 matrices/fe0e327abe20b2648e47/Hz.mtx.gz
118
  7adf6f4a93cb321fa0501cbb62723370cdbc3a85db7d9e2565cc086ea6a00687 reference/known_answer_gate.json
119
  1e67120095a358bbcb2166a6804479655dc3bdd8b36c4d12bc56f73d5e741140 reference/known_answer_trust.json
120
- e42c1f3705cfb705198732c64449e1a2dafc91df11426efdd033701077d90356 scripts/verify_dataset.py
121
  a910a0b82c8e86b8784052f038e8287f3a45f2f6e807cd9804d293cddd07a385 data/stage2_best_verified.jsonl
122
  e20a073c69c2fa9fdb8182063ab592c3f3c757323b2d116142b3befc61d43034 docs/STAGE2_BEST_RESULT.md
123
  0aea4cf3413f06796db3b0c5f4bae97712c35db6b834f419a59e77bd10e00f9f evidence/stage2_best_verified.jsonl
@@ -129,3 +129,14 @@ a213484ae5bf13db227919e3edbfdbac3cb47745afa58f9abe31ee5cd77e3b20 manifests/hist
129
  2dc73d9bc5ce64bf98325d343feea4895d68036bcb9cf9882bb71f3633c497a3 matrices/5bf3e9dc496750d28d4e/Hx.mtx.gz
130
  70cf6f60310168d951960fadb3c9002539bb7ed98b9f51007eda4de10c9b3ced matrices/5bf3e9dc496750d28d4e/Hz.mtx.gz
131
  1c5c46b3ee1893effa7b01009f8681e881e0e9e13f6a7f17ced21adba2d4e12d scripts/verify_historical_exact_fom11.py
 
 
 
 
 
 
 
 
 
 
 
 
1
  ffe79769ee48619a33c8049eef31be7f633ca00cf0fa1d4d852cbd1e4f9d8936 CITATION.cff
2
  c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 LICENSE
3
+ 7e6db3d0cec57aa9d290028789da554bfd61ae54ccff4e54ac9658a7be1568f3 README.md
4
+ 622bee3e546a22480c71e7573471d0c619654741b9d861eb0f40a04ab81010c8 THIRD_PARTY_NOTICES.md
5
  9476a8f02cd6c3e09e0ff73f4d5013f3b98902b3d157072c233f5012cd60d00b config/run_config.public.json
6
  6db5c6d622831117e5e8276d9d87d22b01889082b1f6fd74b770ed1b4abb6edb data/candidates.jsonl
7
  c0490e6b4addfe648c3361cef28a6425e7a50a8aae7846cd1db89874420ceb29 data/round_summary.jsonl
8
  d50ff81a755020f0ec2f17cc4c631598bd418861eabb6c074fc85d3dae02c6ee docs/EXPERT_REVIEW_CHECKLIST.md
9
  c3b085a3f0a46a237e4fe5bcc994d5a235c4c1c3a5984f960a9fd9db0fa22ac7 docs/METRICS.md
10
  745938561f172be13a48d6a08631d563794c6fc1aba1a7a1afc220fedcae74cd docs/PIPELINE.md
11
+ 6d2cb6fec30414f19819a5f688ac91a40face0a36e34f8a0d9eb7ea3a1f33ace docs/REPRODUCE.md
12
+ 824c0eccae8f07c9181eab9218ab748e5ce40d5e0fafbbad8b3d8acbd8aba4f1 docs/SCHEMA.md
13
  3c0d76df652ae3075301ab8256f008a1cd3fae9c2da2a0566df35d409c0dffb5 evidence/matrix_index.jsonl
14
  aadf5903fb4b75994aba7b0f7ba47e390c73002188ae2d5bb7fc8a282416b753 evidence/proofs.jsonl
15
  7229d846f74aedc2f53b7331abbee9f55dca4adcb981328e471003274840e0a1 manifests/selection.json
 
117
  258877ea83b848cde7baa21d030ee1351bd63bb3ecf9dbd49516017cd4422824 matrices/fe0e327abe20b2648e47/Hz.mtx.gz
118
  7adf6f4a93cb321fa0501cbb62723370cdbc3a85db7d9e2565cc086ea6a00687 reference/known_answer_gate.json
119
  1e67120095a358bbcb2166a6804479655dc3bdd8b36c4d12bc56f73d5e741140 reference/known_answer_trust.json
120
+ 1764e7aa2525c2a33d5f88c1487e3670bfb238906a628ebc110980fa1fc59ede scripts/verify_dataset.py
121
  a910a0b82c8e86b8784052f038e8287f3a45f2f6e807cd9804d293cddd07a385 data/stage2_best_verified.jsonl
122
  e20a073c69c2fa9fdb8182063ab592c3f3c757323b2d116142b3befc61d43034 docs/STAGE2_BEST_RESULT.md
123
  0aea4cf3413f06796db3b0c5f4bae97712c35db6b834f419a59e77bd10e00f9f evidence/stage2_best_verified.jsonl
 
129
  2dc73d9bc5ce64bf98325d343feea4895d68036bcb9cf9882bb71f3633c497a3 matrices/5bf3e9dc496750d28d4e/Hx.mtx.gz
130
  70cf6f60310168d951960fadb3c9002539bb7ed98b9f51007eda4de10c9b3ced matrices/5bf3e9dc496750d28d4e/Hz.mtx.gz
131
  1c5c46b3ee1893effa7b01009f8681e881e0e9e13f6a7f17ced21adba2d4e12d scripts/verify_historical_exact_fom11.py
132
+ 5249209433f6a79275e08168f051a2a32c24272e15c16263971b01e271f4845f data/stage3_typed_exact_fom_gt_12.jsonl
133
+ bf3fc01e914f37ccde34ab457843ee4def2dd97dafe6d57a95b813c7685ed035 evidence/stage3_typed_exact_proofs.jsonl
134
+ 6596ed5a5328e2e702fa2e1a34780d572fdb0d80ad6d11caf787ed3da2b80c13 evidence/stage3_typed_exact_matrix_index.jsonl
135
+ a8d53c3e14419e0b0c30e2960621394475e06d0cff30a6c1f0c9635c8f5bf9ea matrices/5f773fbfbce9775bc30b/Hx.mtx.gz
136
+ fae00c16429f8312a9a5f1c8e7f025431f986ac8dcc13a433887111f5503baa4 matrices/5f773fbfbce9775bc30b/Hz.mtx.gz
137
+ cc65886a45b83992356b667cc1efa7bd7629a5a2ea80c245804bcc26db05e332 matrices/5f773fbfbce9775bc30b/Gx.mtx.gz
138
+ eab940182d17452c1d154715ea948bfc4c4bfe93fbc250f4aa31df4c130ac590 matrices/5f773fbfbce9775bc30b/Gz.mtx.gz
139
+ fc1ee37d46a0a0bb042868432b6f543ec098760b1627620a725806e0dd68056b docs/STAGE3_TYPED_EXACT_FOM_GT_12.md
140
+ 0b509ef45eed4921bce68c4d9ad0954a5059dc1813cb8126c0b4db09ab42a55d scripts/verify_stage3_typed_exact_fom_gt_12.py
141
+ 6b35c526dd2de18dedf49b7ccfd7757a25b5ed05f4126bf63de7722fb319fdca scripts/build_exact_fom_gt_12_release.py
142
+ 901673025474968c6e92b4a2bd38e1bc99fcef0c300819a9cb4937ab40924f94 manifests/stage3_typed_exact_fom_gt_12.json
manifests/stage3_typed_exact_fom_gt_12.json ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "authority": {
3
+ "exact_under_pinned_solver_trust_model": true,
4
+ "independent_release_gate_complete": false,
5
+ "pipeline_promotion": false,
6
+ "pipeline_stage4_certificate": false,
7
+ "pipeline_stage5_final_gate": false,
8
+ "portable_unsat_proof_certificate": false,
9
+ "public_dataset_record": true,
10
+ "publication_certificate": false,
11
+ "stage3_typed_handoff_replay": true
12
+ },
13
+ "candidate": {
14
+ "candidate_id": "5f773fbfbce9775bc30b",
15
+ "canonical_digest": "4ba2bcc894b883eb930bf727148c2f57bcf4963c903a940528613b2f542a607c",
16
+ "code": "[[210,10,16]]",
17
+ "exact_fom_denominator": 21,
18
+ "exact_fom_numerator": 256
19
+ },
20
+ "certified_win": false,
21
+ "created_date_utc": "2026-08-19",
22
+ "dataset_base_commit": "3a24375d3494479c76ecd7c377c9b5d038f2561b",
23
+ "files": [
24
+ {
25
+ "bytes": 5345,
26
+ "path": "README.md",
27
+ "sha256": "7e6db3d0cec57aa9d290028789da554bfd61ae54ccff4e54ac9658a7be1568f3"
28
+ },
29
+ {
30
+ "bytes": 914,
31
+ "path": "THIRD_PARTY_NOTICES.md",
32
+ "sha256": "622bee3e546a22480c71e7573471d0c619654741b9d861eb0f40a04ab81010c8"
33
+ },
34
+ {
35
+ "bytes": 1055,
36
+ "path": "docs/REPRODUCE.md",
37
+ "sha256": "6d2cb6fec30414f19819a5f688ac91a40face0a36e34f8a0d9eb7ea3a1f33ace"
38
+ },
39
+ {
40
+ "bytes": 1557,
41
+ "path": "docs/SCHEMA.md",
42
+ "sha256": "824c0eccae8f07c9181eab9218ab748e5ce40d5e0fafbbad8b3d8acbd8aba4f1"
43
+ },
44
+ {
45
+ "bytes": 5332,
46
+ "path": "data/stage3_typed_exact_fom_gt_12.jsonl",
47
+ "rows": 1,
48
+ "sha256": "5249209433f6a79275e08168f051a2a32c24272e15c16263971b01e271f4845f"
49
+ },
50
+ {
51
+ "bytes": 8928,
52
+ "path": "evidence/stage3_typed_exact_proofs.jsonl",
53
+ "rows": 1,
54
+ "sha256": "bf3fc01e914f37ccde34ab457843ee4def2dd97dafe6d57a95b813c7685ed035"
55
+ },
56
+ {
57
+ "bytes": 1258,
58
+ "path": "evidence/stage3_typed_exact_matrix_index.jsonl",
59
+ "rows": 1,
60
+ "sha256": "6596ed5a5328e2e702fa2e1a34780d572fdb0d80ad6d11caf787ed3da2b80c13"
61
+ },
62
+ {
63
+ "bytes": 1840,
64
+ "path": "matrices/5f773fbfbce9775bc30b/Hx.mtx.gz",
65
+ "sha256": "a8d53c3e14419e0b0c30e2960621394475e06d0cff30a6c1f0c9635c8f5bf9ea"
66
+ },
67
+ {
68
+ "bytes": 1830,
69
+ "path": "matrices/5f773fbfbce9775bc30b/Hz.mtx.gz",
70
+ "sha256": "fae00c16429f8312a9a5f1c8e7f025431f986ac8dcc13a433887111f5503baa4"
71
+ },
72
+ {
73
+ "bytes": 1212,
74
+ "path": "matrices/5f773fbfbce9775bc30b/Gx.mtx.gz",
75
+ "sha256": "cc65886a45b83992356b667cc1efa7bd7629a5a2ea80c245804bcc26db05e332"
76
+ },
77
+ {
78
+ "bytes": 1196,
79
+ "path": "matrices/5f773fbfbce9775bc30b/Gz.mtx.gz",
80
+ "sha256": "eab940182d17452c1d154715ea948bfc4c4bfe93fbc250f4aa31df4c130ac590"
81
+ },
82
+ {
83
+ "bytes": 2748,
84
+ "path": "docs/STAGE3_TYPED_EXACT_FOM_GT_12.md",
85
+ "sha256": "fc1ee37d46a0a0bb042868432b6f543ec098760b1627620a725806e0dd68056b"
86
+ },
87
+ {
88
+ "bytes": 5012,
89
+ "path": "scripts/verify_dataset.py",
90
+ "sha256": "1764e7aa2525c2a33d5f88c1487e3670bfb238906a628ebc110980fa1fc59ede"
91
+ },
92
+ {
93
+ "bytes": 21917,
94
+ "path": "scripts/verify_stage3_typed_exact_fom_gt_12.py",
95
+ "sha256": "0b509ef45eed4921bce68c4d9ad0954a5059dc1813cb8126c0b4db09ab42a55d"
96
+ },
97
+ {
98
+ "bytes": 37347,
99
+ "path": "scripts/build_exact_fom_gt_12_release.py",
100
+ "sha256": "6b35c526dd2de18dedf49b7ccfd7757a25b5ed05f4126bf63de7722fb319fdca"
101
+ }
102
+ ],
103
+ "gate": "qcode-public-stage3-typed-exact-fom-gt-12-v1",
104
+ "manifest_sha256": "74fac0cd3a95e6ee16cd18e9acc2640fdcadfec178c53fd57dab1743c6f3d501",
105
+ "publication_certificate": false,
106
+ "release_status": "PENDING_STAGE4_STAGE5",
107
+ "schema_version": 1,
108
+ "source": {
109
+ "known_answer_gate_sha256": "7adf6f4a93cb321fa0501cbb62723370cdbc3a85db7d9e2565cc086ea6a00687",
110
+ "known_answer_trust_sha256": "1e67120095a358bbcb2166a6804479655dc3bdd8b36c4d12bc56f73d5e741140",
111
+ "qcode_commit": "ade9dc706a455427384e4ba82c0981d9cc9f6671",
112
+ "stage3_aggregate_byte_sha256": "ee2965586cff334caf22d1c0b360127c22cca34c5136f58c88cdd150a5ffeefd",
113
+ "stage3_aggregate_self_seal_sha256": "fa03b3a2a8f43d77131c8a5491efbb56d98800d9e215b45e9e5b3e7f86509159",
114
+ "stage3_lower_raw_terminal_evidence_sha256": "75ac260531dba3618c14fb459e86e2e8bfe39d205a1705da61d516528d0db581",
115
+ "stage3_lower_resumed_evidence_sha256": "fb0bb3fc7b3dc6312952ad7ba9d324346ebd16db35e59e3b894ae3c0f70d489e",
116
+ "stage3_lower_terminal_byte_sha256": "9def4c1d0134165bbf3166382d8b07b361b816504e00e2473615fe9c45a26218",
117
+ "stage3_ranked_byte_sha256": "b8a0f2a7dd4191dd6d578addaec67cee60786104a748dd78203a822e196e3129",
118
+ "stage3_summary_byte_sha256": "4579c4472879e78da8a77b66e240b6e2ea66a1d47ca782f889247b3186b0a5ab",
119
+ "stage3_threshold_byte_sha256": "1c3a4bcf0a4598fc7c91236c01513f375746ba0d8c635d88630800be9f5bfcd6",
120
+ "stage3_typed_claim_sha256": "1a2a076a891a790a92359d903f7874f989d12a2f684518fd227923bbe7f0c2c9",
121
+ "stage3_typed_request_artifact_sha256": "ed3f639b3b7254566b248e3314dcca9aed82a8a91f0465a61d920571b2c9c6d3",
122
+ "stage3_typed_request_sha256": "ce20b44a85b000cf59b24fa4fa69196ccd596ba3d42c78ab325bad1fac99caad",
123
+ "stage3_upper_raw_terminal_evidence_sha256": "8da3a1ee2523a0e7e4c4e21a627c8a780d8160cd09d9beb5130044cd8936fdbe",
124
+ "stage3_upper_resumed_evidence_sha256": "d637b58008f17e1380fb1a3ed6f262b4183b7e19f4c420555d89df0c33340d5b",
125
+ "stage3_upper_terminal_byte_sha256": "f1fe9686eaac799ecf4583d48fe39858381b29e7a47844af5c447e6e21ebc86e"
126
+ },
127
+ "source_status": "EXACT_PROVEN",
128
+ "status": "STAGE3_TYPED_EXACT_PENDING_STRICT_GATE"
129
+ }
matrices/5f773fbfbce9775bc30b/Gx.mtx.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cc65886a45b83992356b667cc1efa7bd7629a5a2ea80c245804bcc26db05e332
3
+ size 1212
matrices/5f773fbfbce9775bc30b/Gz.mtx.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eab940182d17452c1d154715ea948bfc4c4bfe93fbc250f4aa31df4c130ac590
3
+ size 1196
matrices/5f773fbfbce9775bc30b/Hx.mtx.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a8d53c3e14419e0b0c30e2960621394475e06d0cff30a6c1f0c9635c8f5bf9ea
3
+ size 1840
matrices/5f773fbfbce9775bc30b/Hz.mtx.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fae00c16429f8312a9a5f1c8e7f025431f986ac8dcc13a433887111f5503baa4
3
+ size 1830
scripts/build_exact_fom_gt_12_release.py ADDED
@@ -0,0 +1,954 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Build the public [[210,10,16]] release from sealed Stage 3 artifacts.
3
+
4
+ This release-specific builder intentionally fails closed. It accepts only the
5
+ audited candidate, source commit, aggregate, and terminal checkpoints named
6
+ below. Operational paths, process metadata, commands, and raw logs are not
7
+ copied into the public records.
8
+ """
9
+
10
+ from __future__ import annotations
11
+
12
+ import argparse
13
+ import gzip
14
+ import hashlib
15
+ import io
16
+ import json
17
+ import subprocess
18
+ import sys
19
+ from pathlib import Path
20
+ from typing import Any
21
+
22
+
23
+ CANDIDATE_ID = "5f773fbfbce9775bc30b"
24
+ CANONICAL_DIGEST = (
25
+ "4ba2bcc894b883eb930bf727148c2f57bcf4963c903a940528613b2f542a607c"
26
+ )
27
+ STATE_KEY = (
28
+ "2975b8ebd74a3842501a042746bf7877ca11d0326841d3ee4238a6724d0da26e"
29
+ )
30
+ QCODE_COMMIT = "ade9dc706a455427384e4ba82c0981d9cc9f6671"
31
+ HF_BASE_COMMIT = "3a24375d3494479c76ecd7c377c9b5d038f2561b"
32
+
33
+ EXPECTED_SOURCE_SHA256 = {
34
+ "stage3-summary.json": (
35
+ "4579c4472879e78da8a77b66e240b6e2ea66a1d47ca782f889247b3186b0a5ab"
36
+ ),
37
+ "stage3-ranked.jsonl": (
38
+ "b8a0f2a7dd4191dd6d578addaec67cee60786104a748dd78203a822e196e3129"
39
+ ),
40
+ "stage3-thresholds.jsonl": (
41
+ "1c3a4bcf0a4598fc7c91236c01513f375746ba0d8c635d88630800be9f5bfcd6"
42
+ ),
43
+ "aggregate": (
44
+ "ee2965586cff334caf22d1c0b360127c22cca34c5136f58c88cdd150a5ffeefd"
45
+ ),
46
+ "lower-terminal": (
47
+ "9def4c1d0134165bbf3166382d8b07b361b816504e00e2473615fe9c45a26218"
48
+ ),
49
+ "upper-terminal": (
50
+ "f1fe9686eaac799ecf4583d48fe39858381b29e7a47844af5c447e6e21ebc86e"
51
+ ),
52
+ }
53
+
54
+ DISTQLDPC_BINARY_SHA256 = (
55
+ "9e09c544d5151d872dc1037dcb1440509e27b8b485a7f9ea5a15d6e55b36d3fa"
56
+ )
57
+ DISTQLDPC_SOURCE_COMMIT = (
58
+ "c01fa93eb5e1e62948e4861e2c164a6b64fe88eb"
59
+ )
60
+
61
+ EXPECTED_TYPED_CLAIM_SHA256 = (
62
+ "1a2a076a891a790a92359d903f7874f989d12a2f684518fd227923bbe7f0c2c9"
63
+ )
64
+ EXPECTED_TYPED_REQUEST_SHA256 = (
65
+ "ce20b44a85b000cf59b24fa4fa69196ccd596ba3d42c78ab325bad1fac99caad"
66
+ )
67
+ EXPECTED_TYPED_ARTIFACT_SHA256 = (
68
+ "ed3f639b3b7254566b248e3314dcca9aed82a8a91f0465a61d920571b2c9c6d3"
69
+ )
70
+ RAW_LOWER_EVIDENCE_SHA256 = (
71
+ "75ac260531dba3618c14fb459e86e2e8bfe39d205a1705da61d516528d0db581"
72
+ )
73
+ RESUMED_LOWER_EVIDENCE_SHA256 = (
74
+ "fb0bb3fc7b3dc6312952ad7ba9d324346ebd16db35e59e3b894ae3c0f70d489e"
75
+ )
76
+ RAW_UPPER_EVIDENCE_SHA256 = (
77
+ "8da3a1ee2523a0e7e4c4e21a627c8a780d8160cd09d9beb5130044cd8936fdbe"
78
+ )
79
+ RESUMED_UPPER_EVIDENCE_SHA256 = (
80
+ "d637b58008f17e1380fb1a3ed6f262b4183b7e19f4c420555d89df0c33340d5b"
81
+ )
82
+ KNOWN_ANSWER_GATE_SHA256 = (
83
+ "7adf6f4a93cb321fa0501cbb62723370cdbc3a85db7d9e2565cc086ea6a00687"
84
+ )
85
+ KNOWN_ANSWER_TRUST_SHA256 = (
86
+ "1e67120095a358bbcb2166a6804479655dc3bdd8b36c4d12bc56f73d5e741140"
87
+ )
88
+ REGISTRY_FILE_SHA256 = (
89
+ "265f1a3fefef884adeaa980a5dce2441dee4f6f6d71c253ba7a6491360733689"
90
+ )
91
+ REGISTRY_INTERNAL_SHA256 = (
92
+ "536c733d68d344ed9fef9992bbeb1000900174ad0c500ddb7004126ae5c98408"
93
+ )
94
+ EXPECTED_MATRIX_RECORDS = {
95
+ "hx": {
96
+ "content_sha256": "3e84de485357b46239174805f8fc3378eeb0e4207a06fc3a95568e5630c58c8e",
97
+ "file_sha256": "a8d53c3e14419e0b0c30e2960621394475e06d0cff30a6c1f0c9635c8f5bf9ea",
98
+ },
99
+ "hz": {
100
+ "content_sha256": "21b89580009d0ce19cab3c537ddc53c0211a962d88e4aaa1cf3b9a6752d502ab",
101
+ "file_sha256": "fae00c16429f8312a9a5f1c8e7f025431f986ac8dcc13a433887111f5503baa4",
102
+ },
103
+ }
104
+ MUTABLE_BASE_FILES = frozenset(
105
+ {
106
+ "README.md",
107
+ "THIRD_PARTY_NOTICES.md",
108
+ "docs/REPRODUCE.md",
109
+ "docs/SCHEMA.md",
110
+ "docs/STAGE3_TYPED_EXACT_FOM_GT_12.md",
111
+ "data/stage3_typed_exact_fom_gt_12.jsonl",
112
+ "evidence/stage3_typed_exact_matrix_index.jsonl",
113
+ "evidence/stage3_typed_exact_proofs.jsonl",
114
+ "manifests/stage3_typed_exact_fom_gt_12.json",
115
+ "scripts/build_exact_fom_gt_12_release.py",
116
+ "scripts/verify_stage3_typed_exact_fom_gt_12.py",
117
+ "scripts/verify_dataset.py",
118
+ }
119
+ )
120
+ LFS_POINTER_PREFIX = b"version https://git-lfs.github.com/spec/v1\n"
121
+
122
+
123
+ def sha256_bytes(value: bytes) -> str:
124
+ return hashlib.sha256(value).hexdigest()
125
+
126
+
127
+ def sha256_file(path: Path) -> str:
128
+ digest = hashlib.sha256()
129
+ with path.open("rb") as handle:
130
+ for block in iter(lambda: handle.read(1 << 20), b""):
131
+ digest.update(block)
132
+ return digest.hexdigest()
133
+
134
+
135
+ def canonical_sha256(value: dict[str, Any], omitted: str) -> str:
136
+ payload = {key: item for key, item in value.items() if key != omitted}
137
+ encoded = json.dumps(
138
+ payload,
139
+ sort_keys=True,
140
+ separators=(",", ":"),
141
+ ensure_ascii=False,
142
+ allow_nan=False,
143
+ ).encode()
144
+ return sha256_bytes(encoded)
145
+
146
+
147
+ def canonical_value_sha256(value: Any) -> str:
148
+ encoded = json.dumps(
149
+ value,
150
+ sort_keys=True,
151
+ separators=(",", ":"),
152
+ ensure_ascii=False,
153
+ allow_nan=False,
154
+ ).encode()
155
+ return sha256_bytes(encoded)
156
+
157
+
158
+ def load_json(path: Path) -> dict[str, Any]:
159
+ value = json.loads(path.read_text(encoding="utf-8"))
160
+ if not isinstance(value, dict):
161
+ raise ValueError(f"expected one JSON object: {path}")
162
+ return value
163
+
164
+
165
+ def verify_materialized_base(root: Path) -> None:
166
+ sums_path = root / "manifests" / "SHA256SUMS"
167
+ for line in sums_path.read_text(encoding="utf-8").splitlines():
168
+ if not line:
169
+ continue
170
+ expected, relative = line.split(" ", 1)
171
+ path = root / relative
172
+ if not path.is_file():
173
+ raise ValueError(f"missing base release file: {relative}")
174
+ if path.read_bytes()[: len(LFS_POINTER_PREFIX)] == LFS_POINTER_PREFIX:
175
+ raise ValueError(
176
+ f"Git LFS object is not materialized: {relative}; run git lfs pull"
177
+ )
178
+ if relative not in MUTABLE_BASE_FILES:
179
+ observed = sha256_file(path)
180
+ if observed != expected:
181
+ raise ValueError(f"sealed base file changed: {relative}")
182
+
183
+
184
+ def git_head(root: Path) -> str:
185
+ return subprocess.check_output(
186
+ ["git", "-C", str(root), "rev-parse", "HEAD"],
187
+ text=True,
188
+ ).strip()
189
+
190
+
191
+ def gf2_rank(matrix: Any) -> int:
192
+ rows = [
193
+ sum((int(bit) & 1) << col for col, bit in enumerate(row))
194
+ for row in matrix.tolist()
195
+ ]
196
+ rank = 0
197
+ while rows:
198
+ pivot = max(rows)
199
+ if not pivot:
200
+ break
201
+ bit = 1 << (pivot.bit_length() - 1)
202
+ rank += 1
203
+ rows = [
204
+ value ^ pivot if value & bit else value
205
+ for value in rows
206
+ if value != pivot
207
+ ]
208
+ return rank
209
+
210
+
211
+ def content_sha256(matrix: Any) -> str:
212
+ shape = [int(matrix.shape[0]), int(matrix.shape[1])]
213
+ header = json.dumps(
214
+ {"dtype": "uint8-gf2", "shape": shape},
215
+ sort_keys=True,
216
+ separators=(",", ":"),
217
+ )
218
+ return sha256_bytes(header.encode() + b"\n" + matrix.tobytes(order="C"))
219
+
220
+
221
+ def dist_array_sha256(name: str, matrix: Any) -> str:
222
+ digest = hashlib.sha256()
223
+ digest.update(name.encode())
224
+ digest.update(b"\0")
225
+ digest.update(json.dumps(list(matrix.shape), separators=(",", ":")).encode())
226
+ digest.update(b"\0")
227
+ digest.update(matrix.tobytes(order="C"))
228
+ return digest.hexdigest()
229
+
230
+
231
+ def matrix_market_gzip(name: str, matrix: Any) -> bytes:
232
+ rows, cols = map(int, matrix.shape)
233
+ entries = [
234
+ f"{row + 1} {col + 1} 1\n"
235
+ for row in range(rows)
236
+ for col in range(cols)
237
+ if int(matrix[row, col]) & 1
238
+ ]
239
+ body = (
240
+ "%%MatrixMarket matrix coordinate integer general\n"
241
+ f"% qcode candidate {CANDIDATE_ID} {name}; entries are GF(2)\n"
242
+ f"{rows} {cols} {len(entries)}\n"
243
+ + "".join(entries)
244
+ ).encode("ascii")
245
+ output = io.BytesIO()
246
+ with gzip.GzipFile(
247
+ filename="",
248
+ mode="wb",
249
+ fileobj=output,
250
+ compresslevel=9,
251
+ mtime=0,
252
+ ) as handle:
253
+ handle.write(body)
254
+ return output.getvalue()
255
+
256
+
257
+ def matrix_record(root: Path, name: str, matrix: Any) -> dict[str, Any]:
258
+ relative = Path("matrices") / CANDIDATE_ID / f"{name}.mtx.gz"
259
+ path = root / relative
260
+ path.parent.mkdir(parents=True, exist_ok=True)
261
+ payload = matrix_market_gzip(name, matrix)
262
+ path.write_bytes(payload)
263
+ return {
264
+ "path": relative.as_posix(),
265
+ "shape": [int(matrix.shape[0]), int(matrix.shape[1])],
266
+ "file_sha256": sha256_bytes(payload),
267
+ "content_sha256": content_sha256(matrix),
268
+ }
269
+
270
+
271
+ def write_jsonl_one(path: Path, value: dict[str, Any]) -> None:
272
+ payload = json.dumps(
273
+ value,
274
+ sort_keys=True,
275
+ separators=(",", ":"),
276
+ ensure_ascii=False,
277
+ allow_nan=False,
278
+ ) + "\n"
279
+ path.parent.mkdir(parents=True, exist_ok=True)
280
+ path.write_text(payload, encoding="utf-8")
281
+
282
+
283
+ def source_paths(run: Path) -> dict[str, Path]:
284
+ unit_dir = (
285
+ run
286
+ / "solver-state"
287
+ / "sat-sectors"
288
+ / "sat-units"
289
+ / STATE_KEY
290
+ )
291
+ return {
292
+ "stage3-summary.json": run / "stage3-summary.json",
293
+ "stage3-ranked.jsonl": run / "stage3-ranked.jsonl",
294
+ "stage3-thresholds.jsonl": run / "stage3-thresholds.jsonl",
295
+ "aggregate": run / "solver-state" / "sat-sectors" / f"{STATE_KEY}.json",
296
+ "lower-terminal": unit_dir / "lower-distqldpc-mto-XZ-global.json",
297
+ "upper-terminal": unit_dir / "upper-X-global.json",
298
+ }
299
+
300
+
301
+ def build(root: Path, source_run: Path, qcode_root: Path) -> None:
302
+ root = root.resolve(strict=True)
303
+ source_run = source_run.resolve(strict=True)
304
+ qcode_root = qcode_root.resolve(strict=True)
305
+ verify_materialized_base(root)
306
+ if git_head(root) != HF_BASE_COMMIT:
307
+ raise ValueError("Hugging Face release base commit changed")
308
+ if git_head(qcode_root) != QCODE_COMMIT:
309
+ raise ValueError("qcode source commit changed")
310
+ if subprocess.check_output(
311
+ [
312
+ "git", "-C", str(qcode_root), "status", "--porcelain",
313
+ "--untracked-files=no",
314
+ ],
315
+ text=True,
316
+ ).strip():
317
+ raise ValueError("qcode source tree has tracked modifications")
318
+ if sha256_file(root / "reference/known_answer_gate.json") != KNOWN_ANSWER_GATE_SHA256:
319
+ raise ValueError("known-answer gate changed")
320
+ if sha256_file(root / "reference/known_answer_trust.json") != KNOWN_ANSWER_TRUST_SHA256:
321
+ raise ValueError("known-answer trust record changed")
322
+ registry_path = qcode_root / "results" / "known_code_registry.json"
323
+ if sha256_file(registry_path) != REGISTRY_FILE_SHA256:
324
+ raise ValueError("known-code registry file changed")
325
+ registry = load_json(registry_path)
326
+ if registry.get("registry_sha256") != REGISTRY_INTERNAL_SHA256:
327
+ raise ValueError("known-code registry internal seal changed")
328
+ paths = source_paths(source_run)
329
+ for label, path in paths.items():
330
+ observed = sha256_file(path)
331
+ if observed != EXPECTED_SOURCE_SHA256[label]:
332
+ raise ValueError(f"unexpected {label} SHA256: {observed}")
333
+
334
+ sys.path.insert(0, str(qcode_root))
335
+ import numpy as np
336
+ from evaluation.bb_code import build_bb_code
337
+ from evaluation.distance_distqldpc import (
338
+ verify_distqldpc_exact_evidence,
339
+ verify_distqldpc_lower_evidence,
340
+ )
341
+ from evaluation.distance_milp import get_code_matrices
342
+ from evaluation.sector_certificate import (
343
+ REQUEST_FIELD,
344
+ claim_from_sector_sat_artifact,
345
+ )
346
+ from humanize.state import code_key
347
+
348
+ aggregate = load_json(paths["aggregate"])
349
+ lower = load_json(paths["lower-terminal"])
350
+ upper = load_json(paths["upper-terminal"])
351
+ summary = load_json(paths["stage3-summary.json"])
352
+ candidate = aggregate["candidate"]
353
+
354
+ if aggregate.get("status") != "EXACT_PROVEN":
355
+ raise ValueError("source aggregate is not EXACT_PROVEN")
356
+ if aggregate.get("artifact_sha256") != (
357
+ "fa03b3a2a8f43d77131c8a5491efbb56d98800d9e215b45e9e5b3e7f86509159"
358
+ ):
359
+ raise ValueError("source aggregate canonical seal changed")
360
+ if candidate.get("canonical_digest") != CANONICAL_DIGEST:
361
+ raise ValueError("source candidate digest changed")
362
+ if code_key(candidate) != CANDIDATE_ID:
363
+ raise ValueError("candidate_id no longer matches humanize.state.code_key")
364
+ if summary.get("status_counts") != {"EXACT_PROVEN": 1}:
365
+ raise ValueError("Stage 3 summary is not the accepted one-result handoff")
366
+ summary_expected = {
367
+ "schema_version": 1,
368
+ "gate": "qldpc-direction-candidate-pool",
369
+ "target_mode": "scalar-fom-inclusive-v1",
370
+ "backend": "sat-sectors",
371
+ "input_rows": 4096,
372
+ "selected_candidates": 1,
373
+ "malformed_unresolved_rows": 0,
374
+ "duplicate_digests_skipped": 0,
375
+ "unselected_unresolved_candidates": 0,
376
+ "selection_exhausted": True,
377
+ "threshold_only": False,
378
+ "status_counts": {"EXACT_PROVEN": 1},
379
+ "retry_required": False,
380
+ "retry_reasons": {
381
+ "unresolved_candidates": 0,
382
+ "unselected_unresolved_candidates": 0,
383
+ "operational_errors": 0,
384
+ },
385
+ "certify": False,
386
+ "stage4_candidates": 1,
387
+ "certified_wins": 0,
388
+ "operational_errors": 0,
389
+ }
390
+ if any(summary.get(key) != value for key, value in summary_expected.items()):
391
+ raise ValueError("Stage 3 summary fields changed")
392
+ stage3_budget = summary["worker_budget"]["stage3"]
393
+ if {
394
+ "candidate_workers": stage3_budget.get("candidate_workers"),
395
+ "direction_workers": stage3_budget.get("direction_workers"),
396
+ "configured_solver_workers": stage3_budget.get("configured_solver_workers"),
397
+ "admitted_solver_workers": stage3_budget.get("admitted_solver_workers"),
398
+ "max_total_workers": summary["worker_budget"].get("max_total_workers"),
399
+ } != {
400
+ "candidate_workers": 1,
401
+ "direction_workers": 2,
402
+ "configured_solver_workers": 2,
403
+ "admitted_solver_workers": 2,
404
+ "max_total_workers": 2,
405
+ }:
406
+ raise ValueError("Stage 3 worker budget changed")
407
+ wall = summary["hard_wall_budget"]
408
+ if (
409
+ float(wall.get("direction_timeout_s", -1)) != 21600.0
410
+ or float(wall.get("candidate_timeout_s", -1)) != 134400.0
411
+ or float(wall.get("termination_grace_s", -1)) != 600.0
412
+ ):
413
+ raise ValueError("Stage 3 hard-wall budget changed")
414
+ results = summary.get("results")
415
+ if (
416
+ not isinstance(results, list)
417
+ or len(results) != 1
418
+ or results[0].get("canonical_digest") != CANONICAL_DIGEST
419
+ or results[0].get("status") != "EXACT_PROVEN"
420
+ or results[0].get("completed_proof_units") != 2
421
+ or results[0].get("expected_proof_units") != 27
422
+ or "error" in results[0]
423
+ or "hard_wall" in results[0]
424
+ ):
425
+ raise ValueError("Stage 3 result summary changed")
426
+
427
+ typed_claim = claim_from_sector_sat_artifact(aggregate)
428
+ typed_request = typed_claim[REQUEST_FIELD]
429
+ if canonical_value_sha256(typed_claim) != EXPECTED_TYPED_CLAIM_SHA256:
430
+ raise ValueError("typed Stage 3 claim changed")
431
+ if canonical_value_sha256(typed_request) != EXPECTED_TYPED_REQUEST_SHA256:
432
+ raise ValueError("typed Stage 3 request changed")
433
+ typed_expected = {
434
+ "coverage_mode": "global",
435
+ "requested_coverage_mode": "first-nonzero",
436
+ "requested_lower_backend": "distqldpc",
437
+ "lower_bound_backend": "distqldpc",
438
+ "lower_bound_threshold": 15,
439
+ "required_distance": 16,
440
+ "stage3_status": "EXACT_PROVEN",
441
+ "target_mode": "scalar-fom-inclusive-v1",
442
+ "use_translation_anchors": True,
443
+ "use_construction_anchors": False,
444
+ "anchor_cover_cubes": None,
445
+ "distqldpc_exact_distances": [16],
446
+ "distqldpc_conflict": False,
447
+ "distqldpc_conflict_details": None,
448
+ "low_witnesses": [],
449
+ "escalation_decisions": [],
450
+ "stage3_artifact_sha256": EXPECTED_TYPED_ARTIFACT_SHA256,
451
+ }
452
+ if any(typed_request.get(key) != value for key, value in typed_expected.items()):
453
+ raise ValueError("typed Stage 3 request semantics changed")
454
+ if {
455
+ "canonical_digest": typed_claim.get("canonical_digest"),
456
+ "n": typed_claim.get("n"),
457
+ "k": typed_claim.get("k"),
458
+ "required_distance": typed_claim.get("required_distance"),
459
+ } != {
460
+ "canonical_digest": CANONICAL_DIGEST,
461
+ "n": 210,
462
+ "k": 10,
463
+ "required_distance": 16,
464
+ }:
465
+ raise ValueError("typed Stage 3 claim parameters changed")
466
+ typed_lower = typed_request["lower_bound_decisions"]
467
+ typed_upper = typed_request["upper_witness"]
468
+ if (
469
+ len(typed_lower) != 1
470
+ or typed_lower[0]["solver_evidence"]["evidence_sha256"]
471
+ != RESUMED_LOWER_EVIDENCE_SHA256
472
+ or typed_lower[0]["solver_evidence"]["exact_distance"] != 16
473
+ or typed_upper["solver_evidence"]["evidence_sha256"]
474
+ != RESUMED_UPPER_EVIDENCE_SHA256
475
+ or typed_upper["solver_evidence"]["objective"] != 16
476
+ ):
477
+ raise ValueError("typed Stage 3 evidence identities changed")
478
+ if lower.get("evidence_sha256") != RAW_LOWER_EVIDENCE_SHA256:
479
+ raise ValueError("raw lower terminal evidence changed")
480
+ if upper.get("evidence_sha256") != RAW_UPPER_EVIDENCE_SHA256:
481
+ raise ValueError("raw upper terminal evidence changed")
482
+ aggregate_expected = {
483
+ "coverage_mode": "global",
484
+ "requested_coverage_mode": "first-nonzero",
485
+ "requested_lower_backend": "distqldpc",
486
+ "lower_bound_backend": "distqldpc",
487
+ "lower_bound_threshold": 15,
488
+ "expected_units": 27,
489
+ "attempted_units": 23,
490
+ "terminal_units": 2,
491
+ "retryable_units": 21,
492
+ "expected_directions": 27,
493
+ "completed_directions": 2,
494
+ "expected_lower_decisions": 1,
495
+ "completed_lower_decisions": 1,
496
+ "expected_lower_partitions": 1,
497
+ "completed_lower_partitions": 1,
498
+ "upper_unsat_decisions": [],
499
+ "threshold_only": False,
500
+ "distqldpc_exact_distances": [16],
501
+ "distqldpc_conflict": False,
502
+ "distqldpc_conflict_details": None,
503
+ "low_witnesses": [],
504
+ }
505
+ if any(aggregate.get(key) != value for key, value in aggregate_expected.items()):
506
+ raise ValueError("Stage 3 aggregate terminal state changed")
507
+
508
+ code = build_bb_code(
509
+ 21,
510
+ 5,
511
+ [(7, 3), (18, 4), (20, 0)],
512
+ [(2, 3), (18, 1), (19, 2)],
513
+ geometry={"schema_version": 1, "family": "twisted_torus", "twist": 3},
514
+ )
515
+ hx, hz, lx, lz = (
516
+ np.ascontiguousarray(np.asarray(value, dtype=np.uint8) & 1)
517
+ for value in get_code_matrices(code)
518
+ )
519
+ gx, gz = lz, lx
520
+ matrices = {"Hx": hx, "Hz": hz, "Gx": gx, "Gz": gz}
521
+ expected_dist_hashes = lower["instance"]["matrix_files"]
522
+ for name, matrix in matrices.items():
523
+ if dist_array_sha256(name, matrix) != expected_dist_hashes[name]["array_sha256"]:
524
+ raise ValueError(f"{name} does not match the sealed solver instance")
525
+ checkpoint_identity = lower["instance"]["checkpoint_identity"]
526
+ verifier_args = {
527
+ "max_weight": 15,
528
+ "cardinality_mode": "mto",
529
+ "expected_checkpoint_identity": checkpoint_identity,
530
+ "expected_binary_sha256": DISTQLDPC_BINARY_SHA256,
531
+ "expected_source_commit": DISTQLDPC_SOURCE_COMMIT,
532
+ }
533
+ exact_failures = verify_distqldpc_exact_evidence(
534
+ lower, hx, hz, lx, lz, **verifier_args
535
+ )
536
+ lower_failures = verify_distqldpc_lower_evidence(
537
+ lower, hx, hz, lx, lz, **verifier_args
538
+ )
539
+ if exact_failures or lower_failures:
540
+ raise ValueError(
541
+ f"raw DistQLDPC terminal replay failed: {exact_failures}; "
542
+ f"{lower_failures}"
543
+ )
544
+ for name in ("Hx", "Hz"):
545
+ matrix = matrices[name]
546
+ generated = {
547
+ "content_sha256": content_sha256(matrix),
548
+ "file_sha256": sha256_bytes(matrix_market_gzip(name, matrix)),
549
+ }
550
+ if generated != EXPECTED_MATRIX_RECORDS[name.lower()]:
551
+ raise ValueError(f"deterministic {name} public matrix changed")
552
+
553
+ rank_x, rank_z = gf2_rank(hx), gf2_rank(hz)
554
+ if (rank_x, rank_z) != (100, 100):
555
+ raise ValueError("unexpected check ranks")
556
+ if np.any((hx @ hz.T) & 1):
557
+ raise ValueError("CSS checks do not commute")
558
+ if np.any((hx @ gx.T) & 1) or np.any((hz @ gz.T) & 1):
559
+ raise ValueError("logical representatives do not commute with checks")
560
+ if not np.array_equal((gz @ gx.T) & 1, np.eye(10, dtype=np.uint8)):
561
+ raise ValueError("logical representatives fail duality")
562
+
563
+ packed = bytes.fromhex(upper["operator"]["packed_hex"])
564
+ operator = np.unpackbits(
565
+ np.frombuffer(packed, dtype=np.uint8), bitorder="little"
566
+ )[:210].astype(np.uint8)
567
+ if int(operator.sum()) != 16 or np.any((hz @ operator) & 1):
568
+ raise ValueError("upper witness is invalid")
569
+ syndrome = ((gx @ operator) & 1).astype(int).tolist()
570
+ if syndrome != upper["logical_syndrome"] or not any(syndrome):
571
+ raise ValueError("upper witness is not a nontrivial X logical")
572
+
573
+ checks = {
574
+ "css_commutation": True,
575
+ "commutation_violations": 0,
576
+ "rank_x": rank_x,
577
+ "rank_z": rank_z,
578
+ "k_recomputed": 210 - rank_x - rank_z,
579
+ "max_check_weight": max(
580
+ max(map(int, hx.sum(axis=1))),
581
+ max(map(int, hz.sum(axis=1))),
582
+ ),
583
+ "max_sector_qubit_degree": max(
584
+ max(map(int, hx.sum(axis=0))),
585
+ max(map(int, hz.sum(axis=0))),
586
+ ),
587
+ "max_qubit_degree": max(map(int, hx.sum(axis=0) + hz.sum(axis=0))),
588
+ "logical_basis_complete": True,
589
+ "logical_duality": True,
590
+ }
591
+ if checks != {
592
+ "css_commutation": True,
593
+ "commutation_violations": 0,
594
+ "rank_x": 100,
595
+ "rank_z": 100,
596
+ "k_recomputed": 10,
597
+ "max_check_weight": 6,
598
+ "max_sector_qubit_degree": 3,
599
+ "max_qubit_degree": 6,
600
+ "logical_basis_complete": True,
601
+ "logical_duality": True,
602
+ }:
603
+ raise ValueError(f"unexpected matrix checks: {checks}")
604
+
605
+ matrix_records = {
606
+ name.lower(): matrix_record(root, name, matrix)
607
+ for name, matrix in matrices.items()
608
+ }
609
+
610
+ public_source = {
611
+ "qcode_commit": QCODE_COMMIT,
612
+ "stage3_aggregate_byte_sha256": EXPECTED_SOURCE_SHA256["aggregate"],
613
+ "stage3_aggregate_self_seal_sha256": aggregate["artifact_sha256"],
614
+ "stage3_typed_request_artifact_sha256": EXPECTED_TYPED_ARTIFACT_SHA256,
615
+ "stage3_typed_claim_sha256": EXPECTED_TYPED_CLAIM_SHA256,
616
+ "stage3_typed_request_sha256": EXPECTED_TYPED_REQUEST_SHA256,
617
+ "stage3_lower_terminal_byte_sha256": EXPECTED_SOURCE_SHA256["lower-terminal"],
618
+ "stage3_lower_raw_terminal_evidence_sha256": RAW_LOWER_EVIDENCE_SHA256,
619
+ "stage3_lower_resumed_evidence_sha256": RESUMED_LOWER_EVIDENCE_SHA256,
620
+ "stage3_upper_terminal_byte_sha256": EXPECTED_SOURCE_SHA256["upper-terminal"],
621
+ "stage3_upper_raw_terminal_evidence_sha256": RAW_UPPER_EVIDENCE_SHA256,
622
+ "stage3_upper_resumed_evidence_sha256": RESUMED_UPPER_EVIDENCE_SHA256,
623
+ "stage3_summary_byte_sha256": EXPECTED_SOURCE_SHA256["stage3-summary.json"],
624
+ "stage3_ranked_byte_sha256": EXPECTED_SOURCE_SHA256["stage3-ranked.jsonl"],
625
+ "stage3_threshold_byte_sha256": EXPECTED_SOURCE_SHA256["stage3-thresholds.jsonl"],
626
+ "known_answer_gate_sha256": KNOWN_ANSWER_GATE_SHA256,
627
+ "known_answer_trust_sha256": KNOWN_ANSWER_TRUST_SHA256,
628
+ }
629
+ construction = {
630
+ "family": "css-bb",
631
+ "representation_id": "css-bb-twisted-torus-generator-v1",
632
+ "ell": 21,
633
+ "m": 5,
634
+ "geometry": {"schema_version": 1, "family": "twisted_torus", "twist": 3},
635
+ "A_terms": [[7, 3], [18, 4], [20, 0]],
636
+ "B_terms": [[2, 3], [18, 1], [19, 2]],
637
+ }
638
+ record: dict[str, Any] = {
639
+ "schema_version": 1,
640
+ "record_kind": "stage3_typed_exact_fom_gt_12",
641
+ "evidence_class": "STAGE3_TYPED_EXACT_PENDING_STRICT_GATE",
642
+ "source_stage": "stage3_direction_audit",
643
+ "source_status": "EXACT_PROVEN",
644
+ "release_status": "PENDING_STAGE4_STAGE5",
645
+ "candidate_id": CANDIDATE_ID,
646
+ "canonical_digest": CANONICAL_DIGEST,
647
+ "code": "[[210,10,16]]",
648
+ "construction": construction,
649
+ "parameters": {"n": 210, "k": 10},
650
+ "distance": {
651
+ "status": "EXACT_PROVEN",
652
+ "exact": 16,
653
+ "lower_bound": 16,
654
+ "upper_bound": 16,
655
+ "lower_bound_backend": "DistQLDPC/MaxCDCL",
656
+ "upper_bound_backend": "python-sat/cadical195",
657
+ },
658
+ "fom": {
659
+ "exact": {
660
+ "numerator": 256,
661
+ "denominator": 21,
662
+ "decimal": 256 / 21,
663
+ },
664
+ "excess_over_12": {
665
+ "numerator": 4,
666
+ "denominator": 21,
667
+ "decimal": 4 / 21,
668
+ },
669
+ "strict_integer_margin": 40,
670
+ },
671
+ "target": {
672
+ "strict_predicate": "k*d*d > 12*n",
673
+ "required_distance": 16,
674
+ "left_hand_side": 2560,
675
+ "right_hand_side": 2520,
676
+ "passes_strict_target": True,
677
+ "certified_win": False,
678
+ },
679
+ "source_target": {
680
+ "mode": candidate["target"]["mode"],
681
+ "strict": candidate["target"]["strict"],
682
+ "binding_sha256": candidate["target"]["binding_sha256"],
683
+ "required_distance": candidate["target"]["required_distance"],
684
+ },
685
+ "matrices": matrix_records,
686
+ "matrix_checks": checks,
687
+ "novelty": {
688
+ "status": candidate["novelty"]["status"],
689
+ "novel": candidate["novelty"]["novel"],
690
+ "registry_version": candidate["novelty"]["registry_version"],
691
+ "registry_file_sha256": REGISTRY_FILE_SHA256,
692
+ "registry_internal_sha256": REGISTRY_INTERNAL_SHA256,
693
+ "matched_entries": candidate["novelty"]["matched_entries"],
694
+ "source_stage3_replayed": candidate["novelty"]["replayed_from_construction"],
695
+ "release_current_registry_replayed": False,
696
+ "scope": "pinned known-code registry with explicit construction/matrix replay",
697
+ },
698
+ "known_answer_context": {
699
+ "gate_file_sha256": KNOWN_ANSWER_GATE_SHA256,
700
+ "trust_file_sha256": KNOWN_ANSWER_TRUST_SHA256,
701
+ "release_replayed": False,
702
+ },
703
+ "authority": {
704
+ "stage3_typed_handoff_replay": True,
705
+ "exact_under_pinned_solver_trust_model": True,
706
+ "pipeline_stage4_certificate": False,
707
+ "portable_unsat_proof_certificate": False,
708
+ "pipeline_stage5_final_gate": False,
709
+ "pipeline_promotion": False,
710
+ "independent_release_gate_complete": False,
711
+ "publication_certificate": False,
712
+ "public_dataset_record": True,
713
+ },
714
+ "source": public_source,
715
+ }
716
+ record["record_sha256"] = canonical_sha256(record, "record_sha256")
717
+
718
+ safe_backend = {
719
+ "distribution": lower["backend"]["distribution"],
720
+ "interface": lower["backend"]["interface"],
721
+ "repository": lower["backend"]["repository"],
722
+ "source_commit": lower["backend"]["source_commit"],
723
+ "binary_sha256": lower["backend"]["binary_sha256"],
724
+ "binary_size": lower["backend"]["file_size"],
725
+ "identity_sha256": lower["backend"]["identity_sha256"],
726
+ }
727
+ if safe_backend["binary_sha256"] != DISTQLDPC_BINARY_SHA256:
728
+ raise ValueError("DistQLDPC binary pin changed")
729
+ if safe_backend["source_commit"] != DISTQLDPC_SOURCE_COMMIT:
730
+ raise ValueError("DistQLDPC source pin changed")
731
+
732
+ evidence: dict[str, Any] = {
733
+ "schema_version": 1,
734
+ "record_kind": "stage3_typed_exact_fom_gt_12_evidence",
735
+ "evidence_class": "STAGE3_TYPED_EXACT_PENDING_STRICT_GATE",
736
+ "source_status": "EXACT_PROVEN",
737
+ "release_status": "PENDING_STAGE4_STAGE5",
738
+ "authority": record["authority"],
739
+ "candidate_id": CANDIDATE_ID,
740
+ "canonical_digest": CANONICAL_DIGEST,
741
+ "distance_claim": {
742
+ "status": "EXACT_PROVEN",
743
+ "exact": 16,
744
+ "lower_bound": 16,
745
+ "upper_bound": 16,
746
+ },
747
+ "stage3_typed_handoff": {
748
+ "gate": aggregate["gate"],
749
+ "status": aggregate["status"],
750
+ "backend": aggregate["lower_bound_backend"],
751
+ "lower_bound_threshold": aggregate["lower_bound_threshold"],
752
+ "attempted_proof_units": aggregate["attempted_units"],
753
+ "completed_proof_units": aggregate["terminal_units"],
754
+ "expected_proof_units": aggregate["expected_units"],
755
+ "source_retryable_units_at_terminal": aggregate["retryable_units"],
756
+ "summary_retry_required": summary["retry_required"],
757
+ "terminal_reason": "distqldpc_exact_plus_upper_witness",
758
+ "distqldpc_exact_distances": aggregate["distqldpc_exact_distances"],
759
+ "distqldpc_conflict": aggregate["distqldpc_conflict"],
760
+ "distqldpc_conflict_details": aggregate["distqldpc_conflict_details"],
761
+ "low_witnesses": aggregate["low_witnesses"],
762
+ "typed_replay_verified": True,
763
+ **public_source,
764
+ },
765
+ "lower_bound_evidence": {
766
+ "evidence_kind": lower["evidence_kind"],
767
+ "formulation": lower["formulation"],
768
+ "outcome": lower["outcome"],
769
+ "exact_distance": lower["exact_distance"],
770
+ "lower_bound": lower["lower_bound"],
771
+ "upper_bound": lower["upper_bound"],
772
+ "threshold_infeasible": lower["threshold_infeasible"],
773
+ "decision_complete": lower["decision_complete"],
774
+ "retryable": lower["retryable"],
775
+ "returncode": lower["returncode"],
776
+ "timed_out": lower["timed_out"],
777
+ "hard_timeout_s": lower["hard_timeout_s"],
778
+ "elapsed_s": lower["elapsed_s"],
779
+ "cardinality_mode": lower["instance"]["solver_execution"]["cardinality_mode"],
780
+ "parsed_output": lower["parsed_output"],
781
+ "stdout_sha256": lower["stdout_sha256"],
782
+ "stderr_sha256": lower["stderr_sha256"],
783
+ "raw_terminal_replay_verified": True,
784
+ "raw_terminal_evidence_sha256": lower["evidence_sha256"],
785
+ "aggregate_resumed_evidence_sha256": RESUMED_LOWER_EVIDENCE_SHA256,
786
+ "terminal_file_sha256": EXPECTED_SOURCE_SHA256["lower-terminal"],
787
+ "instance_binding_sha256": lower["instance"]["binding_sha256"],
788
+ "checkpoint_identity": checkpoint_identity,
789
+ "logical_detector": lower["instance"]["logical_detector"],
790
+ "solver_instance_array_sha256": {
791
+ name: expected_dist_hashes[name]["array_sha256"]
792
+ for name in ("Hx", "Hz", "Gx", "Gz")
793
+ },
794
+ "runtime_source": lower["instance"]["solver_execution"]["runtime_source"],
795
+ "backend": safe_backend,
796
+ },
797
+ "upper_bound_evidence": {
798
+ "evidence_kind": upper["evidence_kind"],
799
+ "formulation": upper["formulation"],
800
+ "outcome": upper["outcome"],
801
+ "sector": upper["sector"],
802
+ "objective": upper["objective"],
803
+ "decision_complete": upper["decision_complete"],
804
+ "retryable": upper["retryable"],
805
+ "anchor_indices": upper["anchor_indices"],
806
+ "operator": upper["operator"],
807
+ "logical_syndrome": upper["logical_syndrome"],
808
+ "backend": upper["backend"],
809
+ "cnf": upper["cnf"],
810
+ "raw_terminal_evidence_sha256": upper["evidence_sha256"],
811
+ "aggregate_resumed_evidence_sha256": RESUMED_UPPER_EVIDENCE_SHA256,
812
+ "terminal_file_sha256": EXPECTED_SOURCE_SHA256["upper-terminal"],
813
+ "instance_binding_sha256": upper["instance"]["binding_sha256"],
814
+ },
815
+ "symmetry": {
816
+ "translation_verified": aggregate["translation_symmetry"]["verified"],
817
+ "orbit_representatives": aggregate["translation_symmetry"]["orbit_representatives"],
818
+ "xz_sector_isometry_verified": aggregate["xz_sector_isometry"]["verified"],
819
+ "xz_sector_isometry_sha256": aggregate["xz_sector_isometry"]["report_sha256"],
820
+ "covered_sectors": aggregate["xz_sector_isometry"]["covered_sectors"],
821
+ },
822
+ "limitations": {
823
+ "portable_unsat_certificate": (
824
+ "Not available. The lower bound is a replay-bound result under the "
825
+ "pinned DistQLDPC/MaxCDCL binary and runtime trust model."
826
+ ),
827
+ "independent_checks": (
828
+ "The public verifier reconstructs Hx/Hz, checks CSS ranks and "
829
+ "commutation, validates the complete logical basis, and replays "
830
+ "the weight-16 upper witness. It cannot independently certify "
831
+ "the solver-derived lower bound without a portable proof trace."
832
+ ),
833
+ },
834
+ }
835
+ evidence["evidence_sha256"] = canonical_sha256(evidence, "evidence_sha256")
836
+
837
+ data_path = root / "data" / "stage3_typed_exact_fom_gt_12.jsonl"
838
+ evidence_path = root / "evidence" / "stage3_typed_exact_proofs.jsonl"
839
+ write_jsonl_one(data_path, record)
840
+ write_jsonl_one(evidence_path, evidence)
841
+
842
+ matrix_index = {
843
+ "schema_version": 1,
844
+ "record_kind": "stage3_typed_exact_matrix_index",
845
+ "candidate_id": CANDIDATE_ID,
846
+ "canonical_digest": CANONICAL_DIGEST,
847
+ "n": 210,
848
+ "k": 10,
849
+ "matrices": matrix_records,
850
+ }
851
+ matrix_index["record_sha256"] = canonical_sha256(
852
+ matrix_index, "record_sha256"
853
+ )
854
+ matrix_index_path = (
855
+ root / "evidence" / "stage3_typed_exact_matrix_index.jsonl"
856
+ )
857
+ write_jsonl_one(matrix_index_path, matrix_index)
858
+
859
+ release_files = [
860
+ "README.md",
861
+ "THIRD_PARTY_NOTICES.md",
862
+ "docs/REPRODUCE.md",
863
+ "docs/SCHEMA.md",
864
+ "data/stage3_typed_exact_fom_gt_12.jsonl",
865
+ "evidence/stage3_typed_exact_proofs.jsonl",
866
+ "evidence/stage3_typed_exact_matrix_index.jsonl",
867
+ *[matrix_records[name]["path"] for name in ("hx", "hz", "gx", "gz")],
868
+ "docs/STAGE3_TYPED_EXACT_FOM_GT_12.md",
869
+ "scripts/verify_dataset.py",
870
+ "scripts/verify_stage3_typed_exact_fom_gt_12.py",
871
+ "scripts/build_exact_fom_gt_12_release.py",
872
+ ]
873
+ manifest: dict[str, Any] = {
874
+ "schema_version": 1,
875
+ "gate": "qcode-public-stage3-typed-exact-fom-gt-12-v1",
876
+ "status": "STAGE3_TYPED_EXACT_PENDING_STRICT_GATE",
877
+ "source_status": "EXACT_PROVEN",
878
+ "release_status": "PENDING_STAGE4_STAGE5",
879
+ "certified_win": False,
880
+ "publication_certificate": False,
881
+ "created_date_utc": "2026-08-19",
882
+ "dataset_base_commit": HF_BASE_COMMIT,
883
+ "candidate": {
884
+ "candidate_id": CANDIDATE_ID,
885
+ "canonical_digest": CANONICAL_DIGEST,
886
+ "code": "[[210,10,16]]",
887
+ "exact_fom_numerator": 256,
888
+ "exact_fom_denominator": 21,
889
+ },
890
+ "authority": record["authority"],
891
+ "source": public_source,
892
+ "files": [],
893
+ }
894
+ for relative in release_files:
895
+ path = root / relative
896
+ item: dict[str, Any] = {
897
+ "path": relative,
898
+ "bytes": path.stat().st_size,
899
+ "sha256": sha256_file(path),
900
+ }
901
+ if relative.endswith(".jsonl"):
902
+ item["rows"] = len(
903
+ [line for line in path.read_text(encoding="utf-8").splitlines() if line]
904
+ )
905
+ manifest["files"].append(item)
906
+ manifest["manifest_sha256"] = canonical_sha256(manifest, "manifest_sha256")
907
+ manifest_path = root / "manifests" / "stage3_typed_exact_fom_gt_12.json"
908
+ manifest_path.write_text(
909
+ json.dumps(manifest, indent=2, sort_keys=True) + "\n",
910
+ encoding="utf-8",
911
+ )
912
+
913
+ sums_path = root / "manifests" / "SHA256SUMS"
914
+ existing_order = []
915
+ for line in sums_path.read_text(encoding="utf-8").splitlines():
916
+ if not line:
917
+ continue
918
+ _old, relative = line.split(" ", 1)
919
+ existing_order.append(relative)
920
+ additions = [
921
+ *release_files,
922
+ "manifests/stage3_typed_exact_fom_gt_12.json",
923
+ ]
924
+ order = existing_order + [item for item in additions if item not in existing_order]
925
+ sums_path.write_text(
926
+ "".join(f"{sha256_file(root / relative)} {relative}\n" for relative in order),
927
+ encoding="utf-8",
928
+ )
929
+ print(
930
+ json.dumps(
931
+ {
932
+ "candidate_id": CANDIDATE_ID,
933
+ "code": "[[210,10,16]]",
934
+ "fom": 256 / 21,
935
+ "record_sha256": record["record_sha256"],
936
+ "evidence_sha256": evidence["evidence_sha256"],
937
+ "manifest_sha256": manifest["manifest_sha256"],
938
+ },
939
+ sort_keys=True,
940
+ )
941
+ )
942
+
943
+
944
+ def main() -> None:
945
+ parser = argparse.ArgumentParser()
946
+ parser.add_argument("root", type=Path)
947
+ parser.add_argument("source_run", type=Path)
948
+ parser.add_argument("qcode_root", type=Path)
949
+ args = parser.parse_args()
950
+ build(args.root, args.source_run, args.qcode_root)
951
+
952
+
953
+ if __name__ == "__main__":
954
+ main()
scripts/verify_dataset.py CHANGED
@@ -1,6 +1,6 @@
1
  #!/usr/bin/env python3
2
  from __future__ import annotations
3
- import argparse, gzip, hashlib, json
4
  from pathlib import Path
5
 
6
  def sha(path):
@@ -86,6 +86,13 @@ def main(root):
86
  manifest=json.loads((root/"manifests/selection.json").read_text())
87
  assert manifest["selected_candidates"]==len(candidates)
88
  assert manifest["certified_fom_gt_12_count"]==sum(r["target"]["certified_win"] for r in candidates.values())
 
 
 
 
 
 
 
89
  print(f"PASS: {checked} file hashes, {len(candidates)} candidates, all matrices and witnesses verified")
90
 
91
  if __name__=="__main__":
 
1
  #!/usr/bin/env python3
2
  from __future__ import annotations
3
+ import argparse, gzip, hashlib, json, sys
4
  from pathlib import Path
5
 
6
  def sha(path):
 
86
  manifest=json.loads((root/"manifests/selection.json").read_text())
87
  assert manifest["selected_candidates"]==len(candidates)
88
  assert manifest["certified_fom_gt_12_count"]==sum(r["target"]["certified_win"] for r in candidates.values())
89
+ stage3_lane=root/"data/stage3_typed_exact_fom_gt_12.jsonl"
90
+ if stage3_lane.is_file():
91
+ scripts_dir=str(Path(__file__).resolve().parent)
92
+ if scripts_dir not in sys.path:
93
+ sys.path.insert(0,scripts_dir)
94
+ from verify_stage3_typed_exact_fom_gt_12 import verify as verify_stage3_lane
95
+ verify_stage3_lane(root)
96
  print(f"PASS: {checked} file hashes, {len(candidates)} candidates, all matrices and witnesses verified")
97
 
98
  if __name__=="__main__":
scripts/verify_stage3_typed_exact_fom_gt_12.py ADDED
@@ -0,0 +1,538 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Verify the public Stage-3-typed [[210,10,16]] release.
3
+
4
+ The portable checks reconstruct the twisted CSS matrices, validate the exact
5
+ solver instance matrix bundle and logical basis, and replay the weight-16 upper
6
+ witness. The DistQLDPC lower bound remains explicitly tied to the pinned
7
+ solver/runtime evidence; this script does not turn it into a DRAT/LRAT proof.
8
+ """
9
+
10
+ from __future__ import annotations
11
+
12
+ import gzip
13
+ import hashlib
14
+ import json
15
+ import sys
16
+ from pathlib import Path
17
+ from typing import Any
18
+
19
+
20
+ CANDIDATE_ID = "5f773fbfbce9775bc30b"
21
+ CANONICAL_DIGEST = (
22
+ "4ba2bcc894b883eb930bf727148c2f57bcf4963c903a940528613b2f542a607c"
23
+ )
24
+ QCODE_COMMIT = "ade9dc706a455427384e4ba82c0981d9cc9f6671"
25
+ HF_BASE_COMMIT = "3a24375d3494479c76ecd7c377c9b5d038f2561b"
26
+ EXPECTED_TYPED_CLAIM_SHA256 = (
27
+ "1a2a076a891a790a92359d903f7874f989d12a2f684518fd227923bbe7f0c2c9"
28
+ )
29
+ EXPECTED_TYPED_REQUEST_SHA256 = (
30
+ "ce20b44a85b000cf59b24fa4fa69196ccd596ba3d42c78ab325bad1fac99caad"
31
+ )
32
+ EXPECTED_TYPED_ARTIFACT_SHA256 = (
33
+ "ed3f639b3b7254566b248e3314dcca9aed82a8a91f0465a61d920571b2c9c6d3"
34
+ )
35
+ RAW_LOWER_EVIDENCE_SHA256 = (
36
+ "75ac260531dba3618c14fb459e86e2e8bfe39d205a1705da61d516528d0db581"
37
+ )
38
+ RESUMED_LOWER_EVIDENCE_SHA256 = (
39
+ "fb0bb3fc7b3dc6312952ad7ba9d324346ebd16db35e59e3b894ae3c0f70d489e"
40
+ )
41
+ RAW_UPPER_EVIDENCE_SHA256 = (
42
+ "8da3a1ee2523a0e7e4c4e21a627c8a780d8160cd09d9beb5130044cd8936fdbe"
43
+ )
44
+ RESUMED_UPPER_EVIDENCE_SHA256 = (
45
+ "d637b58008f17e1380fb1a3ed6f262b4183b7e19f4c420555d89df0c33340d5b"
46
+ )
47
+ KNOWN_ANSWER_GATE_SHA256 = (
48
+ "7adf6f4a93cb321fa0501cbb62723370cdbc3a85db7d9e2565cc086ea6a00687"
49
+ )
50
+ KNOWN_ANSWER_TRUST_SHA256 = (
51
+ "1e67120095a358bbcb2166a6804479655dc3bdd8b36c4d12bc56f73d5e741140"
52
+ )
53
+ REGISTRY_FILE_SHA256 = (
54
+ "265f1a3fefef884adeaa980a5dce2441dee4f6f6d71c253ba7a6491360733689"
55
+ )
56
+ REGISTRY_INTERNAL_SHA256 = (
57
+ "536c733d68d344ed9fef9992bbeb1000900174ad0c500ddb7004126ae5c98408"
58
+ )
59
+ EXPECTED_SOURCE_SHA256 = {
60
+ "stage3_aggregate_byte_sha256": "ee2965586cff334caf22d1c0b360127c22cca34c5136f58c88cdd150a5ffeefd",
61
+ "stage3_aggregate_self_seal_sha256": "fa03b3a2a8f43d77131c8a5491efbb56d98800d9e215b45e9e5b3e7f86509159",
62
+ "stage3_lower_terminal_byte_sha256": "9def4c1d0134165bbf3166382d8b07b361b816504e00e2473615fe9c45a26218",
63
+ "stage3_upper_terminal_byte_sha256": "f1fe9686eaac799ecf4583d48fe39858381b29e7a47844af5c447e6e21ebc86e",
64
+ "stage3_summary_byte_sha256": "4579c4472879e78da8a77b66e240b6e2ea66a1d47ca782f889247b3186b0a5ab",
65
+ "stage3_ranked_byte_sha256": "b8a0f2a7dd4191dd6d578addaec67cee60786104a748dd78203a822e196e3129",
66
+ "stage3_threshold_byte_sha256": "1c3a4bcf0a4598fc7c91236c01513f375746ba0d8c635d88630800be9f5bfcd6",
67
+ }
68
+ EXPECTED_PUBLIC_MATRICES = {
69
+ "hx": {
70
+ "content_sha256": "3e84de485357b46239174805f8fc3378eeb0e4207a06fc3a95568e5630c58c8e",
71
+ "file_sha256": "a8d53c3e14419e0b0c30e2960621394475e06d0cff30a6c1f0c9635c8f5bf9ea",
72
+ },
73
+ "hz": {
74
+ "content_sha256": "21b89580009d0ce19cab3c537ddc53c0211a962d88e4aaa1cf3b9a6752d502ab",
75
+ "file_sha256": "fae00c16429f8312a9a5f1c8e7f025431f986ac8dcc13a433887111f5503baa4",
76
+ },
77
+ }
78
+ DISTQLDPC_BINARY_SHA256 = (
79
+ "9e09c544d5151d872dc1037dcb1440509e27b8b485a7f9ea5a15d6e55b36d3fa"
80
+ )
81
+ DISTQLDPC_SOURCE_COMMIT = (
82
+ "c01fa93eb5e1e62948e4861e2c164a6b64fe88eb"
83
+ )
84
+
85
+
86
+ def sha256(path: Path) -> str:
87
+ digest = hashlib.sha256()
88
+ with path.open("rb") as handle:
89
+ for block in iter(lambda: handle.read(1 << 20), b""):
90
+ digest.update(block)
91
+ return digest.hexdigest()
92
+
93
+
94
+ def canonical_sha256(value: dict[str, Any], omitted: str) -> str:
95
+ payload = {key: item for key, item in value.items() if key != omitted}
96
+ encoded = json.dumps(
97
+ payload,
98
+ sort_keys=True,
99
+ separators=(",", ":"),
100
+ ensure_ascii=False,
101
+ allow_nan=False,
102
+ ).encode()
103
+ return hashlib.sha256(encoded).hexdigest()
104
+
105
+
106
+ def load_jsonl_one(path: Path) -> dict[str, Any]:
107
+ lines = [line for line in path.read_text(encoding="utf-8").splitlines() if line]
108
+ assert len(lines) == 1, (path, len(lines))
109
+ value = json.loads(lines[0])
110
+ assert isinstance(value, dict)
111
+ return value
112
+
113
+
114
+ def load_mtx(path: Path) -> list[list[int]]:
115
+ with gzip.open(path, "rt", encoding="ascii") as handle:
116
+ assert handle.readline().strip() == (
117
+ "%%MatrixMarket matrix coordinate integer general"
118
+ )
119
+ line = handle.readline()
120
+ while line.startswith("%"):
121
+ line = handle.readline()
122
+ rows, cols, nnz = map(int, line.split())
123
+ matrix = [[0] * cols for _ in range(rows)]
124
+ seen = 0
125
+ for line in handle:
126
+ if not line.strip():
127
+ continue
128
+ row, col, value = map(int, line.split())
129
+ assert value == 1
130
+ matrix[row - 1][col - 1] ^= 1
131
+ seen += 1
132
+ assert seen == nnz
133
+ return matrix
134
+
135
+
136
+ def gf2_rank(matrix: list[list[int]]) -> int:
137
+ rows = [
138
+ sum((value & 1) << col for col, value in enumerate(row))
139
+ for row in matrix
140
+ ]
141
+ rank = 0
142
+ while rows:
143
+ pivot = max(rows)
144
+ if not pivot:
145
+ break
146
+ bit = 1 << (pivot.bit_length() - 1)
147
+ rank += 1
148
+ rows = [
149
+ value ^ pivot if value & bit else value
150
+ for value in rows
151
+ if value != pivot
152
+ ]
153
+ return rank
154
+
155
+
156
+ def content_sha256(matrix: list[list[int]]) -> str:
157
+ shape = [len(matrix), len(matrix[0]) if matrix else 0]
158
+ header = json.dumps(
159
+ {"dtype": "uint8-gf2", "shape": shape},
160
+ sort_keys=True,
161
+ separators=(",", ":"),
162
+ )
163
+ raw = bytes(value & 1 for row in matrix for value in row)
164
+ return hashlib.sha256(header.encode() + b"\n" + raw).hexdigest()
165
+
166
+
167
+ def dist_array_sha256(name: str, matrix: list[list[int]]) -> str:
168
+ shape = [len(matrix), len(matrix[0]) if matrix else 0]
169
+ raw = bytes(value & 1 for row in matrix for value in row)
170
+ return hashlib.sha256(
171
+ name.encode()
172
+ + b"\0"
173
+ + json.dumps(shape, separators=(",", ":")).encode()
174
+ + b"\0"
175
+ + raw
176
+ ).hexdigest()
177
+
178
+
179
+ def transpose(matrix: list[list[int]]) -> list[list[int]]:
180
+ return [list(column) for column in zip(*matrix)]
181
+
182
+
183
+ def hstack(
184
+ left: list[list[int]], right: list[list[int]]
185
+ ) -> list[list[int]]:
186
+ return [a + b for a, b in zip(left, right)]
187
+
188
+
189
+ def parity(left: list[int], right: list[int]) -> int:
190
+ return sum(a & b for a, b in zip(left, right)) & 1
191
+
192
+
193
+ def twisted_polynomial_matrix(
194
+ ell: int,
195
+ m: int,
196
+ twist: int,
197
+ terms: list[list[int]],
198
+ ) -> list[list[int]]:
199
+ size = ell * m
200
+ matrix = [[0] * size for _ in range(size)]
201
+ for row in range(size):
202
+ x, y = divmod(row, m)
203
+ for dx, dy in terms:
204
+ wraps, reduced_x = divmod(x + dx, ell)
205
+ reduced_y = (y + dy - wraps * twist) % m
206
+ matrix[row][reduced_x * m + reduced_y] ^= 1
207
+ return matrix
208
+
209
+
210
+ def unpack_operator(record: dict[str, Any]) -> list[int]:
211
+ length = int(record["length"])
212
+ packed = bytes.fromhex(record["packed_hex"])
213
+ bits = [
214
+ (packed[index // 8] >> (index % 8)) & 1
215
+ for index in range(length)
216
+ ]
217
+ assert sum(bits) == record["weight"]
218
+ assert hashlib.sha256(f"{length}:".encode() + packed).hexdigest() == (
219
+ record["sha256"]
220
+ )
221
+ assert all(
222
+ not ((packed[index // 8] >> (index % 8)) & 1)
223
+ for index in range(length, len(packed) * 8)
224
+ )
225
+ return bits
226
+
227
+
228
+ def verify_no_operational_leak(value: Any, path: tuple[str, ...] = ()) -> None:
229
+ if isinstance(value, dict):
230
+ forbidden_keys = {
231
+ "command",
232
+ "command_flags",
233
+ "requested_path",
234
+ "resolved_path",
235
+ "progress_path",
236
+ "stdout",
237
+ "stderr",
238
+ "pid",
239
+ "pgid",
240
+ "session_id",
241
+ "environment",
242
+ }
243
+ assert not (set(value) & forbidden_keys), (path, set(value) & forbidden_keys)
244
+ for key, item in value.items():
245
+ verify_no_operational_leak(item, (*path, key))
246
+ elif isinstance(value, list):
247
+ for index, item in enumerate(value):
248
+ verify_no_operational_leak(item, (*path, str(index)))
249
+ elif isinstance(value, str):
250
+ assert "/root/" not in value and "/tmp/" not in value, (path, value)
251
+
252
+
253
+ def verify(root: Path) -> None:
254
+ root = root.resolve()
255
+ data = load_jsonl_one(root / "data/stage3_typed_exact_fom_gt_12.jsonl")
256
+ evidence = load_jsonl_one(root / "evidence/stage3_typed_exact_proofs.jsonl")
257
+ matrix_index = load_jsonl_one(
258
+ root / "evidence/stage3_typed_exact_matrix_index.jsonl"
259
+ )
260
+ manifest = json.loads(
261
+ (root / "manifests/stage3_typed_exact_fom_gt_12.json").read_text(
262
+ encoding="utf-8"
263
+ )
264
+ )
265
+
266
+ assert canonical_sha256(data, "record_sha256") == data["record_sha256"]
267
+ assert canonical_sha256(evidence, "evidence_sha256") == evidence["evidence_sha256"]
268
+ assert canonical_sha256(matrix_index, "record_sha256") == matrix_index["record_sha256"]
269
+ assert canonical_sha256(manifest, "manifest_sha256") == manifest["manifest_sha256"]
270
+ for item in manifest["files"]:
271
+ path = root / item["path"]
272
+ assert path.stat().st_size == item["bytes"]
273
+ assert sha256(path) == item["sha256"]
274
+ if "rows" in item:
275
+ rows = len(
276
+ [line for line in path.read_text(encoding="utf-8").splitlines() if line]
277
+ )
278
+ assert rows == item["rows"]
279
+
280
+ assert data["candidate_id"] == evidence["candidate_id"] == CANDIDATE_ID
281
+ assert matrix_index["candidate_id"] == CANDIDATE_ID
282
+ assert data["canonical_digest"] == evidence["canonical_digest"] == CANONICAL_DIGEST
283
+ assert matrix_index["canonical_digest"] == CANONICAL_DIGEST
284
+ assert data["evidence_class"] == evidence["evidence_class"] == (
285
+ "STAGE3_TYPED_EXACT_PENDING_STRICT_GATE"
286
+ )
287
+ assert data["release_status"] == "PENDING_STAGE4_STAGE5"
288
+ authority = data["authority"]
289
+ assert authority["stage3_typed_handoff_replay"] is True
290
+ assert authority["exact_under_pinned_solver_trust_model"] is True
291
+ assert authority["pipeline_stage4_certificate"] is False
292
+ assert authority["pipeline_stage5_final_gate"] is False
293
+ assert authority["independent_release_gate_complete"] is False
294
+ assert authority["portable_unsat_proof_certificate"] is False
295
+ assert data["target"]["certified_win"] is False
296
+ assert data["source_target"]["mode"] == "scalar-fom-inclusive-v1"
297
+ assert data["source_target"]["strict"] is False
298
+ assert data["record_kind"] == "stage3_typed_exact_fom_gt_12"
299
+ assert evidence["record_kind"] == "stage3_typed_exact_fom_gt_12_evidence"
300
+ assert matrix_index["record_kind"] == "stage3_typed_exact_matrix_index"
301
+ assert data["source_status"] == evidence["source_status"] == "EXACT_PROVEN"
302
+ assert data["release_status"] == evidence["release_status"] == (
303
+ "PENDING_STAGE4_STAGE5"
304
+ )
305
+ assert manifest["schema_version"] == 1
306
+ assert manifest["gate"] == "qcode-public-stage3-typed-exact-fom-gt-12-v1"
307
+ assert manifest["status"] == "STAGE3_TYPED_EXACT_PENDING_STRICT_GATE"
308
+ assert manifest["source_status"] == "EXACT_PROVEN"
309
+ assert manifest["release_status"] == "PENDING_STAGE4_STAGE5"
310
+ assert manifest["certified_win"] is False
311
+ assert manifest["publication_certificate"] is False
312
+ assert manifest["dataset_base_commit"] == HF_BASE_COMMIT
313
+ expected_authority = {
314
+ "stage3_typed_handoff_replay": True,
315
+ "exact_under_pinned_solver_trust_model": True,
316
+ "pipeline_stage4_certificate": False,
317
+ "portable_unsat_proof_certificate": False,
318
+ "pipeline_stage5_final_gate": False,
319
+ "pipeline_promotion": False,
320
+ "independent_release_gate_complete": False,
321
+ "publication_certificate": False,
322
+ "public_dataset_record": True,
323
+ }
324
+ assert authority == expected_authority
325
+ assert evidence["authority"] == manifest["authority"] == expected_authority
326
+
327
+ source = data["source"]
328
+ assert source == manifest["source"]
329
+ for key, expected in EXPECTED_SOURCE_SHA256.items():
330
+ assert source[key] == expected
331
+ assert source["qcode_commit"] == QCODE_COMMIT
332
+ assert source["stage3_typed_request_artifact_sha256"] == (
333
+ EXPECTED_TYPED_ARTIFACT_SHA256
334
+ )
335
+ assert source["stage3_typed_claim_sha256"] == EXPECTED_TYPED_CLAIM_SHA256
336
+ assert source["stage3_typed_request_sha256"] == EXPECTED_TYPED_REQUEST_SHA256
337
+ assert source["stage3_lower_raw_terminal_evidence_sha256"] == (
338
+ RAW_LOWER_EVIDENCE_SHA256
339
+ )
340
+ assert source["stage3_lower_resumed_evidence_sha256"] == (
341
+ RESUMED_LOWER_EVIDENCE_SHA256
342
+ )
343
+ assert source["stage3_upper_raw_terminal_evidence_sha256"] == (
344
+ RAW_UPPER_EVIDENCE_SHA256
345
+ )
346
+ assert source["stage3_upper_resumed_evidence_sha256"] == (
347
+ RESUMED_UPPER_EVIDENCE_SHA256
348
+ )
349
+ assert source["known_answer_gate_sha256"] == KNOWN_ANSWER_GATE_SHA256
350
+ assert source["known_answer_trust_sha256"] == KNOWN_ANSWER_TRUST_SHA256
351
+ assert data["known_answer_context"] == {
352
+ "gate_file_sha256": KNOWN_ANSWER_GATE_SHA256,
353
+ "trust_file_sha256": KNOWN_ANSWER_TRUST_SHA256,
354
+ "release_replayed": False,
355
+ }
356
+ assert data["novelty"]["registry_file_sha256"] == REGISTRY_FILE_SHA256
357
+ assert data["novelty"]["registry_internal_sha256"] == REGISTRY_INTERNAL_SHA256
358
+ assert data["novelty"]["source_stage3_replayed"] is True
359
+ assert data["novelty"]["release_current_registry_replayed"] is False
360
+
361
+ construction = data["construction"]
362
+ key_payload = {
363
+ "ell": construction["ell"],
364
+ "m": construction["m"],
365
+ "A_terms": sorted(construction["A_terms"]),
366
+ "B_terms": sorted(construction["B_terms"]),
367
+ "geometry": construction["geometry"],
368
+ }
369
+ encoded = json.dumps(key_payload, sort_keys=True, separators=(",", ":"))
370
+ assert hashlib.sha256(encoded.encode()).hexdigest()[:20] == CANDIDATE_ID
371
+
372
+ ell, m = construction["ell"], construction["m"]
373
+ twist = construction["geometry"]["twist"]
374
+ a_matrix = twisted_polynomial_matrix(ell, m, twist, construction["A_terms"])
375
+ b_matrix = twisted_polynomial_matrix(ell, m, twist, construction["B_terms"])
376
+ expected_hx = hstack(a_matrix, b_matrix)
377
+ expected_hz = hstack(transpose(b_matrix), transpose(a_matrix))
378
+
379
+ matrices = {
380
+ name: load_mtx(root / data["matrices"][name.lower()]["path"])
381
+ for name in ("Hx", "Hz", "Gx", "Gz")
382
+ }
383
+ assert matrices["Hx"] == expected_hx
384
+ assert matrices["Hz"] == expected_hz
385
+ assert data["matrices"] == matrix_index["matrices"]
386
+ for name, matrix in matrices.items():
387
+ record = data["matrices"][name.lower()]
388
+ path = root / record["path"]
389
+ assert [len(matrix), len(matrix[0])] == record["shape"]
390
+ assert sha256(path) == record["file_sha256"]
391
+ assert content_sha256(matrix) == record["content_sha256"]
392
+ for name, expected in EXPECTED_PUBLIC_MATRICES.items():
393
+ assert {
394
+ "content_sha256": data["matrices"][name]["content_sha256"],
395
+ "file_sha256": data["matrices"][name]["file_sha256"],
396
+ } == expected
397
+
398
+ hx, hz, gx, gz = (
399
+ matrices["Hx"], matrices["Hz"], matrices["Gx"], matrices["Gz"]
400
+ )
401
+ rank_x, rank_z = gf2_rank(hx), gf2_rank(hz)
402
+ checks = data["matrix_checks"]
403
+ assert rank_x == checks["rank_x"] == 100
404
+ assert rank_z == checks["rank_z"] == 100
405
+ assert 210 - rank_x - rank_z == checks["k_recomputed"] == 10
406
+ assert all(parity(x_row, z_row) == 0 for x_row in hx for z_row in hz)
407
+ assert all(parity(x_row, logical) == 0 for x_row in hx for logical in gx)
408
+ assert all(parity(z_row, logical) == 0 for z_row in hz for logical in gz)
409
+ duality = [[parity(x_logical, z_logical) for z_logical in gx] for x_logical in gz]
410
+ assert duality == [
411
+ [int(row == column) for column in range(10)] for row in range(10)
412
+ ]
413
+ assert gf2_rank(hx + gz) == 110
414
+ assert gf2_rank(hz + gx) == 110
415
+ assert max(map(sum, hx + hz)) == checks["max_check_weight"] == 6
416
+ assert max(
417
+ max(sum(row[column] for row in hx) for column in range(210)),
418
+ max(sum(row[column] for row in hz) for column in range(210)),
419
+ ) == checks["max_sector_qubit_degree"] == 3
420
+ assert max(
421
+ sum(row[column] for row in hx + hz) for column in range(210)
422
+ ) == checks["max_qubit_degree"] == 6
423
+
424
+ lower = evidence["lower_bound_evidence"]
425
+ assert lower["outcome"] == "exact"
426
+ assert lower["exact_distance"] == lower["lower_bound"] == lower["upper_bound"] == 16
427
+ assert lower["threshold_infeasible"] is True
428
+ assert lower["decision_complete"] is True
429
+ assert lower["retryable"] is False
430
+ assert lower["returncode"] == 0 and lower["timed_out"] is False
431
+ assert lower["cardinality_mode"] == "mto"
432
+ assert lower["parsed_output"]["d"] == 16
433
+ assert lower["parsed_output"]["d_lb"] == 16
434
+ assert lower["parsed_output"]["d_ub"] == 16
435
+ assert lower["parsed_output"]["o"] == 16
436
+ assert lower["backend"]["binary_sha256"] == DISTQLDPC_BINARY_SHA256
437
+ assert lower["backend"]["source_commit"] == DISTQLDPC_SOURCE_COMMIT
438
+ assert lower["raw_terminal_replay_verified"] is True
439
+ assert lower["raw_terminal_evidence_sha256"] == RAW_LOWER_EVIDENCE_SHA256
440
+ assert lower["aggregate_resumed_evidence_sha256"] == (
441
+ RESUMED_LOWER_EVIDENCE_SHA256
442
+ )
443
+ assert lower["instance_binding_sha256"] == (
444
+ "3cb72f08d8d681df64c3cee531df620a251c7fb34872274868b348a247dfd992"
445
+ )
446
+ assert lower["runtime_source"] == {
447
+ "adapter": {
448
+ "module": "evaluation.distance_distqldpc",
449
+ "sha256": "9077ad558b4205a9ee84a1300ee7ee83a5a959fa55e1670441a1e7529eeda574",
450
+ },
451
+ "identity_sha256": "9059539f43f6134b26f6cda4e94bca45ec8b7f5d262f1082cee47bbe014293ce",
452
+ "protocol": "qcode-distqldpc-supervisor-v1",
453
+ "supervisor": {
454
+ "module": "evaluation.distqldpc_supervisor",
455
+ "sha256": "fd6ed1198831aa1208932daf974faa11348e98c9c98ec26c8c39bfbe8ae833b8",
456
+ },
457
+ }
458
+ assert lower["checkpoint_identity"]["cardinality_mode"] == "mto"
459
+ assert lower["checkpoint_identity"]["candidate_digest"] == CANONICAL_DIGEST
460
+ for name, matrix in matrices.items():
461
+ assert dist_array_sha256(name, matrix) == (
462
+ lower["solver_instance_array_sha256"][name]
463
+ )
464
+
465
+ upper = evidence["upper_bound_evidence"]
466
+ assert upper["outcome"] == "sat" and upper["sector"] == "X"
467
+ assert upper["objective"] == 16 and upper["decision_complete"] is True
468
+ assert upper["retryable"] is False
469
+ operator = unpack_operator(upper["operator"])
470
+ assert sum(operator) == 16
471
+ assert all(parity(check, operator) == 0 for check in hz)
472
+ syndrome = [parity(logical, operator) for logical in gx]
473
+ assert syndrome == upper["logical_syndrome"] and any(syndrome)
474
+ assert gf2_rank(hx + [operator]) == rank_x + 1
475
+ assert upper["anchor_indices"] == [0, 105]
476
+ assert any(operator[index] for index in upper["anchor_indices"])
477
+ assert upper["raw_terminal_evidence_sha256"] == RAW_UPPER_EVIDENCE_SHA256
478
+ assert upper["aggregate_resumed_evidence_sha256"] == (
479
+ RESUMED_UPPER_EVIDENCE_SHA256
480
+ )
481
+ assert upper["instance_binding_sha256"] == (
482
+ "ce40d444e02bfe900f38d29ebe4bc72d2ed0b7241039c21d3a016cbaa47caba7"
483
+ )
484
+ assert upper["operator"]["sha256"] == (
485
+ "ff3b54a8cfd0857a27a12dda5d602405175f8b01c21687b97475861ad7503a77"
486
+ )
487
+
488
+ n, k, distance = 210, 10, 16
489
+ assert data["parameters"] == {"n": n, "k": k}
490
+ assert data["distance"]["exact"] == distance
491
+ assert data["distance"]["lower_bound"] == distance
492
+ assert data["distance"]["upper_bound"] == distance
493
+ assert k * distance * distance == 2560 > 12 * n == 2520
494
+ assert data["fom"]["exact"]["numerator"] == 256
495
+ assert data["fom"]["exact"]["denominator"] == 21
496
+ assert abs(data["fom"]["exact"]["decimal"] - 256 / 21) < 1e-15
497
+ assert data["fom"]["strict_integer_margin"] == 40
498
+
499
+ handoff = evidence["stage3_typed_handoff"]
500
+ assert handoff["status"] == "EXACT_PROVEN"
501
+ assert handoff["backend"] == "distqldpc"
502
+ assert handoff["lower_bound_threshold"] == 15
503
+ assert handoff["completed_proof_units"] == 2
504
+ assert handoff["expected_proof_units"] == 27
505
+ assert handoff["distqldpc_exact_distances"] == [16]
506
+ assert handoff["distqldpc_conflict"] is False
507
+ assert handoff["low_witnesses"] == []
508
+ assert handoff["qcode_commit"] == QCODE_COMMIT
509
+ assert handoff["typed_replay_verified"] is True
510
+ assert handoff["attempted_proof_units"] == 23
511
+ assert handoff["completed_proof_units"] == 2
512
+ assert handoff["expected_proof_units"] == 27
513
+ assert handoff["source_retryable_units_at_terminal"] == 21
514
+ assert handoff["summary_retry_required"] is False
515
+ assert handoff["terminal_reason"] == "distqldpc_exact_plus_upper_witness"
516
+ assert handoff["distqldpc_conflict_details"] is None
517
+ for key, expected in source.items():
518
+ assert handoff[key] == expected
519
+ assert evidence["symmetry"]["translation_verified"] is True
520
+ assert evidence["symmetry"]["orbit_representatives"] == [0, 105]
521
+ assert evidence["symmetry"]["xz_sector_isometry_verified"] is True
522
+ assert evidence["symmetry"]["xz_sector_isometry_sha256"] == (
523
+ "6662b328e912918c26a36bb68d3279302329b9dd063952cc8ad8367f3358a4c5"
524
+ )
525
+ assert evidence["symmetry"]["covered_sectors"] == ["X", "Z"]
526
+
527
+ verify_no_operational_leak(data)
528
+ verify_no_operational_leak(evidence)
529
+ verify_no_operational_leak(matrix_index)
530
+ print(
531
+ "PASS: Stage 3 typed [[210,10,16]], FOM=256/21; matrices, logical "
532
+ "basis, hashes, and upper witness verified. Lower bound remains tied "
533
+ "to the pinned DistQLDPC/MaxCDCL trust model."
534
+ )
535
+
536
+
537
+ if __name__ == "__main__":
538
+ verify(Path(sys.argv[1]) if len(sys.argv) > 1 else Path("."))