diff --git a/ext/QuantumCliffordHeckeExt/QuantumCliffordHeckeExt.jl b/ext/QuantumCliffordHeckeExt/QuantumCliffordHeckeExt.jl index 89d7bae0c..3eeec451f 100644 --- a/ext/QuantumCliffordHeckeExt/QuantumCliffordHeckeExt.jl +++ b/ext/QuantumCliffordHeckeExt/QuantumCliffordHeckeExt.jl @@ -5,7 +5,7 @@ using DocStringExtensions import QuantumClifford, LinearAlgebra import Hecke: Group, GroupElem, AdditiveGroup, AdditiveGroupElem, GroupAlgebra, GroupAlgebraElem, FqFieldElem, representation_matrix, dim, base_ring, - multiplication_table, coefficients, abelian_group, group_algebra, rand + multiplication_table, coefficients, abelian_group, group_algebra, rand, small_group import Nemo import Nemo: characteristic, matrix_repr, GF, ZZ, lift diff --git a/ext/QuantumCliffordHeckeExt/lifted_product.jl b/ext/QuantumCliffordHeckeExt/lifted_product.jl index e5c957229..2bab280d9 100644 --- a/ext/QuantumCliffordHeckeExt/lifted_product.jl +++ b/ext/QuantumCliffordHeckeExt/lifted_product.jl @@ -265,6 +265,49 @@ julia> code_n(c), code_k(c) (108, 12) ``` +### Small Groups + +An abelian `[[60, 6, 10]]` 2BGA code of order `l = 30` with group ID `4`, represented +by the group presentation `⟨r | r³⁰⟩`, constructed via `Hecke.small_group(4,30)`. Note: +Hecke's small groups are limited in scope and should only be used for single cyclic groups. + +```jldoctest sg +julia> import Hecke: group_algebra, GF, abelian_group, gens, small_group; using QuantumClifford.ECC; + +julia> l = 30; + +julia> group_id = 4; + +julia> G = small_group(l, group_id); + +julia> GA = group_algebra(GF(2), G); + +julia> r = prod(gens(GA)); +``` + +!!! note When using `Hecke.small_group`, it is essential to verify that the +presentation for the single cyclic group is satisfied before proceeding with +the code construction. This method serves as a workaround for creating small +groups, specifically for single cyclic groups, using a group presentation with +*no extra relations*, such as `⟨r | r³⁰⟩`. For the construction of *general* +groups with specific group presentations, the only effective method is to use +*finitely presented groups* (`Oscar.FPGroup`), which allow for defining direct +products of two or more *general* groups—something not supported by Hecke. + +```jldoctest sg +julia> r^30 == 1 +true + +julia> A = 1 + r^10 + r^6 + r^13; + +julia> B = 1 + r^25 + r^16 + r^12; + +julia> c = two_block_group_algebra_codes(A,B); + +julia> code_n(c), code_k(c) +(60, 6) +``` + See also: [`LPCode`](@ref), [`generalized_bicycle_codes`](@ref), [`bicycle_codes`](@ref), [`haah_cubic_codes`](@ref). """ function two_block_group_algebra_codes(a::GroupAlgebraElem, b::GroupAlgebraElem) diff --git a/test/test_ecc_small_groups.jl b/test/test_ecc_small_groups.jl new file mode 100644 index 000000000..f8b505d98 --- /dev/null +++ b/test/test_ecc_small_groups.jl @@ -0,0 +1,79 @@ +@testitem "ECC 2BGA Hecke Small Groups" begin + using Hecke: group_algebra, GF, abelian_group, gens, quo, one, GroupAlgebra, small_group + using QuantumClifford.ECC + using QuantumClifford.ECC: code_k, code_n, two_block_group_algebra_codes + + @testset "Hecke Small Groups without extra relations for single cyclic groups" begin + # [[72, 8, 9]] + l = 36 + group_id = 2 + G = small_group(l, group_id) + GA = group_algebra(GF(2), G) + r = prod(gens(GA)) + @test r^36 == 1 # presentation ⟨r|r³⁶⟩ satisfied + A = 1 + r^28 + B = 1 + r + r^18 + r^12 + r^29 + r^14 + c = two_block_group_algebra_codes(A,B) + @test code_n(c) == 72 && code_k(c) == 8 + + # [[54, 6, 9]] + l = 27 + group_id = 1 + G = small_group(l, group_id) + GA = group_algebra(GF(2), G) + r = prod(gens(GA)) + @test r^27 == 1 # presentation ⟨r|r²⁷⟩ satisfied + A = 1 + r + r^3 + r^7 + B = 1 + r + r^12 + r^19 + c = two_block_group_algebra_codes(A,B) + @test code_n(c) == 54 && code_k(c) == 6 + + # [[60, 6, 10]] + l = 30 + group_id = 4 + G = small_group(l, group_id) + GA = group_algebra(GF(2), G) + r = prod(gens(GA)) + @test r^30 == 1 # presentation ⟨r|r³⁰⟩ satisfied + A = 1 + r^10 + r^6 + r^13 + B = 1 + r^25 + r^16 + r^12 + c = two_block_group_algebra_codes(A,B) + @test code_n(c) == 60 && code_k(c) == 6 + + # [[70, 8, 10]] + l = 35 + group_id = 1 + G = small_group(l, group_id) + GA = group_algebra(GF(2), G) + r = prod(gens(GA)) + @test r^35 == 1 # presentation ⟨r|r³⁵⟩ satisfied + A = 1 + r^15 + r^16 + r^18 + B = 1 + r + r^24 + r^27 + c = two_block_group_algebra_codes(A,B) + @test code_n(c) == 70 && code_k(c) == 8 + + # [[72, 8, 10]] + l = 36 + group_id = 2 + G = small_group(l, group_id) + GA = group_algebra(GF(2), G) + r = prod(gens(GA)) + @test r^36 == 1 # presentation ⟨r|r³⁶⟩ satisfied + A = 1 + r^9 + r^28 + r^31 + B = 1 + r + r^21 + r^34 + c = two_block_group_algebra_codes(A,B) + @test code_n(c) == 72 && code_k(c) == 8 + + # [[72, 10, 9]] + l = 36 + group_id = 2 + G = small_group(l, group_id) + GA = group_algebra(GF(2), G) + r = prod(gens(GA)) + @test r^36 == 1 # presentation ⟨r|r³⁶⟩ satisfied + A = 1 + r^9 + r^28 + r^13 + B = 1 + r + r^3 + r^22 + c = two_block_group_algebra_codes(A,B) + @test code_n(c) == 72 && code_k(c) == 10 + end +end