Skip to content

Add the distance experiment of state_prep_certification - #916

Merged
perlinm merged 1 commit into
mainfrom
state-prep-certification-distances
Nov 17, 2026
Merged

perlinm merged 1 commit into
mainfrom
state-prep-certification-distances

Conversation

@perlinm

@perlinm perlinm commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

This pull request adds the distance experiment of experiments/state_prep_certification/, a plug-in of its harness (#914). It times qLDPC's exact Brouwer–Zimmermann (BZ) distance search with everything on (q_bz_on) against the same search configured with only the techniques that some public exact tool shares with it (q_bz_prior), on the same codes and time limit.

Changes

  • arms.py: both arms make the same get_distance_exact(method="brouwer_zimmermann") call on a plain CSSCode or QuditCode built from stored matrices, and differ only in the tuning (BZ_PRIOR in config.json).
  • codes.py: eight code families drawn at sizes from published endpoints (endpoints.json) with fixed seeds and structural screens only, and 31 named anchors with reference distances; sample.json fixes every code by its hashes, and a run regenerates the codes and stops on any difference.
  • experiment.py: the plug-in, with timed runs, two repeats of runs under 300 s, and counting runs with qLDPC's opt-in work counters where the installed qLDPC has them.
  • acceptance.py and analyze.py: the acceptance tests, and the analysis whose cases (both finished, bounds, both timed out, failures, and disagreements with each other or with a reference distance) its docstring lists.

experiments/state_prep_certification/distances/README.md describes the arms, the codes, and the commands.

Validation

The acceptance tests check, among others, the reference distances of fast anchors and that both arms search the same sectors, a timeout that leaves no process, the regenerated sample and each arm's tuning against the prior tuning written out in the test, that every qLDPC search in the experiment names its method, agreement of the arms on a small code of each family, the ceiling and repeat policy against independent arithmetic, and the analysis on synthetic rows of every case. On a workstation they cap runs at 60 s and report what does not finish. Two bb sizes give k = 0 for every draw; sample.json records them as shortfalls.

experiments/state_prep_certification/distances/ compares qLDPC's exact
Brouwer-Zimmermann distance search with everything on (q_bz_on) against
the same search configured with only the techniques that public exact
tools share with it (q_bz_prior), on the same codes and time limit:

- arms.py: the two arms, which make the same code-method call on a
  plain code built from stored matrices, and differ only in the tuning;
- codes.py: eight families drawn by a written size rule from published
  endpoints (endpoints.json), with fixed seeds and structural screens
  only, and 31 named anchors, fixed in sample.json by their hashes;
- experiment.py: the plug-in, with counting runs behind a check for
  qLDPC's opt-in work counters, which the node requires;
- acceptance.py and analyze.py.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@perlinm
perlinm merged commit 253ac2b into main Nov 17, 2026
9 checks passed
@perlinm
perlinm deleted the state-prep-certification-distances branch November 17, 2026 00:51
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