Skip to content

CC engine: erasure bound (GH-195, opt-in token erasure) - #219

Merged
guluchen merged 11 commits into
mainfrom
experiment/gh-195-cc-erasure
Nov 4, 2026
Merged

guluchen merged 11 commits into
mainfrom
experiment/gh-195-cc-erasure

Conversation

@guluchen

@guluchen guluchen commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

Issue #195 (hub #15). Opt-in CC rule erasure (-cc-rules=...,erasure, needs pack) plus -cc-erasure-start=N (default 16384). Default output is byte-identical with the token off.

Base: main 134d756 (merged; solver as of 02879a9). Measured binary 8667bc0 (solver sources identical to the head). Records: optimization/experiments/GH-195/REPORT.md (main 02879a9 results under main02879/, the earlier PR #180-based runs kept as the old-base records).

Rule

At a node S whose packing scan found disjoint odd rows (rows of H, or GH-181 redundant rows) with free candidate sets R_1..R_p, let R be their union and extra = (w - |S|) - p. If extra <= 2 (and |R| <= 128), the node is cut unless some y in R and z (at most extra free qubits outside R) give H(S + y + z) = 0 and G(S + y + z) != 0. Decided by peeling + dense elimination of the region with exact back-substitution (phi H_R = 0 with 64 random lanes, F H_R = G_R with full-width labels), then single/pair lookups (pair table built lazily). Tests start at the level after the first level of the half with >= N nodes; with -cc-roworder=auto the probe runs the other configuration with the current erasure state.

Soundness (MODIFICATIONS.md, GH-195): every other rule keeps a fixed weight-w target e* with S in e* and e* disjoint from the forbidden set (excl, orbf, overlap, tiebreak Lemmas A-C, xorunit forbids). Each packed row is odd in syn(S) and even in syn(e*), so it holds a free qubit of e* \ S in its own R_i; at most extra qubits of e* \ S lie outside R, so e* solves the relaxation. Fingerprint collisions only stop a cut; labels are exact; gates are cost-only.

Credit: the erasure bound idea is from Qubitserf 04b9349 (S. Cercelescu, MIT); clean-room implementation (NOTICE, MODIFICATIONS.md).

Tier 0

  • make test-cc PASS: new Part U, 259 200 ladders over rule subsets with pack,erasure (charge, bfs order and [Mac agent] CC engine: redundant sparse checks and XOR unit propagation #181 tokens mixed in), 0 bad; mutants 25 (bound weakened by one) 1370/9600 and 26 (fixed support ignored) 2204/9600 ladders wrong. Parts B/H erasure driver configurations (incl. -cc-roworder=auto) 0 bad.
  • make test-cc-flags PASS (566 checks).
  • Answers: 253 runs (23 tier0-3 codes x 11 erasure variants) all equal to the stem; 145 witnesses GF(2)-verified, 0 bad.
  • Byte identity with the token off vs main 02879a9 (default, and with tiebreak -cc-roworder=auto): identical (one MaxSAT ub-pre timing line, reproduced base-vs-base).

Tiers 1-4 (5 seeds, medians; yfclab2 CPUs 120-127)

Arms: def = main 02879a9 CC default; defer = +erasure; tbra = +tiebreak, -cc-roworder=auto; tbraer = tbra + erasure.
(a) def -> defer: PASS in all tiers. (b) tbra -> tbraer: Tiers 2-4 PASS; Tier 1 geomean 1.000 because the rule never reaches its start level on LP_340 / LP_442 (0 tests, identical nodes).

(a) main default -> +erasure

Tier Code def wall median (range) s defer wall median (range) s wall ratio nodes ratio (median) search-time ratio (median) defer erasure calls / prunes (median) answers
1 LP_340_56_8 0.022 (0.021-0.022) 0.021 (0.020-0.022) 0.955 1.000 0.996 0 / 0 8
1 LP_442_68_10 0.025 (0.024-0.033) 0.026 (0.024-0.033) 1.040 1.000 1.020 0 / 0 10
2 BB_144_14_14 0.748 (0.728-0.913) 0.255 (0.254-0.316) 0.341 0.085 0.320 30075 / 30068 14
2 BB_288_12_18 0.469 (0.449-0.489) 0.267 (0.256-0.278) 0.569 0.162 0.537 31943 / 31943 18
2 GB_144_12_12 0.085 (0.075-0.093) 0.053 (0.042-0.086) 0.624 0.268 0.448 2181 / 2181 12
2 LP_544_80_12 0.047 (0.045-0.058) 0.046 (0.043-0.059) 0.979 1.000 1.016 0 / 0 12
2 TN_108_2_12 2.048 (0.918-2.682) 0.749 (0.405-0.869) 0.366 0.071 0.353 130018 / 129744 12
2 TN_200_10_10 0.193 (0.145-0.214) 0.134 (0.104-0.134) 0.694 0.363 0.604 10464 / 10463 10
3 LP_714_100_16 0.462 (0.304-0.504) 0.343 (0.240-0.391) 0.742 0.065 0.732 34151 / 34137 16
3 TN_144_2_13 5.564 (1.900-7.133) 1.770 (0.870-2.398) 0.318 0.056 0.334 251582 / 251580 13
4 TN_250_10_15 65.453 (35.272-66.635) 28.286 (18.284-28.487) 0.432 0.047 0.432 4317073 / 4317069 15
Tier cells geomean wall ratio max cell cells > 1.25 verdict
1 2 0.996 1.040 0 PASS
2 6 0.558 0.979 0 PASS
3 2 0.486 0.742 0 PASS
4 1 0.432 0.432 0 PASS

(b) main default + tiebreak + roworder auto -> + erasure

Tier Code tbra wall median (range) s tbraer wall median (range) s wall ratio nodes ratio (median) search-time ratio (median) tbraer erasure calls / prunes (median) answers
1 LP_340_56_8 0.021 (0.021-0.022) 0.021 (0.021-0.022) 1.000 1.000 1.043 0 / 0 8
1 LP_442_68_10 0.033 (0.025-0.034) 0.033 (0.032-0.034) 1.000 1.000 1.067 0 / 0 10
2 BB_144_14_14 0.628 (0.618-0.772) 0.255 (0.244-0.296) 0.406 0.127 0.435 28492 / 28485 14
2 BB_288_12_18 0.348 (0.328-0.367) 0.208 (0.197-0.227) 0.598 0.184 0.553 24237 / 24237 18
2 GB_144_12_12 0.090 (0.084-0.093) 0.054 (0.053-0.084) 0.600 0.272 0.461 2097 / 2097 12
2 LP_544_80_12 0.046 (0.045-0.048) 0.045 (0.045-0.056) 0.978 1.000 0.979 0 / 0 12
2 TN_108_2_12 1.494 (1.059-1.555) 0.758 (0.417-0.879) 0.507 0.125 0.601 130018 / 129744 12
2 TN_200_10_10 0.195 (0.142-0.213) 0.135 (0.101-0.136) 0.692 0.367 0.612 10245 / 10244 10
3 LP_714_100_16 0.461 (0.311-0.512) 0.350 (0.251-0.391) 0.759 0.164 0.727 29869 / 29855 16
3 TN_144_2_13 3.370 (2.292-3.753) 1.599 (0.991-1.842) 0.474 0.084 0.458 167253 / 167244 13
4 TN_250_10_15 28.708 (21.378-30.514) 13.879 (10.434-16.071) 0.483 0.037 0.507 2061766 / 2061755 15
Tier cells geomean wall ratio max cell cells > 1.25 verdict
1 2 1.000 1.000 0 FAIL
2 6 0.607 0.978 0 PASS
3 2 0.600 0.759 0 PASS
4 1 0.483 0.483 0 PASS

220 runs, science problems: []
OVERALL FAIL

Tier 5 (6 h)

Solved codes 0.44-0.83x (no solved code slower: PASS). Unsolved: TN codes 0.61-0.67x to the baseline's final lb; BB_756 / BB_1080 1.03-1.04x. No new lower bound (TN_496 lb 25 and TN_360 lb 23 are at or below the stems).

def -> defer

Code def defer time to the def final value s (ratio) largest level done by both: nodes (ratio), level s (ratio)
BB_360_12_24 d=24 @ 190 s d=24 @ 110 s 190 -> 110 (0.581) 22 (X -> X): 633.1M -> 24.5M (0.039), 170 -> 98 (0.576)
TN_180_2_17 d=17 @ 156 s d=17 @ 69 s 156 -> 69 (0.442) 16 (X+Z -> X+Z): 188.6M -> 10.3M (0.054), 107 -> 49 (0.454)
TN_216_4_18 d=18 @ 470 s d=18 @ 236 s 470 -> 236 (0.501) 17 (X+Z -> X+Z): 585.0M -> 34.7M (0.059), 330 -> 164 (0.499)
TN_252_2_21 d=21 @ 8568 s d=21 @ 4514 s 8568 -> 4514 (0.527) 20 (X+Z -> X+Z): 9076.2M -> 497.8M (0.055), 6181 -> 3243 (0.525)
TN_360_4_23to24 TIMEOUT lb 22 TIMEOUT lb 23 7521 -> 5016 (0.667) 22 (X -> X+Z): 11413.2M -> 1518.3M (0.133), 8096 -> 11030 (1.362)

geomean time to the baseline final value 0.538 (5 codes)

tbra -> tbraer

Code tbra tbraer time to the tbra final value s (ratio) largest level done by both: nodes (ratio), level s (ratio)
BB_360_12_24 d=24 @ 32 s d=24 @ 26 s 32 -> 26 (0.827) 22 (X -> X): 83.4M -> 5.3M (0.063), 27 -> 22 (0.834)
BB_756_16_32to34 TIMEOUT lb 32 TIMEOUT lb 32 12616 -> 12979 (1.029) 30 (X -> X): 25055.6M -> 1853.8M (0.074), 10478 -> 10760 (1.027)
BB_1080_4_32to48 TIMEOUT lb 32 TIMEOUT lb 32 8499 -> 8833 (1.039) 30 (X -> X): 16674.8M -> 1297.4M (0.078), 6986 -> 7270 (1.041)
TN_180_2_17 d=17 @ 151 s d=17 @ 69 s 151 -> 69 (0.461) 16 (X+Z -> X+Z): 188.6M -> 10.3M (0.054), 108 -> 49 (0.450)
TN_216_4_18 d=18 @ 395 s d=18 @ 210 s 395 -> 210 (0.532) 17 (X+Z -> X+Z): 437.0M -> 27.5M (0.063), 273 -> 145 (0.530)
TN_252_2_21 d=21 @ 8587 s d=21 @ 4520 s 8587 -> 4520 (0.526) 20 (X+Z -> X+Z): 9076.2M -> 497.8M (0.055), 6193 -> 3237 (0.523)
TN_288_2_22to24 TIMEOUT lb 22 TIMEOUT lb 22 16183 -> 9795 (0.605) 21 (X+Z -> X+Z): 16726.9M -> 998.1M (0.060), 11354 -> 6918 (0.609)
TN_496_2_27to30 TIMEOUT lb 24 TIMEOUT lb 25 10481 -> 6942 (0.662) 23 (X -> X): 17317.6M -> 667.4M (0.039), 6912 -> 4512 (0.653)

geomean time to the baseline final value 0.680 (8 codes)

Bound events (lb value@seconds, from 18)

Code def defer tbra tbraer
BB_360_12_24 18@0 20@2 22@20 24@190 18@0 20@1 22@13 24@110 18@0 20@1 22@5 24@32 18@0 20@1 22@4 24@26
BB_756_16_32to34 - - 18@0 20@1 22@3 24@12 26@65 28@366 30@2138 32@12616 32@21600 18@0 20@1 22@3 24@13 26@71 28@389 30@2219 32@12979 32@21600
BB_1080_4_32to48 - - 18@0 20@1 22@3 24@10 26@49 28@270 30@1512 32@8499 32@21600 18@0 20@1 22@2 24@10 26@53 28@281 30@1564 32@8833 32@21600
TN_180_2_17
TN_216_4_18 18@470 18@236 18@395 18@210
TN_252_2_21 18@192 19@676 20@2387 21@8568 18@110 19@374 20@1271 21@4514 18@194 19@674 20@2394 21@8587 18@110 19@375 20@1283 21@4520
TN_288_2_22to24 - - 18@127 19@420 20@1420 21@4829 22@16183 22@21600 18@83 19@263 20@863 21@2877 22@9795 22@21600
TN_360_4_23to24 18@69 19@216 20@695 21@2269 22@7521 22@21600 18@51 19@154 20@485 21@1548 22@5016 23@16046 23@21600 - -
TN_496_2_27to30 - - 18@17 19@48 20@138 21@403 22@1221 23@3569 24@10481 24@21600 18@13 19@37 20@101 21@287 22@852 23@2430 24@6942 25@20291 25@21600

science problems: []
TIER5 PASS (no solved code more than 1.2x slower)

🤖 Generated with Claude Code

yfc and others added 11 commits October 30, 2026 03:29
…, opt-in

-cc-rules token erasure (default off; needs pack): at a node whose disjoint
odd-row packing leaves extra = (w - |S|) - p <= 2 added qubits uncharged,
the node is cut when no completion S + y + z (y in the packed rows' free
candidates, z at most extra further free qubits) is syndrome-free and
detected. Decided by peeling + dense elimination of the region with exact
back-substitution (phi H_R = 0, F H_R = G_R); fingerprint collisions only
make the rule give up. Idea from Qubitserf 04b9349 (S. Cercelescu, MIT),
re-derived for our search state; clean-room code. Test Part R (own RNG
stream), mutants 22/23, flag checks; runner scripts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…erf 04b9349, S. Cercelescu, MIT)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ts by scan)

