Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad matrix rank error #9

Closed
Matio7k opened this issue Apr 13, 2023 · 7 comments
Closed

Bad matrix rank error #9

Matio7k opened this issue Apr 13, 2023 · 7 comments

Comments

@Matio7k
Copy link

Matio7k commented Apr 13, 2023

I truly appreciate your code and want to analyze it deeper. For this reason I would like to ask about the error which I am getting in mm_qc_pega.py.

I am running the code with your default settings, nothing changed and I am getting error on this line:
assert np.linalg.matrix_rank(H) == G.n_cn, "Bad matrix rank"

Do you have an idea why the rank of matrix H is not equal the size of G matrix? To be precise, the rank of H is 1 rank smaller.

Thank you in advance!

@Lcrypto
Copy link
Owner

Lcrypto commented Apr 13, 2023

Depend from your weight distribution, you can get linear depended in qc representation. Try to lift it again or use different weight distribution. For example for weight 4 column regular code you ll always get not full rank.
With BR, USA

@Lcrypto Lcrypto closed this as completed Apr 13, 2023
@Matio7k
Copy link
Author

Matio7k commented Apr 13, 2023

Could you give me an example of correct weight distribution for vn_degree_node and cn_degree_nodes? I am trying with weight distributions from literature, but then I get different error during PEG phase.

@Lcrypto
Copy link
Owner

Lcrypto commented Apr 13, 2023

@Matio7k
Copy link
Author

Matio7k commented Apr 13, 2023

Thank you very much for your help!

@Lcrypto
Copy link
Owner

Lcrypto commented Apr 13, 2023

You are Welcome!

@Matio7k
Copy link
Author

Matio7k commented Apr 14, 2023

Please excuse my questions but I have one more.

When I want to make a QC-code with size e.g. n=20, m=10, I get the error:
RecursionError: maximum recursion depth exceeded while calling a Python object,
which comes from recursively calling strategy1() function in peg_utils.py (line 388). Have you seen this type of behaviour? Do you know how to deal with the problem of too big call stack?

This problem only appears when making QC-code with bigger sizes, e.g. for n=10 and m=5, everything works fine.

@Lcrypto
Copy link
Owner

Lcrypto commented Apr 14, 2023

I don't recommend to use column weight too large and circulant larger 128. If you want large sizes best way to use
Random generator of protograph from you weight distrubion

https://github.com/Lcrypto/Density-Evolution-AWGN/blob/master/rand_proto.m

And after use simulation annealing with large emd

https://github.com/Lcrypto/Simulated-annealing-lifting-QC-LDPC

If you still want peg better use matlab peg+ace implementation
With, BR Usa

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

No branches or pull requests

2 participants