-
Notifications
You must be signed in to change notification settings - Fork 50
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
Conversation
…s, nullspace, and basis for row space
dda4b4f
to
7b3238b
Compare
Please help review this PR, Thank you! |
These are neat! My main question would be whether these are available already in Nemo and company and if they are faster there. Any insight on that? |
The row echelon form with pivots is likely not available. They have I think we can add another consistency check:
|
Yup, this looks great, especially being faster than Nemo (that is surprising). Could you make the following changes:
This should be straightforward to merge afterwards. Thanks for the contribution! |
The JET failure is unrelated and fixed on master |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #445 +/- ##
==========================================
+ Coverage 82.63% 82.77% +0.14%
==========================================
Files 70 70
Lines 4613 4651 +38
==========================================
+ Hits 3812 3850 +38
Misses 801 801 ☔ View full report in Codecov by Sentry. |
Thank you for you suggestions! I have incorporated all of your suggestions. Edit: I had added the changelog to |
thank you! |
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:
gf2_row_echelon_with_pivots!
: return row echelon form, transformation matrix, rank and pivotsgf2_nullspace
: null spacegf2_rowspace_basis
: basis of the row spaceMotivation: 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:And
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.