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_commutative_group_algebra to check whether Group Algebra is Commutative, L(a) = R(a) #447

Closed
Closed
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
2 changes: 1 addition & 1 deletion ext/QuantumCliffordHeckeExt/QuantumCliffordHeckeExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ 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,
haah_cubic_codes
haah_cubic_codes, check_commutative_group_algebra

include("util.jl")
include("types.jl")
Expand Down
9 changes: 9 additions & 0 deletions ext/QuantumCliffordHeckeExt/util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,12 @@ function check_repr_commutation_relation(GA::GroupAlgebra)
R_b = representation_matrix(b, :right)
return L_a * R_b == R_b * L_a
end

"""Checks whether the group algebra is commutative."""
function check_commutative_group_algebra(GA::GroupAlgebra)
a = rand(GA)
# Check whether the group algebra is commutative: L(a) = R(a)
L_a = representation_matrix(a)
R_a = representation_matrix(a, :right)
return L_a == R_a
end
3 changes: 3 additions & 0 deletions src/ecc/codes/util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ end

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

"""Implemented in a package extension with Hecke."""
function check_commutative_group_algebra end
Loading