To detect and correct for errors in a topological quantum memory (toric code for example) one needs a quantum error correction algorithm also known as decoder.

The minimum weight perfect matching (MWPM) decoder is currently the most standard decoder for topological codes and an open source implementation exists in Python/C++ called PyMatching.

Other decoders exist, such as Union-Find, Two-pass matching, Belief-matching or Tensor-network decoding, each with different levels of accuracy and speed.

Are there open source implementations of these other decoders available somewhere, for example using Python?


2 Answers 2


The following packages contain decoders and can be used with Python:

  • PanQEC: Sweepmatch and Belief Propagation with Memory effect

  • QECC: Union-Find decoder

  • BPOSD: Belief propagation + OSD postprocessing

  • QECSIM: Tensor network and MWPM decoder


For tensor networks, there are a few open source decoders (though I think they typically specialize to 2D decoding problems). See e.g. here.

To the best of my knowledge, there are no open source implementations of the other decoders you mention.


Your Answer

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

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