Skip to content

Commit

Permalink
using Hecke's Small Groups without any extra relations for single cyc…
Browse files Browse the repository at this point in the history
…lic groups
  • Loading branch information
Fe-r-oz committed Oct 28, 2024
1 parent f3eb7cd commit cba74cb
Show file tree
Hide file tree
Showing 3 changed files with 128 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ext/QuantumCliffordHeckeExt/QuantumCliffordHeckeExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
multiplication_table, coefficients, abelian_group, group_algebra, small_group, one
import Nemo
import Nemo: characteristic, matrix_repr, GF, ZZ, lift

Expand Down
37 changes: 36 additions & 1 deletion ext/QuantumCliffordHeckeExt/lifted_product.jl
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,43 @@ code_s(c::LPCode) = size(c.repr(zero(c.GA)), 1) * (size(c.A, 1) * size(c.B, 1) +
Two-block group algebra (2GBA) codes, which are a special case of lifted product codes
from two group algebra elements `a` and `b`, used as `1x1` base matrices.
# Example
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`.
```jldoctest
julia> import Hecke: group_algebra, GF, abelian_group, gens, small_group, one; # hide
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));
julia> r^30 == 1 # presentation ⟨r|r³⁰⟩ satisfied
true
julia> a_elts = [one(G), r^10, r^6, r^13];
julia> b_elts = [one(G), r^25, r^16, r^12];
julia> a = sum(GA(x) for x in a_elts);
julia> b = sum(GA(x) for x in b_elts);
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)
""" # TODO doctest example
"""
function two_block_group_algebra_codes(a::GroupAlgebraElem, b::GroupAlgebraElem)
A = reshape([a], (1, 1))
B = reshape([b], (1, 1))
Expand Down
91 changes: 91 additions & 0 deletions test/test_ecc_small_groups.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
@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_elts = [one(G), r^28]
b_elts = [one(G), r, r^18, r^12, r^29, r^14]
a = sum(GA(x) for x in a_elts)
b = sum(GA(x) for x in b_elts)
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_elts = [one(G), r, r^3, r^7]
b_elts = [one(G), r, r^12, r^19]
a = sum(GA(x) for x in a_elts)
b = sum(GA(x) for x in b_elts)
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_elts = [one(G), r^10, r^6, r^13]
b_elts = [one(G), r^25, r^16, r^12]
a = sum(GA(x) for x in a_elts)
b = sum(GA(x) for x in b_elts)
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_elts = [one(G), r^15, r^16, r^18]
b_elts = [one(G), r, r^24, r^27]
a = sum(GA(x) for x in a_elts)
b = sum(GA(x) for x in b_elts)
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_elts = [one(G), r^9, r^28, r^31]
b_elts = [one(G), r, r^21, r^34]
a = sum(GA(x) for x in a_elts)
b = sum(GA(x) for x in b_elts)
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_elts = [one(G), r^9, r^28, r^13]
b_elts = [one(G), r, r^3, r^22]
a = sum(GA(x) for x in a_elts)
b = sum(GA(x) for x in b_elts)
c = two_block_group_algebra_codes(a,b)
@test code_n(c) == 72 && code_k(c) == 10
end
end

0 comments on commit cba74cb

Please sign in to comment.