Skip to content

Commit

Permalink
add check_commutative_group_algebra to check whether Group Algebra is…
Browse files Browse the repository at this point in the history
… Commutative
  • Loading branch information
Fe-r-oz committed Dec 8, 2024
1 parent 5fcf353 commit a7ea8fd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
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

0 comments on commit a7ea8fd

Please sign in to comment.