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

bivariate bicycle quantum ldpc code #352

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 Sep 2, 2024

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 the Table 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:
Screenshot_select-area_20240902134341

The interface is user-friendly:

julia> using QuantumClifford.ECC: BBQLDPC, parity_checks

julia> parity_checks(BBQLDPC(12, 6, [3, 1, 2], [3, 1, 2]))
# the stabilizer

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?

julia> using MAT
julia> using QuantumClifford
julia> using QuantumClifford.ECC: BBQLDPC, parity_checks, naive_encoding_circuit
julia> mat_file_path = "/home/Feroz/Desktop/matrices96.mat";
julia> mat_data = matopen(mat_file_path);
julia> AT = read(mat_data, "AT");
julia> BT = read(mat_data, "BT");
julia> BTT, ATT = parity_checks(BBQLDPC(9, 6, [3, 1, 2], [3, 1, 2]))
([0 0 … 0 0; 0 0 … 0 0; … ; 0 0 … 0 0; 0 0 … 0 0], [0 0 … 0 0; 1 0 … 0 0; … ; 0 0 … 0 0; 0 0 … 1 0])
julia> BTT == BT
true
julia> ATT == AT
true
julia> mat_file_path = "/home/Feroz/Desktop/matrices2814.mat";
julia> mat_data = matopen(mat_file_path);
julia> AT = read(mat_data, "AT");
julia> BT = read(mat_data, "BT");
julia> BTT, ATT = parity_checks(BBQLDPC(28, 14, [26, 6, 8], [7, 9, 20]))
([0 0 … 0 0; 0 0 … 0 0; … ; 0 0 … 0 0; 0 0 … 0 0], [0 0 … 0 0; 0 0 … 0 0; … ; 0 0 … 0 0; 0 0 … 0 0])
julia> BTT == BT
true
julia> ATT == AT
true

There is bounds error as seen in #306.

Near-term use of this BBQLDPC: This pr will be helpful as BBLDPC code is a special case of LiftedProduct code as described the authors as follows: "We note that the code QC(A,B) can be viewed as a special case of the Lifted Product construction [54] based on the abelian group Z_ℓ × Z_m. Here Z_j denotes the cyclic group of order j." Maybe in the near-future, LiftedProduct code can be tested by using BBQLPC 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):

  • 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.

If possible, keep your git history not too wild (rebase and squash commits, keep commits small and semantically separated) so that review is easier.

@Fe-r-oz Fe-r-oz changed the title bivariate bicycle quantum LDPC code bivariate bicycle quantum ldpc code Sep 2, 2024
@Fe-r-oz Fe-r-oz marked this pull request as ready for review September 3, 2024 20:23
@Fe-r-oz
Copy link
Contributor Author

Fe-r-oz commented Sep 4, 2024

Acknowledgement: I am very thankful to Claus from Oscar. He suggested a robust method to calculate the intersection of two kernels, ker(A) ∩ ker(B). This helped to construct a cross-reference check.

Downgrade error is occuring because hom is not present in Nemo's earlier versions. Probably, have to remove 0.42, 0.43, etc. Spell Error is occuring because of using Nemo: hom where hom is homomorphism

@Fe-r-oz
Copy link
Contributor Author

Fe-r-oz commented Sep 4, 2024

@royess, two days ago, I completed the BBQLDPC code. This can serve as a correctness check for LiftedProduct code as stated in the Bravyi paper, as BBQLDPC is a special case of the LiftedProduct code. I have also added correctness tests based on techniques suggested by Oscar fellows for this code.

These might be interesting to you: A new QLDPC decoder released today: BPOTF (It's a C++ decoder) and this #14 (comment).

@Fe-r-oz
Copy link
Contributor Author

Fe-r-oz commented Sep 5, 2024

@Krastanov, pinging for review. All the code constructions given in the paper I shared have been verified for BBQLDPC code. Furthermore, I have added cross-reference checks as well. To ensure robustness, I have also discussed (#352 (comment)) this with dear Oscar fellows whose guidance have been helpful in designing robust cross-verification test over the last 2 days. The code interface is user-friendly as well.

P.S Downgrade error is occuring because hom is not present in Nemo's earlier versions. Probably, have to remove 0.42, 0.43, etc. Spell Error is occuring because of using Nemo: hom where hom is homomorphism

@Fe-r-oz
Copy link
Contributor Author

Fe-r-oz commented Sep 6, 2024

Referring to #353 to monitor progress.

@Fe-r-oz
Copy link
Contributor Author

Fe-r-oz commented Sep 9, 2024

Referring to #356 as BB QLDPC can be viewed as a special case of LiftedProduct (please see comment: #352 (comment)) , so this PR serves as a correctness check for the latter codes, if desired.

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