diff --git a/ext/QuantumCliffordHeckeExt/lifted_product.jl b/ext/QuantumCliffordHeckeExt/lifted_product.jl index 21cd96481..a6b2df125 100644 --- a/ext/QuantumCliffordHeckeExt/lifted_product.jl +++ b/ext/QuantumCliffordHeckeExt/lifted_product.jl @@ -182,7 +182,7 @@ function two_block_group_algebra_codes(a::GroupAlgebraElem, b::GroupAlgebraElem) end """ -Generalized bicycle codes, which are a special case of 2GBA codes (and therefore of lifted product codes). +Generalized bicycle codes, which are a special case of *abelian* 2GBA codes (and therefore of lifted product codes). Here the group is chosen as the cyclic group of order `l`, and the base matrices `a` and `b` are the sum of the group algebra elements corresponding to the shifts `a_shifts` and `b_shifts`. @@ -196,6 +196,18 @@ julia> c = generalized_bicycle_codes([0, 15, 20, 28, 66], [0, 58, 59, 100, 121], julia> code_n(c), code_k(c) (254, 28) ``` + +An [[70, 8, 10]] *abelian* 2BGA code from Table 1 of [lin2024quantum](@cite), with cyclic group of +order `l = 35`, illustrates that *abelian* 2BGA codes can be viewed as GB codes. + +```jldoctest +julia> l = 35; + +julia> c1 = generalized_bicycle_codes([0, 15, 16, 18], [0, 1, 24, 27], l); + +julia> code_n(c1), code_k(c1) +(70, 8) +``` """ function generalized_bicycle_codes(a_shifts::Array{Int}, b_shifts::Array{Int}, l::Int) GA = group_algebra(GF(2), abelian_group(l)) diff --git a/test/test_ecc_generalized_bicycle_codes.jl b/test/test_ecc_generalized_bicycle_codes.jl new file mode 100644 index 000000000..c6e1f50bf --- /dev/null +++ b/test/test_ecc_generalized_bicycle_codes.jl @@ -0,0 +1,18 @@ +@testitem "ECC GB" begin + using Hecke + using QuantumClifford.ECC: generalized_bicycle_codes, code_k, code_n + + # codes taken from Table 1 of [lin2024quantum](@cite) + # Abelian 2BGA codes can be viewed as GB codes. + @test code_n(generalized_bicycle_codes([0 , 15, 16, 18], [0 , 1, 24, 27], 35)) == 70 + @test code_k(generalized_bicycle_codes([0 , 15, 16, 18], [0 , 1, 24, 27], 35)) == 8 + @test code_n(generalized_bicycle_codes([0 , 1, 3, 7], [0 , 1, 12, 19], 27)) == 54 + @test code_k(generalized_bicycle_codes([0 , 1, 3, 7], [0 , 1, 12, 19], 27)) == 6 + @test code_n(generalized_bicycle_codes([0 , 10, 6, 13], [0 , 25, 16, 12], 30)) == 60 + @test code_k(generalized_bicycle_codes([0 , 10, 6, 13], [0 , 25, 16, 12], 30)) == 6 + @test code_n(generalized_bicycle_codes([0 , 9, 28, 31], [0 , 1, 21, 34], 36)) == 72 + @test code_k(generalized_bicycle_codes([0 , 9, 28, 31], [0 , 1, 21, 34], 36)) == 8 + @test code_n(generalized_bicycle_codes([0 , 9, 28, 13], [0 , 1, 21, 34], 36)) == 72 + @test code_k(generalized_bicycle_codes([0 , 9, 28, 13], [0 , 1, 3, 22], 36)) == 10 + end +end