diff --git a/ext/QuantumCliffordHeckeExt/QuantumCliffordHeckeExt.jl b/ext/QuantumCliffordHeckeExt/QuantumCliffordHeckeExt.jl index 89d7bae0c..d2bfa592b 100644 --- a/ext/QuantumCliffordHeckeExt/QuantumCliffordHeckeExt.jl +++ b/ext/QuantumCliffordHeckeExt/QuantumCliffordHeckeExt.jl @@ -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") diff --git a/ext/QuantumCliffordHeckeExt/util.jl b/ext/QuantumCliffordHeckeExt/util.jl index d8fc65e85..ddd706752 100644 --- a/ext/QuantumCliffordHeckeExt/util.jl +++ b/ext/QuantumCliffordHeckeExt/util.jl @@ -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 diff --git a/src/ecc/codes/util.jl b/src/ecc/codes/util.jl index b96a75120..6a07e01bb 100644 --- a/src/ecc/codes/util.jl +++ b/src/ecc/codes/util.jl @@ -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