Skip to content

Commit d47f59f

Browse files
committed
Group Presentation for Cyclic Group Cₘₕ = Cₘ × C₂
1 parent be50f9c commit d47f59f

File tree

2 files changed

+198
-0
lines changed

2 files changed

+198
-0
lines changed

test/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ LDPCDecoders = "3c486d74-64b9-4c60-8b1a-13a564e77efb"
1616
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1717
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
1818
Nemo = "2edaba10-b0f1-5616-af89-8c11ac63239a"
19+
Oscar = "f1435218-dba5-11e9-1e4d-f1a5fab5fc13"
1920
PyQDecoders = "17f5de1a-9b79-4409-a58d-4d45812840f7"
2021
Quantikz = "b0d11df0-eea3-4d79-b4a5-421488cbf74b"
2122
QuantumInterface = "5717a53b-5d69-4fa3-b976-0bf2f97ca1e5"
Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
@testitem "ECC 2BGA Table 2 via Presentation of Cyclic Groups" begin
2+
using Nemo: FqFieldElem
3+
using Hecke: group_algebra, GF, abelian_group, gens, quo, one, GroupAlgebra
4+
using QuantumClifford.ECC
5+
using QuantumClifford.ECC: code_k, code_n, two_block_group_algebra_codes
6+
using Oscar: free_group, small_group_identification, describe, order, FPGroupElem, FPGroup, FPGroupElem
7+
8+
function get_code(a_elts::Vector{FPGroupElem}, b_elts::Vector{FPGroupElem}, F2G::GroupAlgebra{FqFieldElem, FPGroup, FPGroupElem})
9+
a = sum(F2G(x) for x in a_elts)
10+
b = sum(F2G(x) for x in b_elts)
11+
c = two_block_group_algebra_codes(a,b)
12+
return c
13+
end
14+
15+
@testset "Reproduce Table 2 lin2024quantum" begin
16+
# codes taken from Appendix C, Table 2 of [lin2024quantum](@cite)
17+
18+
# [[16, 2, 4]]
19+
# m = 4
20+
F = free_group(["x", "s"])
21+
x, s = gens(F)
22+
G, = quo(F, [x^4, s^2, x * s * x^-1 * s^-1])
23+
F2G = group_algebra(GF(2), G)
24+
x, s = gens(G)
25+
a_elts = [one(G), x]
26+
b_elts = [one(G), x, s, x^2, s*x, s*x^3]
27+
c = get_code(a_elts, b_elts, F2G)
28+
@test describe(G) == "C4 x C2"
29+
@test order(G) == 8
30+
@test small_group_identification(G) == (8, 2)
31+
@test code_n(c) == 16 && code_k(c) == 2
32+
33+
# [[16, 4, 4]]
34+
b_elts = [one(G), x, s, x^2, s*x, x^3]
35+
c = get_code(a_elts, b_elts, F2G)
36+
@test describe(G) == "C4 x C2"
37+
@test order(G) == 8
38+
@test small_group_identification(G) == (8, 2)
39+
@test code_n(c) == 16 && code_k(c) == 4
40+
41+
# [[16, 8, 2]]
42+
a_elts = [one(G), s]
43+
b_elts = [one(G), x, s, x^2, s*x, x^2]
44+
c = get_code(a_elts, b_elts, F2G)
45+
@test describe(G) == "C4 x C2"
46+
@test order(G) == 8
47+
@test small_group_identification(G) == (8, 2)
48+
@test code_n(c) == 16 && code_k(c) == 8
49+
50+
# [[24, 4, 5]]
51+
# m = 6
52+
F = free_group(["x", "s"])
53+
x, s = gens(F)
54+
G, = quo(F, [x^6, s^2, x * s * x^-1 * s^-1])
55+
F2G = group_algebra(GF(2), G)
56+
x, s = gens(G)
57+
a_elts = [one(G), x]
58+
b_elts = [one(G), x^3, s, x^4, x^2, s*x]
59+
c = get_code(a_elts, b_elts, F2G)
60+
@test describe(G) == "C6 x C2"
61+
@test order(G) == 12
62+
@test small_group_identification(G) == (12, 5)
63+
@test code_n(c) == 24 && code_k(c) == 4
64+
65+
# [[24, 12, 2]]
66+
a_elts = [one(G), x^3]
67+
b_elts = [one(G), x^3, s, x^4, s * x^3, x]
68+
c = get_code(a_elts, b_elts, F2G)
69+
@test describe(G) == "C6 x C2"
70+
@test order(G) == 12
71+
@test small_group_identification(G) == (12, 5)
72+
@test code_n(c) == 24 && code_k(c) == 12
73+
74+
# [[32, 8, 4]]
75+
# m = 8
76+
F = free_group(["x", "s"])
77+
x, s = gens(F)
78+
G, = quo(F, [x^8, s^2, x * s * x^-1 * s^-1])
79+
F2G = group_algebra(GF(2), G)
80+
x, s = gens(G)
81+
a_elts = [one(G), x^6]
82+
b_elts = [one(G), s * x^7, s * x^4, x^6, s * x^5, s * x^2]
83+
c = get_code(a_elts, b_elts, F2G)
84+
@test describe(G) == "C8 x C2"
85+
@test order(G) == 16
86+
@test small_group_identification(G) == (16, 5)
87+
@test code_n(c) == 32 && code_k(c) == 8
88+
89+
# [[32, 16, 2]]
90+
a_elts = [one(G), s * x^4]
91+
b_elts = [one(G), s * x^7, s * x^4, x^6, x^3, s * x^2]
92+
c = get_code(a_elts, b_elts, F2G)
93+
@test describe(G) == "C8 x C2"
94+
@test order(G) == 16
95+
@test small_group_identification(G) == (16, 5)
96+
@test code_n(c) == 32 && code_k(c) == 16
97+
98+
# [[40, 4, 8]]
99+
# m = 10
100+
F = free_group(["x", "s"])
101+
x, s = gens(F)
102+
G, = quo(F, [x^10, s^2, x * s * x^-1 * s^-1])
103+
F2G = group_algebra(GF(2), G)
104+
x, s = gens(G)
105+
a_elts = [one(G), x]
106+
b_elts = [one(G), x^5, x^6, s * x^6, x^7, s * x^3]
107+
c = get_code(a_elts, b_elts, F2G)
108+
@test describe(G) == "C10 x C2"
109+
@test order(G) == 20
110+
@test small_group_identification(G) == (20, 5)
111+
@test code_n(c) == 40 && code_k(c) == 4
112+
113+
# [[40, 8, 5]]
114+
a_elts = [one(G), x^6]
115+
b_elts = [one(G), x^5, s, x^6 , x, s * x^2]
116+
c = get_code(a_elts, b_elts, F2G)
117+
@test describe(G) == "C10 x C2"
118+
@test order(G) == 20
119+
@test small_group_identification(G) == (20, 5)
120+
@test code_n(c) == 40 && code_k(c) == 8
121+
122+
# [[40, 20, 2]]
123+
a_elts = [one(G), x^5]
124+
b_elts = [one(G), x^5, s, x^6, s * x^5, x]
125+
c = get_code(a_elts, b_elts, F2G)
126+
@test describe(G) == "C10 x C2"
127+
@test order(G) == 20
128+
@test small_group_identification(G) == (20, 5)
129+
@test code_n(c) == 40 && code_k(c) == 20
130+
131+
# [[48, 8, 6]]
132+
# m = 12
133+
F = free_group(["x", "s"])
134+
x, s = gens(F)
135+
G, = quo(F, [x^12, s^2, x * s * x^-1 * s^-1])
136+
F2G = group_algebra(GF(2), G)
137+
x, s = gens(G)
138+
a_elts = [one(G), s * x^10]
139+
b_elts = [one(G), x^3, s * x^6, x^4, x^7, x^8]
140+
c = get_code(a_elts, b_elts, F2G)
141+
@test describe(G) == "C12 x C2"
142+
@test order(G) == 24
143+
@test small_group_identification(G) == (24, 9)
144+
@test code_n(c) == 48 && code_k(c) == 8
145+
146+
# [[48, 12, 4]]
147+
a_elts = [one(G), x^3]
148+
b_elts = [one(G), x^3, s * x^6, x^4, s * x^9, x^7]
149+
c = get_code(a_elts, b_elts, F2G)
150+
@test describe(G) == "C12 x C2"
151+
@test order(G) == 24
152+
@test small_group_identification(G) == (24, 9)
153+
@test code_n(c) == 48 && code_k(c) == 12
154+
155+
# [[48, 16, 3]]
156+
a_elts = [one(G), x^4]
157+
b_elts = [one(G), x^3, s * x^6, x^4, x^7, s * x^10]
158+
c = get_code(a_elts, b_elts, F2G)
159+
@test describe(G) == "C12 x C2"
160+
@test order(G) == 24
161+
@test small_group_identification(G) == (24, 9)
162+
@test code_n(c) == 48 && code_k(c) == 16
163+
164+
# [[48, 24, 2]]
165+
a_elts = [one(G), s * x^6]
166+
b_elts = [one(G), x^3, s * x^6, x^4, s * x^9, s * x^10]
167+
c = get_code(a_elts, b_elts, F2G)
168+
@test describe(G) == "C12 x C2"
169+
@test order(G) == 24
170+
@test small_group_identification(G) == (24, 9)
171+
@test code_n(c) == 48 && code_k(c) == 24
172+
173+
# [[56, 8, 7]]
174+
# m = 14
175+
F = free_group(["x", "s"])
176+
x, s = gens(F)
177+
G, = quo(F, [x^14, s^2, x * s * x^-1 * s^-1])
178+
F2G = group_algebra(GF(2), G)
179+
x, s = gens(G)
180+
a_elts = [one(G), x^8]
181+
b_elts = [one(G), x^7, s, x^8, x^9, s * x^4]
182+
c = get_code(a_elts, b_elts, F2G)
183+
@test describe(G) == "C14 x C2"
184+
@test order(G) == 28
185+
@test small_group_identification(G) == (28, 4)
186+
@test code_n(c) == 56 && code_k(c) == 8
187+
188+
# [[56, 28, 2]]
189+
a_elts = [one(G), x^7]
190+
b_elts = [one(G), x^7, s, x^8, s * x^7, x]
191+
c = get_code(a_elts, b_elts, F2G)
192+
@test describe(G) == "C14 x C2"
193+
@test order(G) == 28
194+
@test small_group_identification(G) == (28, 4)
195+
@test code_n(c) == 56 && code_k(c) == 28
196+
end
197+
end

0 commit comments

Comments
 (0)