Skip to content

Commit

Permalink
Coprime Bivariate Bicycle code via Hecke's Group Algebra (#378)
Browse files Browse the repository at this point in the history

Co-authored-by: Stefan Krastanov <[email protected]>
  • Loading branch information
Fe-r-oz and Krastanov authored Nov 5, 2024
1 parent 138e008 commit be34f16
Show file tree
Hide file tree
Showing 5 changed files with 114 additions and 1 deletion.
7 changes: 7 additions & 0 deletions docs/src/references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,13 @@ @article{lin2024quantum
publisher={APS}
}

@article{wang2024coprime,
title={Coprime Bivariate Bicycle Codes and their Properties},
author={Wang, Ming and Mueller, Frank},
journal={arXiv preprint arXiv:2408.10001},
year={2024}
}

@misc{voss2024multivariatebicyclecodes,
title={Multivariate Bicycle Codes},
author={Lukas Voss and Sim Jian Xian and Tobias Haug and Kishor Bharti},
Expand Down
1 change: 1 addition & 0 deletions docs/src/references.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ For quantum code construction routines:
- [steane1999quantum](@cite)
- [campbell2012magic](@cite)
- [anderson2014fault](@cite)
- [wang2024coprime](@cite)
- [voss2024multivariatebicyclecodes](@cite)
- [lin2024quantum](@cite)
- [bravyi2024high](@cite)
Expand Down
27 changes: 27 additions & 0 deletions ext/QuantumCliffordHeckeExt/lifted_product.jl
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ julia> c = two_block_group_algebra_codes(A,B);
julia> code_n(c), code_k(c)
(756, 16)
```
### Multivariate Bicycle code
The group algebra of the qubit multivariate bicycle (MB) code with r variables is `𝔽₂[𝐺ᵣ]`,
Expand All @@ -231,6 +232,32 @@ julia> code_n(c), code_k(c)
(48, 4)
```
### Coprime Bivariate Bicycle code
The coprime bivariate bicycle (BB) codes are defined by two polynomials `𝑎(𝑥,𝑦)` and `𝑏(𝑥,𝑦)`,
where `𝑙` and `𝑚` are coprime, and can be expressed as univariate polynomials `𝑎(𝜋)` and `𝑏(𝜋)`,
with generator `𝜋 = 𝑥𝑦`. They can be viewed as a special case of Lifted Product construction
based on abelian group `ℤₗ x ℤₘ` where `ℤⱼ` cyclic group of order `j`.
[108, 12, 6]] coprime-bivariate bicycle (BB) code from Table 2 of [wang2024coprime](@cite).
```jldoctest
julia> import Hecke: group_algebra, GF, abelian_group, gens;
julia> l=2; m=27;
julia> GA = group_algebra(GF(2), abelian_group([l*m]));
julia> 𝜋 = gens(GA)[1];
julia> A = 𝜋^2 + 𝜋^5 + 𝜋^44;
julia> B = 𝜋^8 + 𝜋^14 + 𝜋^47;
(108, 12)
```
See also: [`LPCode`](@ref), [`generalized_bicycle_codes`](@ref), [`bicycle_codes`](@ref).
"""
function two_block_group_algebra_codes(a::GroupAlgebraElem, b::GroupAlgebraElem)
Expand Down
21 changes: 20 additions & 1 deletion test/test_ecc_base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,25 @@ A[LinearAlgebra.diagind(A, 5)] .= GA(1)
B = reshape([1 + x + x^6], (1, 1))
push!(other_lifted_product_codes, LPCode(A, B))

# coprime Bivariate Bicycle codes from Table 2 of [wang2024coprime](@cite)
# [[108,12,6]]
l=2; m=27
GA = group_algebra(GF(2), abelian_group([l*m]))
𝜋 = gens(GA)[1]
A = 𝜋^2 + 𝜋^5 + 𝜋^44
B = 𝜋^8 + 𝜋^14 + 𝜋^47
coprimeBB1 = two_block_group_algebra_codes(A, B)

# [[126,12,10]]
l=7; m=9
GA = group_algebra(GF(2), abelian_group([l*m]))
𝜋 = gens(GA)[1]
A = 1 + 𝜋 + 𝜋^58
B = 𝜋^3 + 𝜋^16 + 𝜋^44
coprimeBB2 = two_block_group_algebra_codes(A, B)

test_coprimeBB_codes = [coprimeBB1, coprimeBB2]

# Multivariate Bicycle codes taken from Table 1 of [voss2024multivariatebicyclecodes](@cite)
# Weight-4 [[144, 2, 12]] MBB code
l=8; m=9
Expand Down Expand Up @@ -131,7 +150,7 @@ const code_instance_args = Dict(
:CSS => (c -> (parity_checks_x(c), parity_checks_z(c))).([Shor9(), Steane7(), Toric(4, 4)]),
:Concat => [(Perfect5(), Perfect5()), (Perfect5(), Steane7()), (Steane7(), Cleve8()), (Toric(2, 2), Shor9())],
:CircuitCode => random_circuit_code_args,
:LPCode => (c -> (c.A, c.B)).(vcat(LP04, LP118, test_gb_codes, test_bb_codes, test_mbb_codes, other_lifted_product_codes)),
:LPCode => (c -> (c.A, c.B)).(vcat(LP04, LP118, test_gb_codes, test_bb_codes, test_mbb_codes, test_coprimeBB_codes, other_lifted_product_codes)),
:QuantumReedMuller => [3, 4, 5]
)

Expand Down
59 changes: 59 additions & 0 deletions test/test_ecc_coprime_bivaraite_bicycle.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
@testitem "ECC coprime Bivaraite Bicycle" begin
using Nemo
using Nemo: gcd
using Hecke
using Hecke: group_algebra, GF, abelian_group, gens
using QuantumClifford.ECC: two_block_group_algebra_codes, code_k, code_n

@testset "Reproduce Table 2 wang2024coprime" begin
# [[30,4,6]]
l=3; m=5;
GA = group_algebra(GF(2), abelian_group([l*m]))
𝜋 = gens(GA)[1]
A = 1 + 𝜋 + 𝜋^2
B = 𝜋 + 𝜋^3 + 𝜋^8
c = two_block_group_algebra_codes(A, B)
@test gcd([l,m]) == 1
@test code_n(c) == 30 && code_k(c) == 4

# [[42,6,6]]
l=3; m=7;
GA = group_algebra(GF(2), abelian_group([l*m]))
𝜋 = gens(GA)[1]
A = 1 + 𝜋^2 + 𝜋^3
B = 𝜋 + 𝜋^3 + 𝜋^11
c = two_block_group_algebra_codes(A, B)
@test gcd([l,m]) == 1
@test code_n(c) == 42 && code_k(c) == 6

# [[70,6,8]]
l=5; m=7;
GA = group_algebra(GF(2), abelian_group([l*m]))
𝜋 = gens(GA)[1]
A = 1 + 𝜋 + 𝜋^5;
B = 1 + 𝜋 + 𝜋^12;
c = two_block_group_algebra_codes(A, B)
@test gcd([l,m]) == 1
@test code_n(c) == 70 && code_k(c) == 6

# [[108,12,6]]
l=2; m=27;
GA = group_algebra(GF(2), abelian_group([l*m]))
𝜋 = gens(GA)[1]
A = 𝜋^2 + 𝜋^5 + 𝜋^44
B = 𝜋^8 + 𝜋^14 + 𝜋^47
c = two_block_group_algebra_codes(A, B)
@test gcd([l,m]) == 1
@test code_n(c) == 108 && code_k(c) == 12

# [[126,12,10]]
l=7; m=9
GA = group_algebra(GF(2), abelian_group([l*m]))
𝜋 = gens(GA)[1]
A = 1 + 𝜋 + 𝜋^58
B = 𝜋^3 + 𝜋^16 + 𝜋^44
c = two_block_group_algebra_codes(A, B)
@test gcd([l,m]) == 1
@test code_n(c) == 126 && code_k(c) == 12
end
end

0 comments on commit be34f16

Please sign in to comment.