Skip to content

Commit c4ae010

Browse files
committed
Group Presentation via Oscar Free Group
1 parent 6304dc6 commit c4ae010

File tree

2 files changed

+253
-42
lines changed

2 files changed

+253
-42
lines changed

ext/QuantumCliffordHeckeExt/lifted_product.jl

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -161,48 +161,6 @@ function two_block_group_algebra_codes(a::GroupAlgebraElem, b::GroupAlgebraElem)
161161
LPCode(A, B)
162162
end
163163

164-
"""
165-
[[72, 8, 9]] 2BGA code from Table 1 of [lin2024quantum](@cite) with direct product
166-
of `C₉ x C₄`.
167-
168-
```jldoctest
169-
julia> c = two_block_group_algebra_codes([0, 28], [0, 9, 18, 12, 29, 14], (36, 2));
170-
171-
julia> code_n(c), code_k(c)
172-
(72, 8)
173-
```
174-
"""
175-
function two_block_group_algebra_codes(a_shifts::Array{Int}, b_shifts::Array{Int}, sg::Tuple{Int,Int})
176-
m, i = sg
177-
g1 = small_group(m, i)
178-
GA = group_algebra(GF(2), g1)
179-
a = sum(GA[n%dim(GA)+1] for n in a_shifts)
180-
b = sum(GA[n%dim(GA)+1] for n in b_shifts)
181-
two_block_group_algebra_codes(a, b)
182-
end
183-
184-
"""
185-
[[48, 8, 6]] 2BGA code from Table 3 of [lin2024quantum](@cite) with dihedral group of
186-
order `l = 12`.
187-
188-
```jldoctest
189-
julia> c = two_block_group_algebra_codes([0, 10], [0, 8, 9, 4, 2, 5], (12, 4), (2, 1));
190-
191-
julia> code_n(c), code_k(c)
192-
(48, 8)
193-
```
194-
"""
195-
function two_block_group_algebra_codes(a_shifts::Array{Int}, b_shifts::Array{Int}, sg1::Tuple{Int,Int}, sg2::Tuple{Int,Int})
196-
m, i = sg1
197-
l, i = sg2
198-
g1 = small_group(m, i)
199-
g2 = small_group(l, i)
200-
GA = group_algebra(GF(2), direct_product(g1, g2))
201-
a = sum(GA[n%dim(GA)+1] for n in a_shifts)
202-
b = sum(GA[n%dim(GA)+1] for n in b_shifts)
203-
two_block_group_algebra_codes(a, b)
204-
end
205-
206164
"""
207165
Generalized bicycle codes, which are a special case of 2GBA codes (and therefore of lifted product codes).
208166
Here the group is chosen as the cyclic group of order `l`,

test/test_ecc_nonabelin2bga.jl

Lines changed: 253 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,253 @@
1+
@testitem "ECC 2BGA lin2024quantum" begin
2+
import Hecke: group_algebra, GF, abelian_group, gens, quo, one
3+
using QuantumClifford.ECC: LPCode, code_k, code_n, two_block_group_algebra_codes
4+
using Oscar: free_group, small_group_identification, describe
5+
6+
@testset "Reproduce Table 1 Block 1" begin
7+
# [[72, 8, 9]]
8+
F = free_group(["r"])
9+
r = gens(F)[1]
10+
G, = quo(F, [r^36])
11+
F2G = group_algebra(GF(2), G)
12+
r = gens(G)[1]
13+
a_elts = [one(G), r^28]
14+
b_elts = [one(G), r, r^18, r^12, r^29, r^14]
15+
a = sum(F2G(x) for x in a_elts)
16+
b = sum(F2G(x) for x in b_elts)
17+
c = two_block_group_algebra_codes(a, b)
18+
@test describe(G) == "C36"
19+
@test small_group_identification(G) == (36, 2)
20+
@test code_n(c) == 72 && code_k(c) == 8
21+
end
22+
23+
@testset "Reproduce Table 1 Block 2" begin
24+
# [[72, 8, 9]]
25+
F = free_group(["r", "s"])
26+
r, s = gens(F)
27+
G, = quo(F, [s^4, r^9, s^(-1)*r*s*r])
28+
F2G = group_algebra(GF(2), G)
29+
r, s = gens(G)
30+
a_elts = [one(G), r]
31+
b_elts = [one(G), s, r^6, s^3 * r, s * r^7, s^3 * r^5]
32+
a = sum(F2G(x) for x in a_elts)
33+
b = sum(F2G(x) for x in b_elts)
34+
c = two_block_group_algebra_codes(a, b)
35+
@test describe(G) == "C9 : C4"
36+
@test small_group_identification(G) == (36, 1)
37+
@test code_n(c) == 72 && code_k(c) == 8
38+
39+
# [[80, 8, 10]]
40+
F = free_group(["r", "s"])
41+
r, s = gens(F)
42+
G, = quo(F, [s^5, r^8, r^(-1)*s*r*s])
43+
F2G = group_algebra(GF(2), G)
44+
r, s = gens(G)
45+
a_elts = [one(G), s*r^4]
46+
b_elts = [one(G), r, r^2, s, s^3 * r, s^2 * r^6]
47+
a = sum(F2G(x) for x in a_elts)
48+
b = sum(F2G(x) for x in b_elts)
49+
c = two_block_group_algebra_codes(a, b)
50+
@test describe(G) == "C5 : C8"
51+
@test small_group_identification(G) == (40, 1)
52+
@test code_n(c) == 80 && code_k(c) == 8
53+
54+
# [[96, 8, 12]]
55+
F = free_group(["r", "s"])
56+
r, s = gens(F)
57+
G, = quo(F, [s^6, r^8, (r*s)^8])
58+
F2G = group_algebra(GF(2), G)
59+
r, s = gens(G)
60+
a_elts = [one(G), s*r^2]
61+
b_elts = [one(G), r, s^3, s^4, s^2 * r^5, s^4 * r^6]
62+
a = sum(F2G(x) for x in a_elts)
63+
b = sum(F2G(x) for x in b_elts)
64+
c = two_block_group_algebra_codes(a, b)
65+
@test describe(G) == "C5 : C8"
66+
@test small_group_identification(G) == (40, 1)
67+
@test code_n(c) == 80 && code_k(c) == 8
68+
end
69+
70+
@testset "Reproduce Table 1 Block 3" begin
71+
# [[54, 6, 9]]
72+
F = free_group(["r"])
73+
r = gens(F)[1]
74+
G, = quo(F, [r^27])
75+
F2G = group_algebra(GF(2), G)
76+
r = gens(G)[1]
77+
a_elts = [one(G), r, r^3, r^7]
78+
b_elts = [one(G), r, r^12, r^19]
79+
a = sum(F2G(x) for x in a_elts);
80+
b = sum(F2G(x) for x in b_elts)
81+
c = two_block_group_algebra_codes(a, b)
82+
@test describe(G) == "C27"
83+
@test small_group_identification(G) == (27, 1)
84+
@test code_n(c) == 54 && code_k(c) == 6
85+
86+
# [[60, 6, 10]]
87+
F = free_group(["r"])
88+
r = gens(F)[1]
89+
G, = quo(F, [r^30])
90+
F2G = group_algebra(GF(2), G)
91+
r = gens(G)[1]
92+
a_elts = [one(G), r^10, r^6, r^13]
93+
b_elts = [one(G), r^25, r^16, r^12]
94+
a = sum(F2G(x) for x in a_elts);
95+
b = sum(F2G(x) for x in b_elts)
96+
c = two_block_group_algebra_codes(a, b)
97+
@test describe(G) == "C30"
98+
@test small_group_identification(G) == (30, 4)
99+
@test code_n(c) == 60 && code_k(c) == 6
100+
101+
# [[70, 8, 10]]
102+
F = free_group(["r"])
103+
r = gens(F)[1]
104+
G, = quo(F, [r^35])
105+
F2G = group_algebra(GF(2), G)
106+
r = gens(G)[1]
107+
a_elts = [one(G), r^15, r^16, r^18]
108+
b_elts = [one(G), r, r^24, r^27]
109+
a = sum(F2G(x) for x in a_elts);
110+
b = sum(F2G(x) for x in b_elts)
111+
c = two_block_group_algebra_codes(a, b)
112+
@test describe(G) == "C35"
113+
@test small_group_identification(G) == (35, 1)
114+
@test code_n(c) == 70 && code_k(c) == 8
115+
116+
# [[72, 8, 10]]
117+
F = free_group(["r"])
118+
r = gens(F)[1]
119+
G, = quo(F, [r^36])
120+
F2G = group_algebra(GF(2), G)
121+
r = gens(G)[1]
122+
a_elts = [one(G), r^9, r^28, r^31]
123+
b_elts = [one(G), r, r^21, r^34]
124+
a = sum(F2G(x) for x in a_elts);
125+
b = sum(F2G(x) for x in b_elts)
126+
c = two_block_group_algebra_codes(a, b)
127+
@test describe(G) == "C36"
128+
@test small_group_identification(G) == (36, 2)
129+
@test code_n(c) == 72 && code_k(c) == 8
130+
131+
# [[72, 10, 9]]
132+
F = free_group(["r"])
133+
r = gens(F)[1]
134+
G, = quo(F, [r^36])
135+
F2G = group_algebra(GF(2), G)
136+
r = gens(G)[1]
137+
a_elts = [one(G), r^9, r^28, r^13]
138+
b_elts = [one(G), r, r^3, r^22]
139+
a = sum(F2G(x) for x in a_elts);
140+
b = sum(F2G(x) for x in b_elts)
141+
c = two_block_group_algebra_codes(a, b)
142+
@test describe(G) == "C36"
143+
@test small_group_identification(G) == (36, 2)
144+
@test code_n(c) == 72 && code_k(c) == 10
145+
end
146+
147+
@testset "Reproduce Table 1 Block 4" begin
148+
# [[72, 8, 9]]
149+
F = free_group(["r", "s"])
150+
r, s = gens(F)
151+
G, = quo(F, [s^4, r^9, s^(-1)*r*s*r])
152+
F2G = group_algebra(GF(2), G)
153+
r, s = gens(G)
154+
a_elts = [one(G), s, r, s*r^6]
155+
b_elts = [one(G), s^2*r, s^2*r^6, r^2]
156+
a = sum(F2G(x) for x in a_elts);
157+
b = sum(F2G(x) for x in b_elts)
158+
c = two_block_group_algebra_codes(a, b)
159+
@test describe(G) == "C9 : C4"
160+
@test small_group_identification(G) == (36, 1)
161+
@test code_n(c) == 72 && code_k(c) == 8
162+
163+
# [[80, 8, 10]]
164+
F = free_group(["r", "s"])
165+
r, s = gens(F)
166+
G, = quo(F, [s^5, r^8, r^(-1)*s*r*s])
167+
F2G = group_algebra(GF(2), G)
168+
r, s = gens(G)
169+
a_elts = [one(G), r, s, s^3*r^5]
170+
b_elts = [one(G), r^2, s*r^4, s^3*r^2]
171+
a = sum(F2G(x) for x in a_elts)
172+
b = sum(F2G(x) for x in b_elts)
173+
c = two_block_group_algebra_codes(a, b)
174+
@test describe(G) == "C5 : C8"
175+
@test small_group_identification(G) == (40, 1)
176+
@test code_n(c) == 80 && code_k(c) == 8
177+
178+
# [[96, 8, 12]]
179+
F = free_group(["r", "s"])
180+
r, s = gens(F)
181+
G, = quo(F, [s^3, r^16, r^(-1)*s*r*s])
182+
F2G = group_algebra(GF(2), G)
183+
r, s = gens(G)
184+
a_elts = [one(G), r, s, r^14]
185+
b_elts = [one(G), r^2, s*r^4, r^11]
186+
a = sum(F2G(x) for x in a_elts)
187+
b = sum(F2G(x) for x in b_elts)
188+
c = two_block_group_algebra_codes(a, b)
189+
@test describe(G) == "C3 : C16"
190+
@test small_group_identification(G) == (48, 1)
191+
@test code_n(c) == 96 && code_k(c) == 6
192+
193+
# [[80, 9, 9]]
194+
F = free_group(["r", "s"])
195+
r, s = gens(F)
196+
G, = quo(F, [s^4, r^10, (r*s)^2])
197+
F2G = group_algebra(GF(2), G)
198+
r, s = gens(G)
199+
a_elts = [one(G), r^7, r^8, s*r^10]
200+
b_elts = [one(G), s, r^5, s^2*r^13]
201+
a = sum(F2G(x) for x in a_elts)
202+
b = sum(F2G(x) for x in b_elts)
203+
c = two_block_group_algebra_codes(a, b)
204+
@test describe(G) == "C7 x S3"
205+
@test small_group_identification(G) == (42, 3)
206+
@test code_n(c) == 84 && code_k(c) == 10
207+
208+
# [[84, 10, 9]]
209+
F = free_group(["r", "s"])
210+
r, s = gens(F)
211+
G, = quo(F, [s^3, r^14, r^(-1)*s*r*s])
212+
F2G = group_algebra(GF(2), G)
213+
r, s = gens(G)
214+
a_elts = [one(G), r^7, r^8, s*r^10]
215+
b_elts = [one(G), s, r^5, s^2*r^13]
216+
a = sum(F2G(x) for x in a_elts)
217+
b = sum(F2G(x) for x in b_elts)
218+
c = two_block_group_algebra_codes(a, b)
219+
@test describe(G) == "C7 x S3"
220+
@test small_group_identification(G) == (42, 3)
221+
@test code_n(c) == 84 && code_k(c) == 10
222+
223+
# [[96, 6, 12]]
224+
F = free_group(["r", "s"])
225+
r, s = gens(F)
226+
G, = quo(F, [s^4, r^12, s^(-1)*r*s*r])
227+
F2G = group_algebra(GF(2), G)
228+
r, s = gens(G)
229+
a_elts = [one(G), s, r^9, s * r]
230+
b_elts = [one(G), s^2 * s^9, r^7, r^2]
231+
a = sum(F2G(x) for x in a_elts);
232+
b = sum(F2G(x) for x in b_elts)
233+
c = two_block_group_algebra_codes(a, b)
234+
@test describe(G) == "C12 : C4"
235+
@test small_group_identification(G) == (48, 13)
236+
@test code_n(c) == 96 && code_k(c) == 6
237+
238+
# [[96, 12, 10]]
239+
F = free_group(["r", "s"])
240+
r, s = gens(F)
241+
G, = quo(F, [s^6, r^8, r^(-1)*s*r*s])
242+
F2G = group_algebra(GF(2), G)
243+
r, s = gens(G)
244+
a_elts = [one(G), r, s^3 * r^2, s^2 * r^3]
245+
b_elts = [one(G), r, s^4 * r^6, s^5 * r^3]
246+
a = sum(F2G(x) for x in a_elts)
247+
b = sum(F2G(x) for x in b_elts)
248+
c = two_block_group_algebra_codes(a, b)
249+
@test describe(G) == "C2 x (C3 : C8)"
250+
@test small_group_identification(G) == (48, 9)
251+
@test code_n(c) == 96 && code_k(c) == 12
252+
end
253+
end

0 commit comments

Comments
 (0)