Repository navigation
Conversation
shortest_errors(circuit, max_weight=k) returns every smallest set of faults that can flip an observable without flipping a detector, with the exact probabilities that the set goes undetected and flips an observable. Circuit errors with equal error-basis bits act identically, so they form one fault. Direct detectors are single f-bits, so sets whose direct detectors cancel are found by joining two tables of smaller sets on a linear hash; the statevector components then decide each candidate exactly by walking every measurement branch of their tape (statevector/branches.py). The builder now records each noise channel's instruction and target range, so faults are explained with stim.CircuitErrorLocation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Contributor
☂️ Code Coverage
Overall Coverage
New Files
Modified Files
|
…umba The tape reads a set's f-bits only through its rotation signs and a linear flip of its outputs, and few distinct signs occur: 3,864 among the 18M weight-4 candidates of Z-flagged d=5 cultivation. Branches.outcomes now gives the exact output distribution per distinct signs, and a numba join (noise/fault_join.py) streams the larger half of each set instead of storing it, in two passes: one collects the distinct signs, the other keeps the sets whose signs and output flips can flip an observable undetected. d=5 cultivation to weight 3 goes from 10 s to 0.7 s, Z-flagged d=5 to weight 4 from 160 s to 5 s, and weight 5 is now within reach. max_errors keeps only the most likely errors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lane splits Codecov does not trace numba, so a test runs the join kernels' py_funcs and checks them against the compiled join. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Adds
tsim.experimental.shortest_errors, the non-Clifford analogue of Stim'sshortest_graphlike_error.The search is exhaustive, so an empty result proves the distance is above
max_weight.How it works
f = T e, and nothing else about the noise reaches the outputs. Circuit errors with equal f-bits are one fault.statevector/branches.pywalks every measurement branch of the tape and prunes on detectors as soon as they are known.Site,channel_sites,chain_links), so faults are explained with Stim's own location type.Results
These are the T circuits of Chan et al., arXiv:2609.17706, on the whole circuit with no region hint:
shortest_errorsChecks
search_for_undetectable_logical_errorsfinds, and the circuit error locations equal Stim's.Branchesmatches the denseops_distributionreference on the test circuits.Open
MAX_COMBINATIONS).circuit.flattened(), which matches Stim only for circuits withoutREPEAT.tsim.experimentalfor now, possibly aCircuitmethod later.🤖 Generated with Claude Code