Skip to content

Scaling factors#84

Open
quantumgizmos wants to merge 10 commits intomainfrom
scaling_factors
Open

Scaling factors#84
quantumgizmos wants to merge 10 commits intomainfrom
scaling_factors

Conversation

@quantumgizmos
Copy link
Owner

@quantumgizmos quantumgizmos commented Jul 29, 2025

This pull request introduces support for a dynamic scaling factor damping mechanism in the minimum-sum (MS) belief propagation (BP) decoder and its Python/C++ interfaces. The main goal is to allow the MS scaling factor to evolve dynamically during decoding, which can improve convergence and performance. The changes are thoroughly tested with new unit tests and are integrated into several decoder classes.

Key changes:

Core C++ Implementation

  • Added dynamic_scaling_factor_damping and ms_converge_value parameters to the BpDecoder class, and implemented logic in set_up_ms_scaling_factors() to initialize the per-iteration scaling factor vector based on these parameters. The MS update now uses the correct scaling factor for each iteration. (src_cpp/bp.hpp) [1] [2] [3] [4] [5]

Python Interface & Typings

  • Updated Python interface and type stubs for BeliefFindDecoder to accept and document the new dynamic_scaling_factor_damping and ms_converge_value parameters, ensuring consistency between the C++ and Python APIs. (src_python/ldpc/belief_find_decoder/_belief_find_decoder.pyx, src_python/ldpc/belief_find_decoder/__init__.pyi) [1] [2]

Testing

  • Added comprehensive C++ and Python tests to verify correct initialization and behavior of dynamic and static scaling factors, as well as the new convergence value logic. These tests cover various decoders and parameter combinations. (cpp_test/TestBPDecoder.cpp, python_test/test_bp_dynamic_scaling_factor.py) [1] [2]

Example Usage and Integration

  • Updated example and integration tests to use the new dynamic scaling factor parameters, demonstrating usage in realistic decoding scenarios. (python_test/test_qcodes.py, python_test/test_bplsd.py) [1] [2] [3] [4]

Miscellaneous

  • Bumped the project version to 2.3.9 to reflect these new features. (pyproject.toml)

These changes make the MS BP decoder more flexible and tunable, and ensure robust testing and documentation across both C++ and Python interfaces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant