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

[[8rp, (8r − 2)p − 2m, 4]] Delfosse-Reichardt code #466

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

Conversation

Fe-r-oz
Copy link
Contributor

@Fe-r-oz Fe-r-oz commented Jan 22, 2025

The paper Short Shor-style syndrome sequences has many interesting generalized quantum codes from base that could be implemented. This PR implements the second code: [[8p, 6(p-1), 4]] Delfosse Generalized [8,4,4] code. This is one of the generalized codes that were developed by Delfosse and Reichardt. The first quantum stabilizer code is implemented in #465

Interestingly, ECC Zoo don't have entries for these 'generalized codes' yet. These codes are tested using the test_ecc_base.jl for properties checkup. These codes were defined as [[8p, 6(p-1), 4]] codes so I named them DelfosseGeneralized844. Internally, it uses extended blocks of [8,4,4] Reed Muller code.

Please find the following schematics for these codes:

display

What's left is to add some explicit tests from the paper.

  • 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 changed the title [[8p, 6(p-1), 4]] Delfosse Generalized [8,4,4] code [[8p, 6(p-1), 4]] Delfosse Generalized [8,4,4] code Jan 22, 2025
@Fe-r-oz
Copy link
Contributor Author

Fe-r-oz commented Jan 22, 2025

Delfosse and Reichardt uses:

  • [8, 4, 4] Reed-Muller code to create [[8p, 6(p−1), 4 ]] self-dual CSS quantum codes, for p ≥ 2
  • [16,11, 4] Reed-Muller code to create [[16p, 14p − 8, 4]] self-dual CSS quantum codes, for p ≥ 1

Currently(105877a), I have implemented the Delfosse Generalized [8,4,4] code as [[8p, 6(p-1), 4]] quantum stabilizer code. The next step is to create the second bullet-point code.

To enhance the flexibility of the code, a better approach would be to generalize these codes using the Reed-Muller code as the base matrix. Instead of hardcoding the [8,4,4] or [16,11, 4] Reed-Muller codes as base matrices, we could allow users to input parameters r and m, making the code more generalized.

So, we can invent :) the following code: [[8rp, (8r−2)p−2m, 4]] Delfosse Generalized ReedMuller code

  • [8, 4, 4] Reed-Muller code to create[[8p, 6(p−1), 4 ]]self-dual CSS quantum codes, for p ≥ 2
    [8,4,4] base code, r =1, m =3
julia> parity_checks(ReedMuller(1,3))
4×8 Matrix{Bool}:
 1  1  1  1  1  1  1  1
 1  1  1  1  0  0  0  0
 1  1  0  0  1  1  0  0
 1  0  1  0  1  0  1  0

[[8×1×p = 8p, (8-2)×p - 2×3 = 6p - 6 = 6(p-1), 4]] quantum stabilizer code which is the same as [[8p, 6(p−1), 4 ]]

  • [16,11, 4] Reed-Muller code to create [[16p, 14p − 8, 4]] self-dual CSS quantum codes, for p ≥ 1

[16, 11,4] base code, r =2, m =4

julia> parity_checks(ReedMuller(2,4))
5×16 Matrix{Bool}:
 1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1
 1  1  1  1  1  1  1  1  0  0  0  0  0  0  0  0
 1  1  1  1  0  0  0  0  1  1  1  1  0  0  0  0
 1  1  0  0  1  1  0  0  1  1  0  0  1  1  0  0
 1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0

[[8×2p = 16p, (16-2)×p - 2×4 = 14p - 8, 4]] quantum stabilizer code which is the same as [[16p, 14p − 8, 4]]

@Fe-r-oz Fe-r-oz changed the title [[8p, 6(p-1), 4]] Delfosse Generalized [8,4,4] code [[8rp, (8r − 2)p − 2m, 4]] Delfosse Generalized Reed-Muller code Jan 22, 2025
@Fe-r-oz
Copy link
Contributor Author

Fe-r-oz commented Jan 22, 2025

Please find the schematic for [[8rp, (8r − 2)p − 2m, 4]] Delfosse Generalized Reed-Muller code
display

codes = [DelfosseGeneralizedReedMuller(2, 1, 3),
         DelfosseGeneralizedReedMuller(4, 1, 3),
         DelfosseGeneralizedReedMuller(6, 1, 3),
         DelfosseGeneralizedReedMuller(2, 2, 4),
         DelfosseGeneralizedReedMuller(4, 2, 4),
         DelfosseGeneralizedReedMuller(6, 2, 4),]

display

@Fe-r-oz Fe-r-oz marked this pull request as ready for review January 22, 2025 18:41
Copy link

codecov bot commented Jan 22, 2025

Codecov Report

Attention: Patch coverage is 75.67568% with 9 lines in your changes missing coverage. Please review.

Project coverage is 83.00%. Comparing base (0d13791) to head (4b49e50).

Files with missing lines Patch % Lines
src/ecc/codes/delfosse_reichardt_code.jl 75.67% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #466      +/-   ##
==========================================
+ Coverage   82.73%   83.00%   +0.26%     
==========================================
  Files          70       73       +3     
  Lines        4656     4700      +44     
==========================================
+ Hits         3852     3901      +49     
+ Misses        804      799       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Fe-r-oz
Copy link
Contributor Author

Fe-r-oz commented Jan 22, 2025

@Krastanov, Please help review this PR, thank you so much :)

There is a Julia error with allocated as it throws false negatives. So, I have commented out allocated that was throwing errors to avoid CI failures. 🙏🏼 Please find the detail about this Julia CI error here: #467

Edit:

P.S. Delfosse suggested to change the name to something else (changed to DelfosseReichardt to reflect the co-author as well) because we already have Generalized Reed-Muller code (this code family uses fancy operations) with 4b49e50 🙏🏼 In addition, Improved documentation and fixed typos with 2e008ae 🙏🏼

@Fe-r-oz Fe-r-oz changed the title [[8rp, (8r − 2)p − 2m, 4]] Delfosse Generalized Reed-Muller code [[8rp, (8r − 2)p − 2m, 4]] Delfosse-Reichardt code Jan 23, 2025
…ralized reed-muller code and the second author name is now included in the code similar to Reed-Muller
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