Fix: DetectorErrorModelArrays ignores stim's ^ decomposition separator#462
Fix: DetectorErrorModelArrays ignores stim's ^ decomposition separator#462HaoTy wants to merge 4 commits into
Conversation
…rs, breaking matching decoders on DEMs with non-graphlike errors
|
Thanks for investigating! I think what we've discovered is that the From the stim documentation:
A bit more discussion here. If my interpretation here is correct, the key word here is "suggested". The true error mechanism is the full list of targets, ignoring the separator. For Y errors in the surface code the full list of targets corresponds to a non-graphlike error. One possible fix is to simply ignore the error when building a matching decoder. Another possible fix is to decompose such an error into two correlated graph-like errors, and delegate the treatment of correlations to the decoder. I am pretty sure that matching decoders simply ignore the correlations. Worth noting: in the case of the surface code, these two fixes should be equivalent up to slight changes to the probability of each X or Z error. The fix in this PR amounts to throwing out the information about correlations. In other words, it upgrades the |
|
Thanks for the clear explanation! I think it makes sense to preserve the correlation information and let the decoder decide. "pymatching-correlated" has been merged into Sinter (quantumlib/Stim#1012, quantumlib/Stim#1046), which can serve as a reference. Feel free to close or edit this PR. |
|
Tentative plan:
This branch and PR are a suitable place for these changes. |
The non-matchable circuit issue mentioned in #445 and tqec/tqec#913 can be reproduced with even Stim-generated surface code circuits, as long as there is
DEPOLARIZE2noise:Below analysis and fix are AI-generated, but makes sense to me.
Stim decomposes every non-graphlike error into graphlike pieces separated by ^. Sinter uses this by default, so pymatching's
from_detector_error_modelworks fine. qldpc'sDetectorErrorModelArrays.get_circuit_errorsignores ^ separators (src/qldpc/decoders/dems.py:128), merging all targets of a decomposed error back into one multi-detector column — which is what breaksfrom_check_matrix.