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

add check_repr_regular_linear to verify F-linear regular representation for Group Algebra elements #407

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
3 changes: 2 additions & 1 deletion ext/QuantumCliffordHeckeExt/QuantumCliffordHeckeExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ 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
two_block_group_algebra_codes, generalized_bicycle_codes, bicycle_codes, check_repr_regular_linear

include("util.jl")
include("types.jl")
include("lifted.jl")
include("lifted_product.jl")
Expand Down
17 changes: 17 additions & 0 deletions ext/QuantumCliffordHeckeExt/util.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
""""
Verifies that the specified group elements constitute a regular F-linear representation
of the group G by checking the properties L(a)L(b) = L(ab) and R(a)R(b) = R(ba) for any

Check warning on line 3 in ext/QuantumCliffordHeckeExt/util.jl

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"ba" should be "by" or "be".
elements a, b in the group algebra F[G].
"""
function check_repr_regular_linear(GA::GroupAlgebra)
a, b = rand(GA), rand(GA)
# L(a)L(b) = L(ab)
L_a = representation_matrix(a)
L_b = representation_matrix(b)
L_ab = representation_matrix(a*b)
# R(a)R(b) = R(ba)

Check warning on line 12 in ext/QuantumCliffordHeckeExt/util.jl

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"ba" should be "by" or "be".
R_a = representation_matrix(a, :right)
R_b = representation_matrix(b, :right)
R_ba = representation_matrix(b*a, :right)

Check warning on line 15 in ext/QuantumCliffordHeckeExt/util.jl

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"ba" should be "by" or "be".
return L_a * L_b == L_ab && R_a * R_b == R_ba

Check warning on line 16 in ext/QuantumCliffordHeckeExt/util.jl

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"ba" should be "by" or "be".
end
3 changes: 3 additions & 0 deletions src/ecc/codes/util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ function hgp(h₁,h₂)
hz = hcat(kron(LinearAlgebra.I(n₁), h₂), kron(h₁', LinearAlgebra.I(r₂)))
hx, hz
end

"""Implemented in a package extension with Hecke."""
function check_repr_regular_linear end
2 changes: 2 additions & 0 deletions test/test_ecc_base.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Test
using QuantumClifford
using QuantumClifford.ECC
using QuantumClifford.ECC: check_repr_regular_linear
using InteractiveUtils

import Nemo: GF
Expand Down Expand Up @@ -46,6 +47,7 @@ other_lifted_product_codes = []
# [[882, 24, d≤24]] code from (B1) in Appendix B of [panteleev2021degenerate](@cite)
l = 63
GA = group_algebra(GF(2), abelian_group(l))
@test check_repr_regular_linear(GA)
A = zeros(GA, 7, 7)
x = gens(GA)[]
A[LinearAlgebra.diagind(A)] .= x^27
Expand Down
Loading