Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Haah's cubic code using abelian group ℤ₃ˣ³ via Hecke's Group Algebra #388

Merged
merged 9 commits into from
Nov 5, 2024
Merged
10 changes: 10 additions & 0 deletions docs/src/references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -523,3 +523,13 @@ @article{lin2024quantum
year={2024},
publisher={APS}
}

@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 @@ -40,6 +40,7 @@ For quantum code construction routines:
- [steane1999quantum](@cite)
- [campbell2012magic](@cite)
- [anderson2014fault](@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
20 changes: 20 additions & 0 deletions ext/QuantumCliffordHeckeExt/lifted_product.jl
Original file line number Diff line number Diff line change
Expand Up @@ -216,3 +216,23 @@ function bicycle_codes(a_shifts::Array{Int}, l::Int)
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 GB codes
Fe-r-oz marked this conversation as resolved.
Show resolved Hide resolved
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 [https://errorcorrectionzoo.org/c/haah_cubic](@cite).

```jldoctest
julia> c = Haah_cubic_codes([0, 15, 20, 28, 66], [0, 58, 59, 100, 121], 6);
Krastanov marked this conversation as resolved.
Show resolved Hide resolved

julia> code_n(c), code_k(c)
(432, 8)
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see also: bicycle_codes, generalized_bicycle_codes

"""
function Haah_cubic_codes(a_shifts::Array{Int}, b_shifts::Array{Int}, l::Int)
Fe-r-oz marked this conversation as resolved.
Show resolved Hide resolved
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 All @@ -65,7 +69,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, other_lifted_product_codes)),
:LPCode => (c -> (c.A, c.B)).(vcat(LP04, LP118, test_gb_codes, test_hcubic_codes, other_lifted_product_codes)),
:QuantumReedMuller => [3, 4, 5]
)

Expand Down
Loading