1
$\begingroup$

I am trying to use Pymatching to decode some non CSS codes like the XZZX code. Pymatching is a perfect decoder for CSS codes, which can work effectively even of a large code distance. I have tried to decode XZZX code with Pymatching (circuits written with stim language), and certainly it gives wrong results (as d increases, logical error increases). I have learned that the algorithm in Pymatching (Sparse Blossom MWPM) performs well dealing with graph-like errors, while the correction operation of XZZX differs from that of CSS code, which leads to a wrong outcome. So my question is more technically:How could I modify the error-correction part in the Pymatching package and make it suitable for non CSS codes (e.g. XZZX code)?

$\endgroup$

1 Answer 1

1
$\begingroup$

Where are you getting the idea CSS codes are "more matchable"? That's not true. I'm not even sure why you'd think it's true.

The XZZX and CSS surface codes have identical decoding graph structures. Decoding one is decoding the other. If you're getting the wrong answer, it's because of a bug in how you make the decoding graph or in how you apply the corrections. It's somewhere in your glue code.

I recommend using pymatching.Matching.from_stim_circuit, as this will avoid several potential bugs with how you configure pymatching.

$\endgroup$
2
  • $\begingroup$ Thanks for your reply! Maybe I haven't made it clear that I'm doubting whether decoding process of CSS code can be directly applied to the XZZX code. I used Pymatching to decode in this way: '''detector_error_model = circuit.detector_error_model(decompose_errors=True)\n matcher = pymatching.Matching.from_detector_error_model(detector_error_model)\n predictions = matcher.decode_batch(detection_events)''' I know it will output a proper match for the XZZX code, but I'm wondering if the bit-flip operation from the match to the perdicted observable makes sense. $\endgroup$ Feb 15 at 12:04
  • $\begingroup$ @QingweiWang Compare it to whether or not the observable was actually flipped and you'll see it tracks it just as well as in the CSS surface code. $\endgroup$ Feb 15 at 17:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.