Tier 1 panel: LP_442 paid ~10 ms for the eager pair table (wall 1.44x on a
25 ms run). Node counts unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…c-erasure-start=N, default 16384)

A test costs microseconds; on the Tier 1 LP codes (6-30k nodes in total)
it cost 1-3 ms on 25 ms runs. Deterministic (node counts), sound for any
per-node choice. Driver tests use N = 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y; gate exploration; Tier 1-4 panel)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rse rules, stem renames) into GH-195

The erasure rule is ported onto the new search: packed redundant rows
(GH-181 sparse) contribute their free candidates to the region, the test
runs after the charge check, mutants renumbered 25/26 (22-24 are GH-181's),
test Part U (argv[8]) adds charge, bfs and GH-181 tokens, driver
configurations with -cc-roworder=auto.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… current erasure state

The probe compared A with erasure against B before B's own start level
(B had no erasure tests yet), which steered BB_360 to the index order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…entity; Tier 1-4 panel) and the old-base Tier 5

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…port

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-195

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@guluchen
guluchen merged commit 86d1d59 into main Nov 4, 2026
3 checks passed
guluchen pushed a commit that referenced this pull request Nov 4, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	MODIFICATIONS.md
#	README.md
#	src/cc/cc_half.h
#	src/core/distqldpc.cc
#	tests/test_cc_flags.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant