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

Enhancements to GF(2) Linear Algebra: in-place row echelon with pivots, nullspace, and basis for row space #445

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Fe-r-oz
Copy link
Contributor

@Fe-r-oz Fe-r-oz commented Dec 4, 2024

This PR implements enhancements to the GF(2) Linear Algebra functionality. Inspired by python comprehensive ldpc.mod2 functionality. The following functionality are implemented in simple Julia:

  1. gf2_row_echelon_with_pivots!: return row echelon form, transformation matrix, rank and pivots
  2. gf2_nullspace: null space
  3. gf2_rowspace_basis: basis of the row space

Motivation: Currently, we don't have pure linear algebra implementation of the logical X and logical Z operators for stabilizer CSS code without using MixedDestabilizer. Meaning, we can determine the logicals that satisfy the following conditions:

  1. $L_z \in \ker(H_x)$
  2. $L_z \notin \text{Im}(H_z^T)$

And

  1. $L_x \in \ker(H_z)$
  2. $L_x \notin \text{Im}(H_x^T)$

These tools are going to be useful for pure linear algebra implementation of logical operators for CSS stabilizer codes. In general, I think it would nice to have complete set of GF(2) functionality. I have tested for correctness and also add consistency check with ldpc

Edit:

When the nullity is 0, a vector is zeros is convention. In this case, the ldpc.mod2.nullspace returns []. I have followed the convention.

  • The code is properly formatted and commented.
  • Substantial new functionality is documented within the docs.
  • All new functionality is tested.
  • All of the automated tests on github pass.
  • We recently started enforcing formatting checks. If formatting issues are reported in the new code you have written, please correct them.

@Fe-r-oz Fe-r-oz marked this pull request as ready for review December 5, 2024 00:31
@Fe-r-oz
Copy link
Contributor Author

Fe-r-oz commented Dec 6, 2024

Please help review this PR, Thank you!

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