diff --git a/docs/src/references.bib b/docs/src/references.bib index 29500a034..469e2a580 100644 --- a/docs/src/references.bib +++ b/docs/src/references.bib @@ -487,3 +487,14 @@ @article{anderson2014fault year={2014}, publisher={APS} } + +@article{lin2024quantum, + title={Quantum two-block group algebra codes}, + author={Lin, Hsiang-Ku and Pryadko, Leonid P}, + journal={Physical Review A}, + volume={109}, + number={2}, + pages={022407}, + year={2024}, + publisher={APS} +} diff --git a/docs/src/references.md b/docs/src/references.md index 35e944a21..415050bf9 100644 --- a/docs/src/references.md +++ b/docs/src/references.md @@ -40,6 +40,7 @@ For quantum code construction routines: - [steane1999quantum](@cite) - [campbell2012magic](@cite) - [anderson2014fault](@cite) +- [lin2024quantum](@cite) For classical code construction routines: - [muller1954application](@cite) diff --git a/ext/QuantumCliffordHeckeExt/lifted_product.jl b/ext/QuantumCliffordHeckeExt/lifted_product.jl index 97e41b044..ac415972f 100644 --- a/ext/QuantumCliffordHeckeExt/lifted_product.jl +++ b/ext/QuantumCliffordHeckeExt/lifted_product.jl @@ -139,11 +139,23 @@ code_n(c::LPCode) = size(c.repr(zero(c.GA)), 2) * (size(c.A, 2) * size(c.B, 1) + code_s(c::LPCode) = size(c.repr(zero(c.GA)), 1) * (size(c.A, 1) * size(c.B, 1) + size(c.A, 2) * size(c.B, 2)) """ -Two-block group algebra (2GBA) codes, which are a special case of lifted product codes +Two-block group algebra (2BGA) codes, which are a special case of lifted product codes from two group algebra elements `a` and `b`, used as `1x1` base matrices. +[[70, 8, 10]] 2BGA code from Table 1 of [lin2024quantum](@cite) with cyclic group of +order `l = 35`. + +```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) +``` + See also: [`LPCode`](@ref), [`generalized_bicycle_codes`](@ref), [`bicycle_codes`](@ref) -""" # TODO doctest example +""" function two_block_group_algebra_codes(a::GroupAlgebraElem, b::GroupAlgebraElem) A = reshape([a], (1, 1)) B = reshape([b], (1, 1)) @@ -151,7 +163,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 2BGA 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`. @@ -166,8 +178,9 @@ julia> code_n(c), code_k(c) (254, 28) ``` """ # TODO doctest example -function generalized_bicycle_codes(a_shifts::Array{Int}, b_shifts::Array{Int}, l::Int) - GA = group_algebra(GF(2), abelian_group(l)) +function generalized_bicycle_codes(a_shifts::Array{Int}, b_shifts::Array{Int}, sg::Tuple{Int,Int}) + l, i = sg + GA = group_algebra(GF(2), Hecke.small_group(l, i)) a = sum(GA[n%l+1] for n in a_shifts) b = sum(GA[n%l+1] for n in b_shifts) two_block_group_algebra_codes(a, b) diff --git a/test/test_ecc_2bga.jl b/test/test_ecc_2bga.jl new file mode 100644 index 000000000..f05e6204b --- /dev/null +++ b/test/test_ecc_2bga.jl @@ -0,0 +1,16 @@ +@testitem "ECC 2BGA" begin + using Hecke + using QuantumClifford.ECC: generalized_bicycle_codes, code_k, code_n + + # codes taken from Table 1 of [lin2024quantum](@cite) + @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