Repository navigation
Remove local tables - #191
Closed
sumeetshirgure wants to merge 10 commits into
Closed
sumeetshirgure wants to merge 10 commits into
sumeetshirgure wants to merge 10 commits into
Conversation
…ual state fastgap runs the ordinary PyMatching sparse-blossom decode and returns, per shot, a certified lower bound on the complementary gap computed from the decoder's own final dual state (no second decode, no volume sweep), following CLAUDE.md. - C++ core in src/pymatching/fastgap/: gauge canonicalisation of the observable onto the boundary, dual-state extraction before shattering, GapIndex (boundary and landmark potentials, exact local tables, save/load), dense priced search, optional upper bound and diagnostics, exact two-decode and brute-force baselines. - Python package src/fastgap/: GapIndex, GapDecoder, exact_gap_batch, pluggable landmark strategies, and the bench / build-index / landmark-report CLI. - Only upstream source edit: two declarations in driver/mwpm_decoding.h. - Tests: C++ GoogleTest next to each source; tests/fastgap covers the CLAUDE.md §9 plan (10^5-shot soundness on rotated surface codes d=3..17, upstream parity, index round-trip). - Benchmarks and raw per-shot CSVs in benchmarks/fastgap/; notes in NOTES.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add fastgap: certified complementary-gap lower bounds from the MWPM dual state
`fastgap bench --threads` now accepts several thread counts and records each one under `throughput.by_threads` in the summary JSON (wall time, us/shot, core-seconds/shot, speedup). The benchmark config measures T=4 and T=10, and all six rotated-memory results were re-run. Soundness violations: 0 on every DEM; non-timing CSV columns are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Benchmark throughput at T=4 and T=10 threads
…act baseline Intra-shot parallelism replaces shot-level parallelism. GapDecoder(num_threads=T) decodes shots one after another; the calling thread runs the dense Dijkstra while T-1 threads (a spinning SpinTeam) prefetch price rows for the states it is about to settle. Rows are deterministic and ties are broken by (iteration, defect index), so results are bit-identical for every T. Shared rows are int32 saturated at d_LR + 1, which is exact since the answer is at most d_LR. The search also stores labels per hop target, making relaxation a contiguous branch-free pass with a fused argmin. d=17, p=1e-3 gap stage: 29.5 -> 18.9 us (T=1), 11.9 us (T=4). Benchmarks are latency-only: T=1 and T=4, 2e4 shots per DEM. The exact baseline times its two decodes separately, and the summaries report gap-only speed-ups (baseline complementary-class decode / fastgap gap stage): 9-29x at T=1, up to 45x at T=4. README gets an overview and the table. Soundness: 0 violations; all C++ and Python tests pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Intra-shot parallel gap search; gap-only latency vs the exact baseline
Update README.
The index now stores only the boundary and landmark potentials, and d_hat(u, v) = LB(u, v). The table radius parameter, the table arrays and the --table-radius CLI flag are gone, and the index file format moves to version 2. Tests that exercised the tables now check that d_hat is a lower bound, and that making every node a landmark reproduces exact pricing. Soundness tests are unchanged and pass. Adds GapIndexCore.dual_state(events), which exposes one shot's final dual state for figures. Benchmarks were re-run without gap_ub, with d=15, p=1e-3 added (0 soundness violations). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.