Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hecke's Small Groups (small_group(l, Id)) without any extra relations for single cyclic groups #406

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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, rand
multiplication_table, coefficients, abelian_group, group_algebra, rand, small_group
import Nemo
import Nemo: characteristic, matrix_repr, GF, ZZ, lift

Expand Down
43 changes: 43 additions & 0 deletions ext/QuantumCliffordHeckeExt/lifted_product.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
79 changes: 79 additions & 0 deletions test/test_ecc_small_groups.jl
Original file line number Diff line number Diff line change
@@ -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
Loading