|
| 1 | +@testitem "ECC Bivaraite Bicycle as 2BGA" begin |
| 2 | + using Hecke |
| 3 | + using Hecke: group_algebra, GF, abelian_group, gens, one |
| 4 | + using QuantumClifford.ECC: two_block_group_algebra_codes, code_k, code_n |
| 5 | + |
| 6 | + @testset "Reproduce Table 3 bravyi2024high" begin |
| 7 | + # [[72, 12, 6]] |
| 8 | + l=6; m=6 |
| 9 | + GA = group_algebra(GF(2), abelian_group([l, m])) |
| 10 | + x, y = gens(GA) |
| 11 | + A = x^3 + y + y^2 |
| 12 | + B = y^3 + x + x^2 |
| 13 | + c = two_block_group_algebra_codes(A,B) |
| 14 | + @test code_n(c) == 72 && code_k(c) == 12 |
| 15 | + |
| 16 | + # [[90, 8, 10]] |
| 17 | + l=15; m=3 |
| 18 | + GA = group_algebra(GF(2), abelian_group([l, m])) |
| 19 | + x, y = gens(GA) |
| 20 | + A = x^9 + y + y^2 |
| 21 | + B = 1 + x^2 + x^7 |
| 22 | + c = two_block_group_algebra_codes(A,B) |
| 23 | + @test code_n(c) == 90 && code_k(c) == 8 |
| 24 | + |
| 25 | + # [[108, 8, 10]] |
| 26 | + l=9; m=6 |
| 27 | + GA = group_algebra(GF(2), abelian_group([l, m])) |
| 28 | + x, y = gens(GA) |
| 29 | + A = x^3 + y + y^2 |
| 30 | + B = y^3 + x + x^2 |
| 31 | + c = two_block_group_algebra_codes(A,B) |
| 32 | + @test code_n(c) == 108 && code_k(c) == 8 |
| 33 | + |
| 34 | + # [[144, 12, 12]] |
| 35 | + l=12; m=6 |
| 36 | + GA = group_algebra(GF(2), abelian_group([l, m])) |
| 37 | + x, y = gens(GA) |
| 38 | + A = x^3 + y + y^2 |
| 39 | + B = y^3 + x + x^2 |
| 40 | + c = two_block_group_algebra_codes(A,B) |
| 41 | + @test code_n(c) == 144 && code_k(c) == 12 |
| 42 | + |
| 43 | + # [[288, 12, 12]] |
| 44 | + l=12; m=12 |
| 45 | + GA = group_algebra(GF(2), abelian_group([l, m])) |
| 46 | + x, y = gens(GA) |
| 47 | + A = x^3 + y^2 + y^7 |
| 48 | + B = y^3 + x + x^2 |
| 49 | + c = two_block_group_algebra_codes(A,B) |
| 50 | + @test code_n(c) == 288 && code_k(c) == 12 |
| 51 | + |
| 52 | + # [[360, 12, ≤ 24]] |
| 53 | + l=30; m=6 |
| 54 | + GA = group_algebra(GF(2), abelian_group([l, m])) |
| 55 | + x, y = gens(GA) |
| 56 | + A = x^9 + y + y^2 |
| 57 | + B = y^3 + x^25 + x^26 |
| 58 | + c = two_block_group_algebra_codes(A,B) |
| 59 | + @test code_n(c) == 360 && code_k(c) == 12 |
| 60 | + |
| 61 | + # [[756, 16, ≤ 34]] |
| 62 | + l=21; m=18 |
| 63 | + GA = group_algebra(GF(2), abelian_group([l, m])) |
| 64 | + x, y = gens(GA) |
| 65 | + A = x^3 + y^10 + y^17 |
| 66 | + B = y^5 + x^3 + x^19 |
| 67 | + c = two_block_group_algebra_codes(A,B) |
| 68 | + @test code_n(c) == 756 && code_k(c) == 16 |
| 69 | + end |
| 70 | + |
| 71 | + @testset "Reproduce Table 1 berthusen2024toward" begin |
| 72 | + # [[72, 8, 6]] |
| 73 | + l=12; m=3 |
| 74 | + GA = group_algebra(GF(2), abelian_group([l, m])) |
| 75 | + x, y = gens(GA) |
| 76 | + A = x^9 + y + y^2 |
| 77 | + B = 1 + x + x^11 |
| 78 | + c = two_block_group_algebra_codes(A,B) |
| 79 | + @test code_n(c) == 72 && code_k(c) == 8 |
| 80 | + |
| 81 | + # [[90, 8, 6]] |
| 82 | + l=9; m=5 |
| 83 | + GA = group_algebra(GF(2), abelian_group([l, m])) |
| 84 | + x, y = gens(GA) |
| 85 | + A = x^8 + y^4 + y |
| 86 | + B = y^5 + x^8 + x^7 |
| 87 | + c = two_block_group_algebra_codes(A,B) |
| 88 | + @test code_n(c) == 90 && code_k(c) == 8 |
| 89 | + |
| 90 | + # [[120, 8, 8]] |
| 91 | + l=12; m=5 |
| 92 | + GA = group_algebra(GF(2), abelian_group([l, m])) |
| 93 | + x, y = gens(GA) |
| 94 | + A = x^10 + y^4 + y |
| 95 | + B = 1 + x + x^2 |
| 96 | + c = two_block_group_algebra_codes(A,B) |
| 97 | + @test code_n(c) == 120 && code_k(c) == 8 |
| 98 | + |
| 99 | + # [[150, 8, 8]] |
| 100 | + l=15; m=5 |
| 101 | + GA = group_algebra(GF(2), abelian_group([l, m])) |
| 102 | + x, y = gens(GA) |
| 103 | + A = x^5 + y^2 + y^3 |
| 104 | + B = y^2 + x^7 + x^6 |
| 105 | + c = two_block_group_algebra_codes(A,B) |
| 106 | + @test code_n(c) == 150 && code_k(c) == 8 |
| 107 | + |
| 108 | + # [[196, 12, 8]] |
| 109 | + l=14; m=7 |
| 110 | + GA = group_algebra(GF(2), abelian_group([l, m])) |
| 111 | + x, y = gens(GA) |
| 112 | + A = x^6 + y^5 + y^6 |
| 113 | + B = 1 + x^4 + x^13 |
| 114 | + c = two_block_group_algebra_codes(A,B) |
| 115 | + @test code_n(c) == 196 && code_k(c) == 12 |
| 116 | + end |
| 117 | + |
| 118 | + @testset "Reproduce Table 1 wang2024coprime" begin |
| 119 | + # [[54, 8, 6]] |
| 120 | + l=3; m=9 |
| 121 | + GA = group_algebra(GF(2), abelian_group([l, m])) |
| 122 | + x, y = gens(GA) |
| 123 | + A = 1 + y^2 + y^4 |
| 124 | + B = y^3 + x + x^2 |
| 125 | + c = two_block_group_algebra_codes(A,B) |
| 126 | + @test code_n(c) == 54 && code_k(c) == 8 |
| 127 | + |
| 128 | + # [[98, 6, 12]] |
| 129 | + l=7; m=7 |
| 130 | + GA = group_algebra(GF(2), abelian_group([l, m])) |
| 131 | + x, y = gens(GA) |
| 132 | + A = x^3 + y^5 + y^6 |
| 133 | + B = y^2 + x^3 + x^5 |
| 134 | + c = two_block_group_algebra_codes(A,B) |
| 135 | + @test code_n(c) == 98 && code_k(c) == 6 |
| 136 | + |
| 137 | + # [[126, 8, 10]] |
| 138 | + l=3; m=21 |
| 139 | + GA = group_algebra(GF(2), abelian_group([l, m])) |
| 140 | + x, y = gens(GA) |
| 141 | + A = 1 + y^2 + y^10 |
| 142 | + B = y^3 + x + x^2 |
| 143 | + c = two_block_group_algebra_codes(A,B) |
| 144 | + @test code_n(c) == 126 && code_k(c) == 8 |
| 145 | + |
| 146 | + # [[150, 16, 8]] |
| 147 | + l=5; m=15 |
| 148 | + GA = group_algebra(GF(2), abelian_group([l, m])) |
| 149 | + x, y = gens(GA) |
| 150 | + A = 1 + y^6 + y^8 |
| 151 | + B = y^5 + x + x^4 |
| 152 | + c = two_block_group_algebra_codes(A,B) |
| 153 | + @test code_n(c) == 150 && code_k(c) == 16 |
| 154 | + |
| 155 | + # [[162, 8, 14]] |
| 156 | + l=3; m=27 |
| 157 | + GA = group_algebra(GF(2), abelian_group([l, m])) |
| 158 | + x, y = gens(GA) |
| 159 | + A = 1 + y^10 + y^14 |
| 160 | + B = y^12 + x + x^2 |
| 161 | + c = two_block_group_algebra_codes(A,B) |
| 162 | + @test code_n(c) == 162 && code_k(c) == 8 |
| 163 | + |
| 164 | + # [[180, 8, 16]] |
| 165 | + l=6; m=15 |
| 166 | + GA = group_algebra(GF(2), abelian_group([l, m])) |
| 167 | + x, y = gens(GA) |
| 168 | + A = x^3 + y + y^2 |
| 169 | + B = y^6 + x^4 + x^5 |
| 170 | + c = two_block_group_algebra_codes(A,B) |
| 171 | + @test code_n(c) == 180 && code_k(c) == 8 |
| 172 | + end |
| 173 | +end |
0 commit comments