Skip to content

Commit c3aa055

Browse files
Fe-r-ozKrastanov
andauthored
examples of generalized bicycle codes (#389)
Co-authored-by: Stefan Krastanov <[email protected]>
1 parent be34f16 commit c3aa055

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

ext/QuantumCliffordHeckeExt/lifted_product.jl

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ function two_block_group_algebra_codes(a::GroupAlgebraElem, b::GroupAlgebraElem)
265265
end
266266

267267
"""
268-
Generalized bicycle codes, which are a special case of 2GBA codes (and therefore of lifted product codes).
268+
Generalized bicycle codes, which are a special case of *abelian* 2GBA codes (and therefore of lifted product codes).
269269
Here the group is chosen as the cyclic group of order `l`,
270270
and the base matrices `a` and `b` are the sum of the group algebra elements corresponding to the shifts `a_shifts` and `b_shifts`.
271271
@@ -279,6 +279,18 @@ julia> c = generalized_bicycle_codes([0, 15, 20, 28, 66], [0, 58, 59, 100, 121],
279279
julia> code_n(c), code_k(c)
280280
(254, 28)
281281
```
282+
283+
An [[70, 8, 10]] *abelian* 2BGA code from Table 1 of [lin2024quantum](@cite), with cyclic group of
284+
order `l = 35`, illustrates that *abelian* 2BGA codes can be viewed as GB codes.
285+
286+
```jldoctest
287+
julia> l = 35;
288+
289+
julia> c1 = generalized_bicycle_codes([0, 15, 16, 18], [0, 1, 24, 27], l);
290+
291+
julia> code_n(c1), code_k(c1)
292+
(70, 8)
293+
```
282294
"""
283295
function generalized_bicycle_codes(a_shifts::Array{Int}, b_shifts::Array{Int}, l::Int)
284296
GA = group_algebra(GF(2), abelian_group(l))
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
@testitem "ECC GB" begin
2+
using Hecke
3+
using QuantumClifford.ECC: generalized_bicycle_codes, code_k, code_n
4+
5+
# codes taken from Table 1 of [lin2024quantum](@cite)
6+
# Abelian 2BGA codes can be viewed as GB codes.
7+
@test code_n(generalized_bicycle_codes([0 , 15, 16, 18], [0 , 1, 24, 27], 35)) == 70
8+
@test code_k(generalized_bicycle_codes([0 , 15, 16, 18], [0 , 1, 24, 27], 35)) == 8
9+
@test code_n(generalized_bicycle_codes([0 , 1, 3, 7], [0 , 1, 12, 19], 27)) == 54
10+
@test code_k(generalized_bicycle_codes([0 , 1, 3, 7], [0 , 1, 12, 19], 27)) == 6
11+
@test code_n(generalized_bicycle_codes([0 , 10, 6, 13], [0 , 25, 16, 12], 30)) == 60
12+
@test code_k(generalized_bicycle_codes([0 , 10, 6, 13], [0 , 25, 16, 12], 30)) == 6
13+
@test code_n(generalized_bicycle_codes([0 , 9, 28, 31], [0 , 1, 21, 34], 36)) == 72
14+
@test code_k(generalized_bicycle_codes([0 , 9, 28, 31], [0 , 1, 21, 34], 36)) == 8
15+
@test code_n(generalized_bicycle_codes([0 , 9, 28, 13], [0 , 1, 21, 34], 36)) == 72
16+
@test code_k(generalized_bicycle_codes([0 , 9, 28, 13], [0 , 1, 3, 22], 36)) == 10
17+
end
18+
end

0 commit comments

Comments
 (0)