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

Multivariate Bicycle code via Hecke's Group Algebra #381

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/src/references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -487,3 +487,13 @@ @article{anderson2014fault
year={2014},
publisher={APS}
}

@misc{voss2024multivariatebicyclecodes,
title={Multivariate Bicycle Codes},
author={Lukas Voss and Sim Jian Xian and Tobias Haug and Kishor Bharti},
year={2024},
eprint={2406.19151},
archivePrefix={arXiv},
primaryClass={quant-ph},
url={https://arxiv.org/abs/2406.19151},
}
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)
- [voss2024multivariatebicyclecodes](@cite)

For classical code construction routines:
- [muller1954application](@cite)
Expand Down
54 changes: 54 additions & 0 deletions ext/QuantumCliffordHeckeExt/lifted_product.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,60 @@ julia> code_n(c2), code_k(c2)
- When the base matrices of the `LPCode` are 1×1 and their elements are sums of cyclic permutations, the code is called a generalized bicycle code [`generalized_bicycle_codes`](@ref).
- When the two matrices are adjoint to each other, the code is called a bicycle code [`bicycle_codes`](@ref).

# Examples

The group algebra of the qubit multivariate bicycle (MB) code with r variables is `𝔽₂[𝐺ᵣ]`, where `𝐺ᵣ = ℤ/l₁ × ℤ/l₂ × ... × ℤ/lᵣ`.

[[48, 4, 6]] Weight-6 TB-QLDPC code from Appendix A Table 2 of [voss2024multivariatebicyclecodes](@cite).

```jldoctest
julia> import Hecke: group_algebra, GF, abelian_group, gens;

julia> l=4; m=6;

julia> GA = group_algebra(GF(2), abelian_group([l, m]));

julia> x = gens(GA)[1];

julia> y = gens(GA)[2];

julia> z = x*y;

julia> A = reshape([x^3 + y^5], (1, 1));

julia> B = reshape([x + z^5 + y^5 + y^2], (1, 1));

julia> c1 = LPCode(A, B);

julia> code_n(c1), code_k(c1)
(48, 4)
```

[[30, 4, 5]] Weight-7 TB-QLDPC code from Appendix A Table 2 of [voss2024multivariatebicyclecodes](@cite).

```jldoctest
julia> import Hecke: group_algebra, GF, abelian_group, gens;

julia> l=5; m=3;

julia> GA = group_algebra(GF(2), abelian_group([l, m]));

julia> x = gens(GA)[1];

julia> y = gens(GA)[2];

julia> z = x*y;

julia> A = reshape([x^4 + x^2], (1, 1));

julia> B = reshape([x + x^2 + y + z^2 + z^3], (1, 1));

julia> c1 = LPCode(A, B);

julia> code_n(c1), code_k(c1)
(30, 4)
```

## The representation function

We use the default representation function `Hecke.representation_matrix` to convert a `GF(2)`-group algebra element to a binary matrix.
Expand Down
167 changes: 167 additions & 0 deletions test/test_ecc_multivariate_bicycle.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
@testitem "ECC Multivaraite Bicycle" begin
using Hecke
using Hecke: group_algebra, GF, abelian_group, gens
using QuantumClifford.ECC: LPCode, code_k, code_n

@testset "Weight-4 QLDPC Codes" begin
# [[112, 8, 5]]
l=7; m=8
GA = group_algebra(GF(2), abelian_group([l, m]))
x = gens(GA)[1]
y = gens(GA)[2]
z = x*y
A = reshape([z^2 + z^6], (1, 1))
B = reshape([x + x^6], (1, 1))
c = LPCode(A, B)
@test code_n(c) == 112 && code_k(c) == 8

# [[64, 2, 8]]
l=8; m=4
GA = group_algebra(GF(2), abelian_group([l, m]))
x = gens(GA)[1]
y = gens(GA)[2]
z = x*y
A = reshape([x + x^2], (1, 1))
B = reshape([x^3 + y], (1, 1))
c = LPCode(A, B)
@test code_n(c) == 64 && code_k(c) == 2

# [[72, 2, 8]]
l=4; m=9
GA = group_algebra(GF(2), abelian_group([l, m]))
x = gens(GA)[1]
y = gens(GA)[2]
z = x*y
A = reshape([x + y^2], (1, 1))
B = reshape([x^2 + y^2], (1, 1))
c = LPCode(A, B)
@test code_n(c) == 72 && code_k(c) == 2

