Add a randomized upper bound on code distance reusing the DEM sampler core - #525
Merged
Conversation
…d local installer (#524) * Install CUDA from verified redist components instead of the unverified local installer * Reject CUDA component symlinks that resolve outside the install tree * Lock the symlink-containment prefix trap with a regression test
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.
Why
PECOS has a randomized upper bound on circuit (DEM) fault distance, but none at code level — the regime that reaches codes too large for the exact engines (the
[[975,195,24]]class and beyond). This adds it, and it is the same algorithm: for a sampled nonempty logical subset S, BP-OSD-decode the augmented system[H; l_S] e = [0; 1](arXiv:1904.02703, with the randomized-subset idea of arXiv:2308.15140) and keep the lightest natively verified witness. Sound by construction — every candidate passesDistanceProblem::verify_witnessbefore it can tighten the bound, so a heuristic decoder can only fail to help, never corrupt the answer.What changed
The DEM sampler's core loop was already generic over an
(H, L)pair; the DEM only served to build aDistanceProblemand supply the H-side entries. This PR:randomized_distance_upper_bound(...), and rebuildsrandomized_fault_distance_upper_bound(the DEM entry point) on top of it with no behaviour change — proven by the existing DEM tests passing unchanged.randomized_code_distance_upper_bound(h, l, config)(binary(H, L)viaParityCheckMatrix) andrandomized_stabilizer_code_distance_upper_bound(spec, config)(symplectic, qubit-support weight). The stabilizer variant callsverify_as_complete_code()first — inheriting the completeness discipline the Distance finding and fault-tolerance tooling: Rust engine, typed inputs, DEM fault distance, docs #415 review established — so an ill-formed spec is rejected rather than silently bounded.pecos.qec, returning the shippedFaultDistanceUpperBoundResult(itsbound_kindstaysUpperBound). Docs never call the result a distance.Measurement
Gross
[[144,12,12]]bivariate-bicycle code, via the matrix binding on(Hx, Lx):It reaches the published distance (12) in a tenth of a second and is seed-deterministic. The exact check-driven search certifies the same code's distance in ~22 s; this matches it as a bound roughly 200x faster, and unlike the exact engine it keeps working where they become infeasible.
Verification
cargo test -p pecos-qec(full), including the unchanged DEM upper-bound tests (behaviour-preservation proof) and new code-level tests: soundness on the repetition, Steane, and five-qubit codes (bound >= exact, and tight), determinism, and rejection of a no-logicals spec.cargo clippy --locked -p pecos-qec -p pecos-rslib --all-targets -- -D warnings,cargo fmt --all --check,pre-commit run --all-files, andcargo test -p pecos --features neo(guard) all clean.