Skip to content

Commit ce1dc02

Browse files
Fe-r-ozKrastanov
andauthored
Haah's cubic code using abelian group ℤ₃ˣ³ via Hecke's Group Algebra (#388)
Co-authored-by: Stefan Krastanov <github.acc@krastanov.org>
1 parent 45e9f4d commit ce1dc02

File tree

7 files changed

+49
-7
lines changed

7 files changed

+49
-7
lines changed

docs/src/references.bib

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,3 +551,13 @@ @article{bravyi2024high
551551
year={2024},
552552
publisher={Nature Publishing Group UK London}
553553
}
554+
555+
@article{haah2011local,
556+
title={Local stabilizer codes in three dimensions without string logical operators},
557+
author={Haah, Jeongwan},
558+
journal={Physical Review A?Atomic, Molecular, and Optical Physics},
559+
volume={83},
560+
number={4},
561+
pages={042330},
562+
year={2011},
563+
}

docs/src/references.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ For quantum code construction routines:
4444
- [voss2024multivariatebicyclecodes](@cite)
4545
- [lin2024quantum](@cite)
4646
- [bravyi2024high](@cite)
47+
- [haah2011local](@cite)
4748

4849
For classical code construction routines:
4950
- [muller1954application](@cite)

ext/QuantumCliffordHeckeExt/QuantumCliffordHeckeExt.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ import Nemo: characteristic, matrix_repr, GF, ZZ, lift
1111

1212
import QuantumClifford.ECC: AbstractECC, CSS, ClassicalCode,
1313
hgp, code_k, code_n, code_s, iscss, parity_checks, parity_checks_x, parity_checks_z, parity_checks_xz,
14-
two_block_group_algebra_codes, generalized_bicycle_codes, bicycle_codes, check_repr_commutation_relation
14+
two_block_group_algebra_codes, generalized_bicycle_codes, bicycle_codes, check_repr_commutation_relation,
15+
haah_cubic_codes
1516

1617
include("util.jl")
1718
include("types.jl")

ext/QuantumCliffordHeckeExt/lifted_product.jl

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ The default representation, provided by `Hecke`, is the permutation representati
7777
7878
We 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];
251252
julia> A = 𝜋^2 + 𝜋^5 + 𝜋^44;
252253
253254
julia> 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
"""
261260
function 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,
302301
where `a` and `b` are conjugate to each other.
303302
The 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
307306
function 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))
311310
end
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

src/ecc/ECC.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export parity_checks, parity_checks_x, parity_checks_z, iscss,
2929
Shor9, Steane7, Cleve8, Perfect5, Bitflip3,
3030
Toric, Gottesman, Surface, Concat, CircuitCode, QuantumReedMuller,
3131
LPCode, two_block_group_algebra_codes, generalized_bicycle_codes, bicycle_codes,
32+
haah_cubic_codes,
3233
random_brickwork_circuit_code, random_all_to_all_circuit_code,
3334
evaluate_decoder,
3435
CommutationCheckECCSetup, NaiveSyndromeECCSetup, ShorSyndromeECCSetup,

src/ecc/codes/lifted_product.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ function generalized_bicycle_codes end
1717

1818
"""Implemented in a package extension with Hecke."""
1919
function bicycle_codes end
20+
21+
"""Implemented in a package extension with Hecke."""
22+
function haah_cubic_codes end

test/test_ecc_base.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ test_gb_codes = [
4242
generalized_bicycle_codes([0, 1, 14, 16, 22], [0, 3, 13, 20, 42], 63), # (A2) [[126, 28, 8]]
4343
]
4444

45+
test_hcubic_codes = [
46+
haah_cubic_codes([0, 15, 20, 28, 66], [0, 58, 59, 100, 121], 3)
47+
]
48+
4549
other_lifted_product_codes = []
4650

4751
# [[882, 24, d≤24]] code from (B1) in Appendix B of [panteleev2021degenerate](@cite)
@@ -150,7 +154,7 @@ const code_instance_args = Dict(
150154
:CSS => (c -> (parity_checks_x(c), parity_checks_z(c))).([Shor9(), Steane7(), Toric(4, 4)]),
151155
:Concat => [(Perfect5(), Perfect5()), (Perfect5(), Steane7()), (Steane7(), Cleve8()), (Toric(2, 2), Shor9())],
152156
:CircuitCode => random_circuit_code_args,
153-
:LPCode => (c -> (c.A, c.B)).(vcat(LP04, LP118, test_gb_codes, test_bb_codes, test_mbb_codes, test_coprimeBB_codes, other_lifted_product_codes)),
157+
:LPCode => (c -> (c.A, c.B)).(vcat(LP04, LP118, test_gb_codes, test_bb_codes, test_mbb_codes, test_coprimeBB_codes, test_hcubic_codes, other_lifted_product_codes)),
154158
:QuantumReedMuller => [3, 4, 5]
155159
)
156160

0 commit comments

Comments
 (0)