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

Puncture and shorten ClassicalCodes #41

Merged
merged 9 commits into from
Mar 26, 2024
Merged

Puncture and shorten ClassicalCodes #41

merged 9 commits into from
Mar 26, 2024

Conversation

perlinm
Copy link
Collaborator

@perlinm perlinm commented Mar 24, 2024

These methods will be used in code-search experiments.

Also: added equality testing between ClassicalCodes, and added the ClassicalCode.from_generator constructor.

@mittaltushant no rush, but if you get the chance can you please take a quick look to make sure this looks correct?

@perlinm perlinm requested a review from mittaltushant March 24, 2024 17:30
@perlinm perlinm self-assigned this Mar 24, 2024
@perlinm
Copy link
Collaborator Author

perlinm commented Mar 26, 2024

@mittaltushant I'm going to merge but nbd if we need to revise after.

@perlinm perlinm merged commit 0d4eacb into main Mar 26, 2024
5 checks passed
@perlinm perlinm deleted the modify-codes branch March 26, 2024 01:24
@mittaltushant
Copy link
Contributor

For the equality test function, it seems that the check would not work if one uses a different (but equivalent) parity check matrix/generator matrix. A more foolproof method would be to check if H_1G_2^T = 0 (basically, if the generators of C_2 satisfy all parity checks we have C_2 \subseteq C_1; the other direction can be a simple dimension check).

The rest looks good.

@perlinm
Copy link
Collaborator Author

perlinm commented Mar 26, 2024

Hmm that's a good point. I guess that raises a tension in what it means for two ClassicalCode instances to be "equal", or what the expectations of a user would be if I told them that code_a == code_b. Thinking about this more, I'm hesitant to say that code_a == code_b if the two code instances behave differently -- for example by giving rise to different hypergraph product codes. That could be pretty confusing.

I certainly agree though that my current equality test is misguided. I'm sort of leaning having __eq__ just test equality of the data that defines an instance (for a ClassicalCode, the parity check matrix), and adding a ClassicalCode.equiv method that checks (C_a ⊆ C_b) & (C_b ⊆ C_a). Does that sound reasonable?

@mittaltushant
Copy link
Contributor

mittaltushant commented Mar 27, 2024 via email

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