|
1 | | -@testitem "ECC 2BGA lin2024quantum" begin |
2 | | - import Hecke: group_algebra, GF, abelian_group, gens, quo, one |
| 1 | +@testitem "ECC 2BGA abelian and non-abelian groups via group presentation" begin |
| 2 | + using Nemo: FqFieldElem |
| 3 | + using Hecke: group_algebra, GF, abelian_group, gens, quo, one, GroupAlgebra |
3 | 4 | using QuantumClifford.ECC |
4 | | - using QuantumClifford.ECC: LPCode, code_k, code_n, two_block_group_algebra_codes |
5 | | - using Oscar: free_group, small_group_identification, describe |
| 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 |
6 | 14 |
|
7 | 15 | @testset "Reproduce Table 1 Block 1" begin |
8 | 16 | # [[72, 8, 9]] |
|
13 | 21 | r = gens(G)[1] |
14 | 22 | a_elts = [one(G), r^28] |
15 | 23 | b_elts = [one(G), r, r^18, r^12, r^29, r^14] |
16 | | - a = sum(F2G(x) for x in a_elts) |
17 | | - b = sum(F2G(x) for x in b_elts) |
18 | | - c = two_block_group_algebra_codes(a, b) |
| 24 | + c = get_code(a_elts, b_elts, F2G) |
19 | 25 | @test describe(G) == "C36" |
20 | 26 | @test small_group_identification(G) == (36, 2) |
21 | 27 | @test code_n(c) == 72 && code_k(c) == 8 |
|
30 | 36 | r, s = gens(G) |
31 | 37 | a_elts = [one(G), r] |
32 | 38 | b_elts = [one(G), s, r^6, s^3 * r, s * r^7, s^3 * r^5] |
33 | | - a = sum(F2G(x) for x in a_elts) |
34 | | - b = sum(F2G(x) for x in b_elts) |
35 | | - c = two_block_group_algebra_codes(a, b) |
| 39 | + c = get_code(a_elts, b_elts, F2G) |
36 | 40 | @test describe(G) == "C9 : C4" |
37 | 41 | @test small_group_identification(G) == (36, 1) |
38 | 42 | @test code_n(c) == 72 && code_k(c) == 8 |
|
45 | 49 | r, s = gens(G) |
46 | 50 | a_elts = [one(G), s*r^4] |
47 | 51 | b_elts = [one(G), r, r^2, s, s^3 * r, s^2 * r^6] |
48 | | - a = sum(F2G(x) for x in a_elts) |
49 | | - b = sum(F2G(x) for x in b_elts) |
50 | | - c = two_block_group_algebra_codes(a, b) |
| 52 | + c = get_code(a_elts, b_elts, F2G) |
51 | 53 | @test describe(G) == "C5 : C8" |
52 | 54 | @test small_group_identification(G) == (40, 1) |
53 | 55 | @test code_n(c) == 80 && code_k(c) == 8 |
|
62 | 64 | r = gens(G)[1] |
63 | 65 | a_elts = [one(G), r, r^3, r^7] |
64 | 66 | b_elts = [one(G), r, r^12, r^19] |
65 | | - a = sum(F2G(x) for x in a_elts); |
66 | | - b = sum(F2G(x) for x in b_elts) |
67 | | - c = two_block_group_algebra_codes(a, b) |
| 67 | + c = get_code(a_elts, b_elts, F2G) |
68 | 68 | @test describe(G) == "C27" |
69 | 69 | @test small_group_identification(G) == (27, 1) |
70 | 70 | @test code_n(c) == 54 && code_k(c) == 6 |
|
77 | 77 | r = gens(G)[1] |
78 | 78 | a_elts = [one(G), r^10, r^6, r^13] |
79 | 79 | b_elts = [one(G), r^25, r^16, r^12] |
80 | | - a = sum(F2G(x) for x in a_elts); |
81 | | - b = sum(F2G(x) for x in b_elts) |
82 | | - c = two_block_group_algebra_codes(a, b) |
| 80 | + c = get_code(a_elts, b_elts, F2G) |
83 | 81 | @test describe(G) == "C30" |
84 | 82 | @test small_group_identification(G) == (30, 4) |
85 | 83 | @test code_n(c) == 60 && code_k(c) == 6 |
|
92 | 90 | r = gens(G)[1] |
93 | 91 | a_elts = [one(G), r^15, r^16, r^18] |
94 | 92 | b_elts = [one(G), r, r^24, r^27] |
95 | | - a = sum(F2G(x) for x in a_elts); |
96 | | - b = sum(F2G(x) for x in b_elts) |
97 | | - c = two_block_group_algebra_codes(a, b) |
| 93 | + c = get_code(a_elts, b_elts, F2G) |
98 | 94 | @test describe(G) == "C35" |
99 | 95 | @test small_group_identification(G) == (35, 1) |
100 | 96 | @test code_n(c) == 70 && code_k(c) == 8 |
|
107 | 103 | r = gens(G)[1] |
108 | 104 | a_elts = [one(G), r^9, r^28, r^31] |
109 | 105 | b_elts = [one(G), r, r^21, r^34] |
110 | | - a = sum(F2G(x) for x in a_elts); |
111 | | - b = sum(F2G(x) for x in b_elts) |
112 | | - c = two_block_group_algebra_codes(a, b) |
| 106 | + c = get_code(a_elts, b_elts, F2G) |
113 | 107 | @test describe(G) == "C36" |
114 | 108 | @test small_group_identification(G) == (36, 2) |
115 | 109 | @test code_n(c) == 72 && code_k(c) == 8 |
|
122 | 116 | r = gens(G)[1] |
123 | 117 | a_elts = [one(G), r^9, r^28, r^13] |
124 | 118 | b_elts = [one(G), r, r^3, r^22] |
125 | | - a = sum(F2G(x) for x in a_elts); |
126 | | - b = sum(F2G(x) for x in b_elts) |
127 | | - c = two_block_group_algebra_codes(a, b) |
| 119 | + c = get_code(a_elts, b_elts, F2G) |
128 | 120 | @test describe(G) == "C36" |
129 | 121 | @test small_group_identification(G) == (36, 2) |
130 | 122 | @test code_n(c) == 72 && code_k(c) == 10 |
|
139 | 131 | r, s = gens(G) |
140 | 132 | a_elts = [one(G), s, r, s*r^6] |
141 | 133 | b_elts = [one(G), s^2*r, s^2*r^6, r^2] |
142 | | - a = sum(F2G(x) for x in a_elts); |
143 | | - b = sum(F2G(x) for x in b_elts) |
144 | | - c = two_block_group_algebra_codes(a, b) |
| 134 | + c = get_code(a_elts, b_elts, F2G) |
145 | 135 | @test describe(G) == "C9 : C4" |
146 | 136 | @test small_group_identification(G) == (36, 1) |
147 | 137 | @test code_n(c) == 72 && code_k(c) == 8 |
|
154 | 144 | r, s = gens(G) |
155 | 145 | a_elts = [one(G), r, s, s^3*r^5] |
156 | 146 | b_elts = [one(G), r^2, s*r^4, s^3*r^2] |
157 | | - a = sum(F2G(x) for x in a_elts) |
158 | | - b = sum(F2G(x) for x in b_elts) |
159 | | - c = two_block_group_algebra_codes(a, b) |
| 147 | + c = get_code(a_elts, b_elts, F2G) |
160 | 148 | @test describe(G) == "C5 : C8" |
161 | 149 | @test small_group_identification(G) == (40, 1) |
162 | 150 | @test code_n(c) == 80 && code_k(c) == 8 |
|
169 | 157 | r, s = gens(G) |
170 | 158 | a_elts = [one(G), r, s, r^14] |
171 | 159 | b_elts = [one(G), r^2, s*r^4, r^11] |
172 | | - a = sum(F2G(x) for x in a_elts) |
173 | | - b = sum(F2G(x) for x in b_elts) |
174 | | - c = two_block_group_algebra_codes(a, b) |
| 160 | + c = get_code(a_elts, b_elts, F2G) |
175 | 161 | @test describe(G) == "C3 : C16" |
176 | 162 | @test small_group_identification(G) == (48, 1) |
177 | 163 | @test code_n(c) == 96 && code_k(c) == 6 |
|
184 | 170 | r, s = gens(G) |
185 | 171 | a_elts = [one(G), r^7, r^8, s*r^10] |
186 | 172 | b_elts = [one(G), s, r^5, s^2*r^13] |
187 | | - a = sum(F2G(x) for x in a_elts) |
188 | | - b = sum(F2G(x) for x in b_elts) |
189 | | - c = two_block_group_algebra_codes(a, b) |
| 173 | + c = get_code(a_elts, b_elts, F2G) |
190 | 174 | @test describe(G) == "C7 x S3" |
191 | 175 | @test small_group_identification(G) == (42, 3) |
192 | 176 | @test code_n(c) == 84 && code_k(c) == 10 |
|
199 | 183 | r, s = gens(G) |
200 | 184 | a_elts = [one(G), s, r^9, s * r] |
201 | 185 | b_elts = [one(G), s^2 * s^9, r^7, r^2] |
202 | | - a = sum(F2G(x) for x in a_elts); |
203 | | - b = sum(F2G(x) for x in b_elts) |
204 | | - c = two_block_group_algebra_codes(a, b) |
| 186 | + c = get_code(a_elts, b_elts, F2G) |
205 | 187 | @test describe(G) == "C12 : C4" |
206 | 188 | @test small_group_identification(G) == (48, 13) |
207 | 189 | @test code_n(c) == 96 && code_k(c) == 6 |
|
214 | 196 | r, s = gens(G) |
215 | 197 | a_elts = [one(G), r, s^3 * r^2, s^2 * r^3] |
216 | 198 | b_elts = [one(G), r, s^4 * r^6, s^5 * r^3] |
217 | | - a = sum(F2G(x) for x in a_elts) |
218 | | - b = sum(F2G(x) for x in b_elts) |
219 | | - c = two_block_group_algebra_codes(a, b) |
| 199 | + c = get_code(a_elts, b_elts, F2G) |
220 | 200 | @test describe(G) == "C2 x (C3 : C8)" |
221 | 201 | @test small_group_identification(G) == (48, 9) |
222 | 202 | @test code_n(c) == 96 && code_k(c) == 12 |
|
0 commit comments