ldpc
LDPC: Python Tools for Low Density Parity Check Codes
Decision gist · record as of 2026-08-14
Yes, with conditions. Install if you are working on quantum error correction research or classical LDPC decoding and can meet the C compiler requirement. The MIT license and broad platform support (wheels for macOS, Linux, Windows) are favorable. However, the aging maintenance status (249 days since last release) and beta classification mean you should verify that the package meets your specific decoding accuracy and performance needs before committing to production use. No known security vulnerabilities.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a C compiler (gcc on Linux, clang on macOS/Windows) and Python >= 3.10 to build from source or install wheels.
- Medium install friction due to C++ compilation requirement (needs a C compiler like gcc or clang).
- Supports current Python versions (3.10+) with prebuilt wheels for common platforms.
License · maintenance · safety
permissive license (permissive) — MIT License permits free use, modification, and distribution with minimal restrictions, making it suitable for both academic and commercial projects.
last release 2025-12-08 (249 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 121,267 downloads/mo, #11,989 on PyPI
Alternatives
Verify before relying
pip install ldpc
import numpy as np
import ldpc.codes
from ldpc.bplsd_decoder import BpLsdDecoder
H = ldpc.codes.hamming_code(5)
decoder = BpLsdDecoder(H, error_rate=0.1, lsd_order=0)
syndrome = np.random.randint(0, 2, size=H.shape[0], dtype=np.uint8)
decoding = decoder.decode(syndrome)- Whether the package is actively maintained or in maintenance-only mode beyond the aging status flag
- Performance characteristics and decoding accuracy compared to other LDPC implementations
- Stability of the C++ rewrite relative to LDPCv1, given the documented possibility of breaking changes
What it is and what it does
LDPC is a Python library for decoding low-density parity check codes, with a focus on quantum error correction. It provides multiple decoder implementations—belief propagation (BP), ordered statistics decoding (OSD), union-find matching, and hybrid approaches like BP+LSD and BeliefFind—suitable for both classical and quantum codes. The package wraps C++ code via Cython and depends on numpy, scipy, tqdm, pytest, stim, sinter, and pymatching for its runtime.
The library is designed for researchers and practitioners working with error-correcting codes, particularly in quantum computing contexts. Installation requires a C compiler and Python 3.10 or later. It provides utilities for constructing codes (e.g., Hamming codes), computing code parameters via GF2 linear algebra, and decoding syndromes using configurable algorithms. The package is in beta status and remains a work in progress, with ongoing development for parallel processing and additional decoder implementations.
Use it for
- Decode quantum surface codes and other matchable syndromes using the union-find or BeliefFind decoders
- Benchmark belief propagation with ordered statistics decoding (BP+OSD) for quantum error correction research
- Compute low-density parity check code parameters and perform GF2 linear algebra operations
- Simulate quantum error correction pipelines by integrating with stim and sinter for code construction and syndrome generation
- Evaluate BP+LSD (belief propagation plus localized statistics decoding) as an alternative to OSD-based approaches
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with conditions.
Install if you are working on quantum error correction research or classical LDPC decoding and can meet the C compiler requirement. The MIT license and broad platform support (wheels for macOS, Linux, Windows) are favorable. However, the aging maintenance status (249 days since last release) and beta classification mean you should verify that the package meets your specific decoding accuracy and performance needs before committing to production use. No known security vulnerabilities.
Install
ldpc on PyPI
Before you install
Medium install friction due to C++ compilation requirement (needs a C compiler like gcc or clang). Supports current Python versions (3.10+) with prebuilt wheels for common platforms. Maintenance status is aging—last release was 249 days ago—though the package remains functional.
Requires a C compiler (gcc on Linux, clang on macOS/Windows) and Python >= 3.10 to build from source or install wheels.
License in practice
MIT License permits free use, modification, and distribution with minimal restrictions, making it suitable for both academic and commercial projects.
Quickstart
pip install ldpc
import numpy as np
import ldpc.codes
from ldpc.bplsd_decoder import BpLsdDecoder
H = ldpc.codes.hamming_code(5)
decoder = BpLsdDecoder(H, error_rate=0.1, lsd_order=0)
syndrome = np.random.randint(0, 2, size=H.shape[0], dtype=np.uint8)
decoding = decoder.decode(syndrome)
Verify before relying
- Whether the package is actively maintained or in maintenance-only mode beyond the aging status flag
- Performance characteristics and decoding accuracy compared to other LDPC implementations
- Stability of the C++ rewrite relative to LDPCv1, given the documented possibility of breaking changes
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 7 packagesnumpyscipytqdmpyteststimsinterpymatching |
| Maintenance | Aging 249 days since the last release |
| First released | |
| Downloads | 121,267 / month, #11,989 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - Beta |
Evidence: ldpc-2.4.1-cp310-cp310-macosx_10_9_x86_64.whl; ldpc-2.4.1-cp310-cp310-macosx_11_0_arm64.whl; ldpc-2.4.1-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; ldpc-2.4.1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; ldpc-2.4.1-cp310-cp310-win_amd64.whl; ldpc-2.4.1-cp311-cp311-macosx_10_9_x86_64.whl; ldpc-2.4.1-cp311-cp311-macosx_11_0_arm64.whl; ldpc-2.4.1-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; ldpc-2.4.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; ldpc-2.4.1-cp311-cp311-win_amd64.whl; ldpc-2.4.1-cp312-cp312-macosx_10_13_x86_64.whl; ldpc-2.4.1-cp312-cp312-macosx_11_0_arm64.whl; ldpc-2.4.1-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; ldpc-2.4.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; ldpc-2.4.1-cp312-cp312-win_amd64.whl; ldpc-2.4.1-cp313-cp313-macosx_10_13_x86_64.whl; ldpc-2.4.1-cp313-cp313-macosx_11_0_arm64.whl; ldpc-2.4.1-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; ldpc-2.4.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; ldpc-2.4.1-cp313-cp313-win_amd64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “LDPC decoder”
- ldpcProvides decoders for low-density parity check (LDPC) codes,…
- texture2ddecoderDecodes compressed texture formats (BC, PVRTC, ETC, ASTC, ATC,…
- pyctcdecodeDecodes CTC (Connectionist Temporal Classification) logits from…
Give your agent the search over MCP, or paste the wish link into any chat.
More Scientific/Engineering packages
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.
scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.
scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.
Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.
dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.
Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.
Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.
See also PyMatching · permutation · sinter · leidenalg · cudensitymat-cu13 · cirq-google · mqt.qcec · cirq-core · pyctcdecode · pytket