LDPC: Python Tools for Low Density Parity Check Codes
Maintained. Last release 12 months ago. Weaker on release cadence.
pip install ldpcLDPC: Software for Decoding Classical and Quantum Codes
LDPC Version 2: A C++ rewrite of the LDPCv1 package for decoding low density parity check checks.
Warning, whilst efforts have been made to provide backwards compatability with LDPCv1, the new version may introduce breaking changes.
Documentation
The documentation for LDPCv2 can be found here
Installation
The easiest way to install the package is via pip. Python versions >=3.10 are supported.
pip install -U ldpc
Python - Installation from source
The C++ source code can be found in src_cpp. Python bindings are implemented using Cython and can be found in src/ldpc. To install the Python version of the repository follows the instructions below:
- Download the repo.
- Navigate to the root.
- Pip install with
python>=3.10. Note: installation requires aCcompiler. Eg.gccon Linux orclangon Windows.
git clone git@github.com:quantumgizmos/ldpc_v2.git
cd ldpc
pip install -Ue .
LDPCv1
If your package requires LDPCv1, this can be installed from PyPi as follows:
pip install -U ldpc==0.1.60
New features
- A new C++ template class
GF2Sparse. This is a more flexible implementation of themod2sparsedata structure used in the LDPCv1. This will make it much easier to expand the package. - Serial schedules for the BP decoder.
- Run-time improvements for BP+OSD OSD-0. The decoder now implements the fast-syndrome OSD-0 implementation (https://arxiv.org/abs/1904.02703), where Gaussian elimination is terminated as soon as the syndrome becomes linearly dependent on the reduced columns.
- BP+LSD: Belief propagation plus localised statistics decoding. A parallel decoding algorithm that matches the perforance of BP+OSD. Note that the version implemented currenlty runs in serial. We are working on the parallel version! See our paper: https://arxiv.org/abs/2406.18655
- The union-find matching decoder (https://arxiv.org/abs/1709.06218). This is an implementation of the Delfosse-Nickerson union-find decoder that is suitable for decoding surface codes and other codes with "matchable" syndromes.