Skip to content

Added Function for Generating LDPC Tanner Graphs using the Progressive Edge Growth (PEG) Algorithm#76

Open
vivek-kumar9696 wants to merge 1 commit intoquantumgizmos:mainfrom
vivek-kumar9696:feature/70-generate-ldpc-tanner-graphs-using-peg
Open

Added Function for Generating LDPC Tanner Graphs using the Progressive Edge Growth (PEG) Algorithm#76
vivek-kumar9696 wants to merge 1 commit intoquantumgizmos:mainfrom
vivek-kumar9696:feature/70-generate-ldpc-tanner-graphs-using-peg

Conversation

@vivek-kumar9696
Copy link

@vivek-kumar9696 vivek-kumar9696 commented May 28, 2025

This solves the issue #70 by implementing the required function and necessary tests.

  • Implementation: Placed the implementation, generate_ldpc_peg.py in the src_python/ldpc/codes directory.

  • Testing: Added corresponding tests in the python_test directory by modifying test_codes.py. Added tests for:

  • Test that generate_ldpc_peg returns a CSR matrix of correct shape and type, test_generate_ldpc_peg_output_type_and_shape()

  • Test that all entries of the generated matrix are binary (0 or 1), test_generate_ldpc_peg_binary_entries()

  • Test that each variable node has exactly dv edges and each check node has degree at most dc, test_generate_ldpc_peg_degrees

  • Test that the generated matrix contains no 4-cycles, i.e. any two variable nodes share at most one common check neighbor, test_generate_ldpc_peg_no_four_cycles

@quantumgizmos
Copy link
Owner

Thank you for the PR. I have assigned you to the issue.

@vivek-kumar9696
Copy link
Author

vivek-kumar9696 commented Jun 16, 2025

@quantumgizmos ,
Thank you. I remember that you also required a cython wrapper. Apologies, I did not get time to take a look at it. But if this is a correct implementation, I will raise a new issue and modify to add a cython wrapper asap.

@quantumgizmos
Copy link
Owner

@vivek-kumar9696 Thank you. A cython wrapper would be great!

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.

2 participants