@@ -77,7 +77,8 @@ The default representation, provided by `Hecke`, is the permutation representati
7777
7878We also accept a custom representation function as detailed in [`LiftedCode`](@ref).
7979
80- See also: [`LiftedCode`](@ref), [`two_block_group_algebra_codes`](@ref), [`generalized_bicycle_codes`](@ref), [`bicycle_codes`](@ref).
80+ See also: [`LiftedCode`](@ref), [`two_block_group_algebra_codes`](@ref), [`generalized_bicycle_codes`](@ref), [`bicycle_codes`](@ref),
81+ [`haah_cubic_codes`](@ref).
8182
8283$TYPEDFIELDS
8384"""
@@ -251,12 +252,10 @@ julia> 𝜋 = gens(GA)[1];
251252julia> A = 𝜋^2 + 𝜋^5 + 𝜋^44;
252253
253254julia> B = 𝜋^8 + 𝜋^14 + 𝜋^47;
254-
255-
256255(108, 12)
257256```
258257
259- See also: [`LPCode`](@ref), [`generalized_bicycle_codes`](@ref), [`bicycle_codes`](@ref).
258+ See also: [`LPCode`](@ref), [`generalized_bicycle_codes`](@ref), [`bicycle_codes`](@ref), [`haah_cubic_codes`](@ref) .
260259"""
261260function two_block_group_algebra_codes(a:: GroupAlgebraElem , b:: GroupAlgebraElem )
262261 LPCode([a;;], [b;;])
@@ -302,10 +301,33 @@ Bicycle codes are a special case of generalized bicycle codes,
302301where `a` and `b` are conjugate to each other.
303302The order of the cyclic group is `l`, and the shifts `a_shifts` and `b_shifts` are reverse to each other.
304303
305- See also: [`two_block_group_algebra_codes`](@ref), [`generalized_bicycle_codes`](@ref).
304+ See also: [`two_block_group_algebra_codes`](@ref), [`generalized_bicycle_codes`](@ref), [`haah_cubic_codes`](@ref) .
306305""" # TODO doctest example
307306function bicycle_codes(a_shifts:: Array{Int} , l:: Int )
308307 GA = group_algebra(GF(2 ), abelian_group(l))
309308 a = sum(GA[n÷ l+ 1 ] for n in a_shifts)
310309 two_block_group_algebra_codes(a, group_algebra_conj(a))
311310end
311+
312+ """
313+ Haah’s cubic codes [haah2011local](@cite) can be viewed as generalized bicycle (GB) codes
314+ with the group `G = Cₗ × Cₗ × Cₗ`, where `l` denotes the lattice size. In particular, a GB
315+ code with the group `G = ℤ₃ˣ³` corresponds to a cubic code.
316+
317+ The ECC Zoo has an [entry for this family](https://errorcorrectionzoo.org/c/haah_cubic).
318+
319+ ```jldoctest
320+ julia> c = haah_cubic_codes([0, 15, 20, 28, 66], [0, 58, 59, 100, 121], 6);
321+
322+ julia> code_n(c), code_k(c)
323+ (432, 8)
324+ ```
325+
326+ See also: [`bicycle_codes`](@ref), [`generalized_bicycle_codes`](@ref), [`two_block_group_algebra_codes`](@ref).
327+ """
328+ function haah_cubic_codes(a_shifts:: Array{Int} , b_shifts:: Array{Int} , l:: Int )
329+ GA = group_algebra(GF(2 ), abelian_group([l,l,l]))
330+ a = sum(GA[n% dim(GA)+ 1 ] for n in a_shifts)
331+ b = sum(GA[n% dim(GA)+ 1 ] for n in b_shifts)
332+ two_block_group_algebra_codes(a, b)
333+ end
0 commit comments