-
Notifications
You must be signed in to change notification settings - Fork 48
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
Circulant GF(2) permutation matrix-based construction of Bivariate Bicycle quantum LDPC code #352
base: master
Are you sure you want to change the base?
Conversation
Acknowledgement: I am very thankful to Claus from Oscar. He suggested a robust method to calculate the intersection of two kernels,
|
@royess, two days ago, I completed the These might be interesting to you: A new QLDPC decoder released today: BPOTF (It's a C++ decoder) and this #14 (comment). |
@Krastanov, pinging for review. All the code constructions given in the paper I shared have been verified for P.S Downgrade error is occuring because |
Referring to #353 to monitor progress. |
Referring to #356 as |
…and the test base with many instances
The PR is ready for review. I have added many instances of BBQLDPCs in the P.S. There were a lot of merge conflicts, therefore had to merge branch into master many times. |
Indeed. Bravyi notes that BBQLDPC can be viewed as a special case of Lifted Product construction based on abelian group ℤⱼ x ℤₘ where ℤⱼ cyclic group of order |
Do you know how to implement such a cross-check? |
I will have to see the literature on the LPCode construction method for these codes for the group theoretic route. The aforementioned paper used, let's say "matrix-based" approach, not the "group based" approach (LPCode construction). side note: I did pondered about cross checking the matrix-based construction based on the formulas provided in the paper, especially calculating This manual correctness check uses Without Since we don't have
|
Oscar can be added to the test-runner without being added as a dependency to the package itself, if it can provide useful testing capabilities |
Pardon for the delay, Added
I didn't add Plots:
|
@Krastanov, Thank you for your suggestion. The cross check (#372) has been implemented as well. In this construction, A small test which shows permutating the column space leads to nonequivalent canonical forms:
P.S. Thank you for your help is resolving the weird CI errors when adding Oscar to test-runner. That is much appreciated. |
Experimental WIP: Stacked Model and Bilayered ArchitectureFuture work: The papers on these codes talk about Toric Layout and Embeddings for these codes for 2D Implementation. Thus, two future features, namely -
|
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.
This is awesome! Left a few comments in.
@@ -48,15 +48,15 @@ Combinatorics = "1.0" | |||
DataStructures = "0.18" | |||
DocStringExtensions = "0.9" | |||
Graphs = "1.9" | |||
Hecke = "0.28, 0.29, 0.30, 0.31, 0.32, 0.33, 0.34" | |||
Hecke = "0.28, 0.29, 0.30, 0.31, 0.32, 0.33, 0.34, 0.34.3" |
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.
why is this needed?
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.
This is not needed now thanks to Tommy CI Oscar Injection!
This PR was done earlier, why I was trying to add Oscar to test runner, so that's why the weird additions
HostCPUFeatures = "0.1.6" | ||
ILog2 = "0.2.3" | ||
InteractiveUtils = "1.9" | ||
LDPCDecoders = "0.3.1" | ||
LinearAlgebra = "1.9" | ||
MacroTools = "0.5.9" | ||
Makie = "0.20, 0.21" | ||
Nemo = "0.42.1, 0.43, 0.44, 0.45, 0.46, 0.47" | ||
Nemo = "0.42.1, 0.43, 0.44, 0.45, 0.46, 0.47, 0.47.1" |
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.
why is this needed?
|
||
The matrices `x = Sₗ ⊗ Iₘ` and `y = Iₗ ⊗ Sₘ` are used. The BB code is represented by matrices `A` and `B`, defined as: `A = A₁ + A₂ + A₃` and `B = B₁ + B₂ + B₃`. The addition and multiplication operations on binary matrices are performed modulo 2. The check matrices are: `Hx = [A|B]` and `Hz = [B'|A']`. Both `Hx` and `Hz` are `(n/2)×n` matrices. | ||
|
||
The ECC Zoo has an [entry for this family](https://errorcorrectionzoo.org/c/qcga). |
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.
This also needs:
- explanation of what the l,m,A,B entries are
- doctest example
- comparison to using directly the other ways in which this code can already be created in this library
- "see also" for other codes and constructions
- a remark in the "see also" that mentions alternative way to construct these same codes
|
||
The ECC Zoo has an [entry for this family](https://errorcorrectionzoo.org/c/qcga). | ||
""" | ||
struct circulant_bivariate_bicycle <: AbstractECC |
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.
this should be named like a struct, not like a function (e.g. CirculantBivariateBicycle
)
(l >= 0 && m >= 0) || error("l and m must be non-negative") | ||
(length(A) == 3 && length(B) == 3) || error("A and B must each have exactly 3 entries") | ||
(all(x -> x >= 0, A) && all(x -> x >= 0, B)) || error("A and B must contain only non-negative integers") | ||
(all(x -> x in 0:max(l, m), A) && all(x -> x in 0:max(l, m), B)) || error("Each element in A and B must be in the range [0, $(max(l, m))].") |
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.
could you use an explicit throw of an argument error or domain error instead of a generic error
@@ -16,12 +17,15 @@ LDPCDecoders = "3c486d74-64b9-4c60-8b1a-13a564e77efb" | |||
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" | |||
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" | |||
Nemo = "2edaba10-b0f1-5616-af89-8c11ac63239a" | |||
Oscar = "f1435218-dba5-11e9-1e4d-f1a5fab5fc13" | |||
Polymake = "d720cf60-89b5-51f5-aff5-213f193123e7" |
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.
why is polymake needed?
PyQDecoders = "17f5de1a-9b79-4409-a58d-4d45812840f7" | ||
Quantikz = "b0d11df0-eea3-4d79-b4a5-421488cbf74b" | ||
QuantumInterface = "5717a53b-5d69-4fa3-b976-0bf2f97ca1e5" | ||
QuantumOpticsBase = "4f57444f-1401-5e15-980d-4471b28d5678" | ||
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" | ||
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" | ||
Singular = "bcd08a7b-43d2-5ff7-b6d4-c458787f915c" |
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.
why is Singular needed?
@@ -0,0 +1,53 @@ | |||
@testitem "ECC circulant_bivariate_bicycle" begin |
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.
these tests probable also need a subset of tests that verify correctness against the other construction method you have already contributed
A = matrix(GF(2), Hx[:,1:n]) | ||
B = matrix(GF(2), Hx[:,n+1:end]) | ||
k = GF(2) | ||
hA = hom(free_module(k, size(A, 1)), free_module(k, size(A, 2)), A) |
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.
hom needs to be added to the spellchecker (the .typos
file)
|
||
@article{berthusen2024toward, | ||
title={Toward a 2D local implementation of quantum LDPC codes}, | ||
author={Berthusen, Noah and Devulapalli, Dhruv and Schoute, Eddie and Childs, Andrew M and Gullans, Michael J and Gorshkov, Alexey V and Gottesman, Daniel}, |
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.
"Childs" needs to be added to the spellchecker (the .typos
file)
Thank you for your comments. This PR was done before Tommy's CI Injection Oscar approach which greatly simplified things for us. Before the CI Injection, I was trying to add Oscar into test runner and meeting requirements which was not the right approach. The tests require So, let's turn this into draft till we have |
Dear @Krastanov,
In this 2024 paper High-threshold and low-overhead fault-tolerant quantum memory, Bravyi et. al. has introduced a simple
BBQLDPC
code. In theTable 3
, as seen below, these are the code constructions given in the paper.All these constructions have been tested (especially at the moment, tests have been added to verify the number of logical qubits,
k
which is calculated on formula:k = n - rank(Hx) - rank(Hz)
. Please checkout the test section:The interface is user-friendly:
The documentation is simple so it's easier to follow as well. Python implementation of this code is available at here.
Cross verification between python implementation and this implementation has been done. The matrices are huge, but we can export results from python, import them in julia and compare the results.
Would you like to have a dataset prepared for these given constructions, so we can import them and test for correctness comparison in the test section?
There is bounds error as seen in #306.
Near-term use of this
BBQLDPC
: This pr will be helpful asBBLDPC
code is a special case ofLiftedProduct
code as described the authors as follows: "We note that the codeQC(A,B)
can be viewed as a special case of the Lifted Product construction [54] based on the abelian groupZ_ℓ × Z_m
. HereZ_j
denotes the cyclic group of orderj.
" Maybe in the near-future,LiftedProduct
code can be tested by usingBBQLPC
as a correctness check.The aim and objective of the pr is small: to provide a correct and robust construction of
BBQLDPC
code. I will try to further improve it by adding more tests and incorprate your feedback.I was very excited as I read the paper, so submitted it. I hope you find this plausible.
Thanks for your time.
...
If you want to submit an unfinished piece of work in order to get comments and discuss, please mark the pull request as a draft and ping the repository maintainer.
Please address only one topic or issue per pull request! Many small PRs are much easier to review and merge than one large PR.
Before merging, all changes and new functionality should be marked in the CHANGELOG file, but feel free to just leave your CHANGELOG notes in the PR description, to avoid merge conflicts with other requests modifying that file. The maintainer will add these CHANGELOG notes for you if you do so.
Before considering your pull request ready for review and merging make sure that all of the following are completed (please keep the clecklist as part of your PR):
If possible, keep your git history not too wild (rebase and squash commits, keep commits small and semantically separated) so that review is easier.