-
Notifications
You must be signed in to change notification settings - Fork 47
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
tests: test consistency of Bivariate Bicycle code using LPCode constructor #372
Conversation
70e9670
to
6d42ccc
Compare
I was feeling unwell and was not able to respond to this earlier. Bivariate bicycle codes are 2GBA codes, as you mentioned. So it should be constructed by I am unfamiliar with OScar. So, I cannot help with checking your implementation. I would not suggest adding bivariate bicycle codes as constructors for If it is only for testing purposes, there will be no need to modify codes in ext, in particular if we do not want two co-existing implementations of bivariate bicycle codes that cause confusion. Instead, we may want to save these things (including OScar as a dependency) for tests. |
Lifted Product
construction of bivariate bicycles codes using LPCode
Lifted Product
construction of bivariate bicycles codes using LPCode
ℤₗ x ℤₘ
ℤₗ x ℤₘ
ℤₗ x ℤₘ
@royess, No worries. I think there is no need to define these code as constructors for Now, both constructions provide exact As you said, the two co-existing implementations cause some confusion. The canonical forms of their parity check matrices don't match though, maybe that is because of the different construction methods (Group Algebra or GF(2) circulant Matrices) and conventions as we are using group algebras. I have cross-checked the circulant-matrix based implementation with the original python implementation provided in the Bravyi paper as well. I used
Is it possible for one family (like one in consideration) of error-correcting codes to nonequivalent canonical forms of parity-check matrices, especially if they have different construction/representation methods over different group objects? As you know, In literature, there are three construction methods: LP Code (Group Algebra) construction 2) quotient bivariate polynomial ring construction 3) circulant construction. There is one example of this observation, Golay code: https://errorcorrectionzoo.org/c/golay. The ECC Zoo construction for these code uses a fancy math object 'great dodecahedron', that has a nonequivalent canonical form than the simple matrix-based construction methods which is widely used. In most books such as Huffman Fundamentals of Error Correction and most papers, if the construction method is on simple math object (GF(2) matrix), and those codes have canonically equivalent parity check matrices even if a slight different approach. Here, I test equivalence of two different constructions methods for reverse-bordered circulant matrix for Golay code in Golay code test file. Apart from this, I don't have know reasons about why this could be the case. Edit: After some more pondering, I found out that the bivaraite polynomial ring construction of these codes (which is similar to the permutation matrix construction) applies a permutation matrix to the column space and row space both, that's why their canonical forms are nonequivalent. |
ℤₗ x ℤₘ
ℤₗ x ℤₘ
Some brief details about abelian_group(PcGroup, [l,m]) provides the direct product of cyclic groups
Hopefully, the current approach is a reasonable one. @Krastanov, I think the PR is ready for review, Thank you! |
ℤₗ x ℤₘ
ℤₗ x ℤₘ
via Oscar Product of Groups
ℤₗ x ℤₘ
via Oscar Product of Groupsℤₗxℤₘ
via lifted product construction and Oscar's Product of Groups
P.S. Cross checks (All code constructions verified for the following as well): |
ℤₗxℤₘ
via lifted product construction and Oscar's Product of Groupsℤₗxℤₘ
via lifted product construction via Hecke's Group Algebra
Ah... Found something much simpler. It just occurred to me today after some more thought. Now, only used |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #372 +/- ##
==========================================
- Coverage 83.06% 83.01% -0.05%
==========================================
Files 70 70
Lines 4410 4410
==========================================
- Hits 3663 3661 -2
- Misses 747 749 +2 ☔ View full report in Codecov by Sentry. |
ℤₗxℤₘ
via lifted product construction via Hecke's Group Algebraℤₗxℤₘ
via Hecke's Group Algebra
Since #394 is resolved, I have added the test file that reproduced complete Tables from three different papers for these codes. I didn't add test file earlier because it would have caused CI-failures unrelated to this PR and instead opened the mentioned issue about it. Now, The PR has been setup for review, @Krastanov, Thanks! P.S: This PR is implemented as a cross-check to #399. So, please review that first, so I can add the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this still needed or is all of this functionality and/or tests already merged in your other PRs?
ℤₗxℤₘ
via Hecke's Group Algebra
Not necessarily. The original plan was to use the |
@Krastanov, @royess, please find the Lifted Product Construction of Bivariate Bicycle codes, here the abelian group is : ℤₗ x ℤₘ where ℤⱼ cyclic group of order j. Utilized cyclic_group from Oscar.
ECC Zoo refers to these codes as one of the several (two block group algebra codes) 2BGA codes. Since, we have the constructor for 2BGA, and based on Bravyi description (#352 (comment)), it seems this should be simple when considering the LP construction. There are other construction methods that does not rely on LP construction: 1) the circulant matrix construction in GF(2) or 2) where Group algebra (GA) can be defined as quotient of a bivariate polynomial ring.
The literature says that BB belong to class of Generalized Bicycle Codes (GB), and GB codes were further generalized into two block group algebra codes (2BGA). That's why ECC Zoo says they are one of several 2BGA codes.
Initial output:
The tests passed locally for encoding, decoding, syndrome etc.
This is an initial commit but there is further work that needs to be done. Please feel free to add your insights. That is much appreciated.
If I am not mistaken, I think we will need one function for LiftedProduct based on the current logic that also takes
l
and where Group Algebra is product of cyclic groups. Currently, we are only assuming thatl
is the only parameter that we need for LP codes with GA being an abelian group based onl
. But we need to cater tom
parameter as well now since we are taking direct product of two cyclic groups, each with it's own parameter,l
andm
, respectively. . Something like the following if we want to construct these codes usingLPcode
constructor. I do skimmed some of these papers and not ready about the LP constructions methods. In this Panteleev Paper, where he describes the different codes Bicycle, two block group algebra, generalized bicycle for which constructors have been already defined, we need onlyl
parameter. For bivariate bicycle codes, an additional parameterm
and a GA that is direct product of cyclic groups, is required based on the current logic. Maybe we will need the following:Do we really need the above method because
LiftedCode
constructor for2GBA
codes is already defined, and these codes end up calling that constructor because of being a subset of2GBA
? It seems if we want to specifically useLPCode
constructor, then we have to consider defining it.Hopefully, this sounds reasonable approach for further exploration. While this provides easy integration of cyclic groups, Two suspects are why
code_k
is0
for instances of these codes and why decoder test broken warnings. In the earlier PR (352),code_k
gives correct results for non-LP construction.@test canonicalize!(parity_checks(LP implementation)) == canonicalize!(non-LP implementation (352)))
to ensure this LP-implementation is correct.Feedback is more than welcome.
P.S. I have not thoroughly read the 4 papers that were referred in LPCode PR, so I am unfamiliar with those works. @Krastanov , @royess will have have better insights.