Skip to content

Commit

Permalink
Haah's cubic code using abelian group ℤ₃ˣ³ via Hecke's Group Algebra (#…
Browse files Browse the repository at this point in the history
…388)



Co-authored-by: Stefan Krastanov <github.acc@krastanov.org>
  • Loading branch information
Fe-r-oz and Krastanov authored Nov 5, 2024
1 parent 45e9f4d commit ce1dc02
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 7 deletions.
10 changes: 10 additions & 0 deletions docs/src/references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -551,3 +551,13 @@ @article{bravyi2024high
year={2024},
publisher={Nature Publishing Group UK London}
}

@article{haah2011local,
title={Local stabilizer codes in three dimensions without string logical operators},
author={Haah, Jeongwan},
journal={Physical Review A?Atomic, Molecular, and Optical Physics},
volume={83},
number={4},
pages={042330},
year={2011},
}
1 change: 1 addition & 0 deletions docs/src/references.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ For quantum code construction routines:
- [voss2024multivariatebicyclecodes](@cite)
- [lin2024quantum](@cite)
- [bravyi2024high](@cite)
- [haah2011local](@cite)

For classical code construction routines:
- [muller1954application](@cite)
Expand Down
3 changes: 2 additions & 1 deletion ext/QuantumCliffordHeckeExt/QuantumCliffordHeckeExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import Nemo: characteristic, matrix_repr, GF, ZZ, lift

import QuantumClifford.ECC: AbstractECC, CSS, ClassicalCode,
hgp, code_k, code_n, code_s, iscss, parity_checks, parity_checks_x, parity_checks_z, parity_checks_xz,
two_block_group_algebra_codes, generalized_bicycle_codes, bicycle_codes, check_repr_commutation_relation
two_block_group_algebra_codes, generalized_bicycle_codes, bicycle_codes, check_repr_commutation_relation,
haah_cubic_codes

include("util.jl")
include("types.jl")
Expand Down
32 changes: 27 additions & 5 deletions ext/QuantumCliffordHeckeExt/lifted_product.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ The default representation, provided by `Hecke`, is the permutation representati
We also accept a custom representation function as detailed in [`LiftedCode`](@ref).
See also: [`LiftedCode`](@ref), [`two_block_group_algebra_codes`](@ref), [`generalized_bicycle_codes`](@ref), [`bicycle_codes`](@ref).
See also: [`LiftedCode`](@ref), [`two_block_group_algebra_codes`](@ref), [`generalized_bicycle_codes`](@ref), [`bicycle_codes`](@ref),
[`haah_cubic_codes`](@ref).
$TYPEDFIELDS
"""
Expand Down Expand Up @@ -251,12 +252,10 @@ julia> 𝜋 = gens(GA)[1];
julia> A = 𝜋^2 + 𝜋^5 + 𝜋^44;
julia> B = 𝜋^8 + 𝜋^14 + 𝜋^47;
(108, 12)
```
See also: [`LPCode`](@ref), [`generalized_bicycle_codes`](@ref), [`bicycle_codes`](@ref).
See also: [`LPCode`](@ref), [`generalized_bicycle_codes`](@ref), [`bicycle_codes`](@ref), [`haah_cubic_codes`](@ref).
"""
function two_block_group_algebra_codes(a::GroupAlgebraElem, b::GroupAlgebraElem)
LPCode([a;;], [b;;])
Expand Down Expand Up @@ -302,10 +301,33 @@ Bicycle codes are a special case of generalized bicycle codes,
where `a` and `b` are conjugate to each other.
The order of the cyclic group is `l`, and the shifts `a_shifts` and `b_shifts` are reverse to each other.
See also: [`two_block_group_algebra_codes`](@ref), [`generalized_bicycle_codes`](@ref).
See also: [`two_block_group_algebra_codes`](@ref), [`generalized_bicycle_codes`](@ref), [`haah_cubic_codes`](@ref).
""" # TODO doctest example
function bicycle_codes(a_shifts::Array{Int}, l::Int)
GA = group_algebra(GF(2), abelian_group(l))
a = sum(GA[n÷l+1] for n in a_shifts)
two_block_group_algebra_codes(a, group_algebra_conj(a))
end

"""
Haah’s cubic codes [haah2011local](@cite) can be viewed as generalized bicycle (GB) codes
with the group `G = Cₗ × Cₗ × Cₗ`, where `l` denotes the lattice size. In particular, a GB
code with the group `G = ℤ₃ˣ³` corresponds to a cubic code.
The ECC Zoo has an [entry for this family](https://errorcorrectionzoo.org/c/haah_cubic).
```jldoctest
julia> c = haah_cubic_codes([0, 15, 20, 28, 66], [0, 58, 59, 100, 121], 6);
julia> code_n(c), code_k(c)
(432, 8)
```
See also: [`bicycle_codes`](@ref), [`generalized_bicycle_codes`](@ref), [`two_block_group_algebra_codes`](@ref).
"""
function haah_cubic_codes(a_shifts::Array{Int}, b_shifts::Array{Int}, l::Int)
GA = group_algebra(GF(2), abelian_group([l,l,l]))
a = sum(GA[n%dim(GA)+1] for n in a_shifts)
b = sum(GA[n%dim(GA)+1] for n in b_shifts)
two_block_group_algebra_codes(a, b)
end
1 change: 1 addition & 0 deletions src/ecc/ECC.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export parity_checks, parity_checks_x, parity_checks_z, iscss,
Shor9, Steane7, Cleve8, Perfect5, Bitflip3,
Toric, Gottesman, Surface, Concat, CircuitCode, QuantumReedMuller,
LPCode, two_block_group_algebra_codes, generalized_bicycle_codes, bicycle_codes,
haah_cubic_codes,
random_brickwork_circuit_code, random_all_to_all_circuit_code,
evaluate_decoder,
CommutationCheckECCSetup, NaiveSyndromeECCSetup, ShorSyndromeECCSetup,
Expand Down
3 changes: 3 additions & 0 deletions src/ecc/codes/lifted_product.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ function generalized_bicycle_codes end

"""Implemented in a package extension with Hecke."""
function bicycle_codes end

"""Implemented in a package extension with Hecke."""
function haah_cubic_codes end
6 changes: 5 additions & 1 deletion test/test_ecc_base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ test_gb_codes = [
generalized_bicycle_codes([0, 1, 14, 16, 22], [0, 3, 13, 20, 42], 63), # (A2) [[126, 28, 8]]
]

test_hcubic_codes = [
haah_cubic_codes([0, 15, 20, 28, 66], [0, 58, 59, 100, 121], 3)
]

other_lifted_product_codes = []

# [[882, 24, d≤24]] code from (B1) in Appendix B of [panteleev2021degenerate](@cite)
Expand Down Expand Up @@ -150,7 +154,7 @@ const code_instance_args = Dict(
:CSS => (c -> (parity_checks_x(c), parity_checks_z(c))).([Shor9(), Steane7(), Toric(4, 4)]),
:Concat => [(Perfect5(), Perfect5()), (Perfect5(), Steane7()), (Steane7(), Cleve8()), (Toric(2, 2), Shor9())],
:CircuitCode => random_circuit_code_args,
: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)),
: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)),
:QuantumReedMuller => [3, 4, 5]
)

Expand Down

0 comments on commit ce1dc02

Please sign in to comment.