# [[96, 2, 8]]
l=6; m=8
GA = group_algebra(GF(2), abelian_group([l, m]))
x = gens(GA)[1]
y = gens(GA)[2]
z = x*y
A = reshape([x^5 + y^6], (1, 1))
B = reshape([z + z^4], (1, 1))
c = LPCode(A, B)
@test code_n(c) == 96 && code_k(c) == 2

# [[112, 2, 10]]
l=7; m=8
GA = group_algebra(GF(2), abelian_group([l, m]))
x = gens(GA)[1]
y = gens(GA)[2]
z = x*y
A = reshape([z^6 + x^5], (1, 1))
B = reshape([z^2 + y^5], (1, 1))
c = LPCode(A, B)
@test code_n(c) == 112 && code_k(c) == 2

# [[144, 2, 12]]
l=8; m=9
GA = group_algebra(GF(2), abelian_group([l, m]))
x = gens(GA)[1]
y = gens(GA)[2]
z = x*y
A = reshape([x^3 + y^7], (1, 1))
B = reshape([x + y^5], (1, 1))
c = LPCode(A, B)
@test code_n(c) == 144 && code_k(c) == 2
end

@testset "Weight-5 QLDPC Codes" begin
# [[30, 4, 5]]
l=3; m=5
GA = group_algebra(GF(2), abelian_group([l, m]))
x = gens(GA)[1]
y = gens(GA)[2]
z = x*y
A = reshape([x + z^4], (1, 1))
B = reshape([x + y^2 + z^2 ], (1, 1))
c = LPCode(A, B)
@test code_n(c) == 30 && code_k(c) == 4

# [[72, 4, 8]]
l=4; m=9
GA = group_algebra(GF(2), abelian_group([l, m]))
x = gens(GA)[1]
y = gens(GA)[2]
z = x*y
A = reshape([x + y^3], (1, 1))
B = reshape([x^2 + y + y^2 ], (1, 1))
c = LPCode(A, B)
@test code_n(c) == 72 && code_k(c) == 4

# [96, 4, 8]]
l=8; m=6
GA = group_algebra(GF(2), abelian_group([l, m]))
x = gens(GA)[1]
y = gens(GA)[2]
z = x*y
A = reshape([x^6 + x^3], (1, 1))
B = reshape([z^5 + x^5 + y ], (1, 1))
c = LPCode(A, B)
@test code_n(c) == 96 && code_k(c) == 4
end

@testset "Weight-6 QLDPC codes" begin
# [[30, 6, 4]]
l=5; m=3
GA = group_algebra(GF(2), abelian_group([l, m]))
x = gens(GA)[1]
y = gens(GA)[2]
z = x*y
A = reshape([x^4 + z^3], (1, 1))
B = reshape([x^4 + x + z^4 + y], (1, 1))
c = LPCode(A, B)
@test code_n(c) == 30 && code_k(c) == 6

# [[48, 6, 6]]
l=4; m=6
GA = group_algebra(GF(2), abelian_group([l, m]))
x = gens(GA)[1]
y = gens(GA)[2]
z = x*y
A = reshape([x^2 + y^4], (1, 1))
B = reshape([x^3 + z^3 + y^2 + y], (1, 1))
c = LPCode(A, B)
@test code_n(c) == 48 && code_k(c) == 6

# [[40, 4, 6]]
l=4; m=5
GA = group_algebra(GF(2), abelian_group([l, m]))
x = gens(GA)[1]
y = gens(GA)[2]
z = x*y
A = reshape([x^2 + y], (1, 1))
B = reshape([y^4 + y^2 + x^3 + x], (1, 1))
c = LPCode(A, B)
@test code_n(c) == 40 && code_k(c) == 4

# [[48, 4, 6]]
l=4; m=6
GA = group_algebra(GF(2), abelian_group([l, m]))
x = gens(GA)[1]
y = gens(GA)[2]
z = x*y
A = reshape([x^3 + y^5], (1, 1))
B = reshape([x + z^5 + y^5 + y^2], (1, 1))
c = LPCode(A, B)
@test code_n(c) == 48 && code_k(c) == 4
end

@testset "Weight-7 QLDPC codes" begin
# [[30, 4, 5]]
l=5; m=3;
GA = group_algebra(GF(2), abelian_group([l, m]));
x = gens(GA)[1]
y = gens(GA)[2]
z = x*y
A = reshape([x^4 + x^2], (1, 1))
B = reshape([x + x^2 + y + z^2 + z^3], (1, 1))
c = LPCode(A, B)
@test code_n(c) == 30 && code_k(c) == 4
end
end
Loading