Utilies
AbstractAlgebra.lift — Methodlift(A::MatElem{T}, type::Symbol=:col) where T <: ResElemReturn the matrix whose residue polynomial elements are converted to circulant matrices over the base field.
AbstractAlgebra.lift — Methodlift(A::MatElem{T}, type::Symbol=:col) where T <: CTGroupAlgebraReturn the matrix whose group algebra elements are converted to circulant matrices over the base field.
Base.copy — Methodcopy(C::T) where T <: AbstractCodeReturns a copy of the code C.
CodingTheory.:⊕ — Method⊕(A::CTMatrixTypes, B::CTMatrixTypes)
direct_sum(A::CTMatrixTypes, B::CTMatrixTypes)Return the direct sum of the two matrices A and B.
CodingTheory.Hamming_distance — MethodHamming_distance(u::T, v::T) where T <: Union{CTMatrixTypes, Vector{S}} where S <: Integer
distance(u::T, v::T) where T <: Union{CTMatrixTypes, Vector{S}} where S <: Integer
dist(u::T, v::T) where T <: Union{CTMatrixTypes, Vector{S}} where S <: IntegerReturn the Hamming distance between u and v.
CodingTheory.Hamming_weight — MethodHamming_weight(v::T) where T <: Union{CTMatrixTypes, Vector{S}} where S <: Integer
weight(v::T) where T <: Union{CTMatrixTypes, Vector{S}} where S <: Integer
wt(v::T) where T <: Union{CTMatrixTypes, Vector{S}} where S <: IntegerReturn the Hamming weight of v.
CodingTheory.Hermitian_conjugate_matrix — MethodHermitian_conjugate_matrix(A::CTMatrixTypes)Return the Hermitian conjugate of the matrix A.
CodingTheory.Hermitian_inner_product — MethodHermitian_inner_product(u::CTMatrixTypes, v::CTMatrixTypes)Return the Hermitian inner product of u and v.
CodingTheory.are_equivalent_basis — Methodare_equivalent_basis(basis::Vector{fq_nmod}, basis2::Vector{fq_nmod})Return true if basis is a scalar multiple of basis2.
CodingTheory.are_symplectic_orthogonal — Methodare_symplectic_orthogonal(A::CTMatrixTypes, B::CTMatrixTypes)Return true if the rows of the matrices A and B are symplectic orthogonal.
CodingTheory.dual_basis — Methoddual_basis(E::FqNmodFiniteField, F::FqNmodFiniteField, basis::Vector{fq_nmod})
complementary_basis(E::FqNmodFiniteField, F::FqNmodFiniteField, basis::Vector{fq_nmod})Return the dual (complentary) basis of basis for the extension E/F.
CodingTheory.edge_vertex_incidence_graph — Methodedge_vertex_incidence_graph(G::SimpleGraph{Int})Return the edge-vertex incidence graph of G along with the vertex incides of the left and right bipartition.
CodingTheory.edge_vertex_incidence_matrix — Methodedge_vertex_incidence_matrix(G::SimpleGraph{Int})Return the edge-vertex incidence matrix of G along with the vertex incides of the left and right bipartition.
CodingTheory.expand_matrix — Methodexpand_matrix(M::CTMatrixTypes, K::FqNmodFiniteField, β::Vector{fq_nmod})Return the matrix constructed by expanding the elements of M to the subfield K using the basis β for the base ring of M over K.
CodingTheory.extract_bipartition — Methodextract_bipartition(G::SimpleGraph{Int})Return two vectors representing the vertex indices of each side of the bipartition.
CodingTheory.group_algebra_element_to_circulant_matrix — Functiongroup_algebra_element_to_circulant_matrix(x::CTGroupAlgebra; type::Symbol=:col)Return the circulant matrix whose first row or column is the coefficients of x if type is :row or :col, respectively.
CodingTheory.is_basis — Methodis_basis(E::FqNmodFiniteField, F::FqNmodFiniteField, basis::Vector{fq_nmod})Return true and the dual (complementary) basis if basis is a basis for E/F, otherwise return false, missing.
CodingTheory.is_extension — Methodis_extension(E::FqNmodFiniteField, F::FqNmodFiniteField)Return true if E/F is a valid field extension.
CodingTheory.is_normal_basis — Methodis_normal_basis(E::FqNmodFiniteField, F::FqNmodFiniteField, basis::Vector{fq_nmod})Return true if basis is a normal basis for E/F.
CodingTheory.is_primitive_basis — Methodis_primitive_basis(E::FqNmodFiniteField, F::FqNmodFiniteField, basis::Vector{fq_nmod})Return true if basis is a primitive basis for E/F.
CodingTheory.is_self_dual_basis — Methodis_self_dual_basis(E::FqNmodFiniteField, F::FqNmodFiniteField, basis::Vector{fq_nmod})Return true if basis is equal to its dual.
CodingTheory.is_triorthogonal — Functionis_triorthogonal(G::CTMatrixTypes, verbose::Bool=false)
is_triorthogonal(G::Matrix{Int}, verbose::Bool=false)Return true if the binary matrix G is triorthogonal.
Notes
- If the optional parameter
verbosis set totrue, the first pair or triple of non-orthogonal rows will be identified on the console.
CodingTheory.is_valid_bipartition — Methodis_valid_bipartition(G::SimpleGraph{Int}, left::Vector{Int}, right::Vector{Int})Return true if the vertices indexed by left and right form a valid bipartition for G.
CodingTheory.primitive_basis — Methodprimitive_basis(E::FqNmodFiniteField, F::FqNmodFiniteField)Return a primitive basis for E/F and its dual (complementary) basis.
CodingTheory.pseudoinverse — Methodpseudoinverse(M::CTMatrixTypes)Return the pseudoinverse of a stabilizer matrix M over a quadratic extension.
Notes
- This is not the Penrose-Moore pseudoinverse.
CodingTheory.quadratic_residues — Methodquadratic_residues(q::Int, n::Int)Return the sets of quadratic resides and quadratic non-residues of q and n.
CodingTheory.residue_polynomial_to_circulant_matrix — Functionresidue_polynomial_to_circulant_matrix(f::ResElem)
Return the circulant matrix whose first row or column is the coefficients of `f` if `type` is `:row` or `:col`, respectively.CodingTheory.row_supports — Method" row_supports(M::CTMatrixTypes)
Returns a vector where the ith entry lists the indices of the nonzero entries of M[i, :]
CodingTheory.row_supports_symplectic — Method" rowsupportssymplectic(M::CTMatrixTypes)
Returns a vector where the ith entry is a 2-tuple of lists with the indices of the nonzero X and Z entries of M[i, :]
CodingTheory.strongly_lower_triangular_reduction — Methodstrongly_lower_triangular_reduction(A::CTMatrixTypes)Return a strongly lower triangular basis for the kernel of A and a unit vector basis for the complement of the image of transpose(A).
- Note
- This implements Algorithm 1 from https://doi.org/10.48550/arXiv.2204.10812
CodingTheory.symplectic_inner_product — Methodsymplectic_inner_product(u::CTMatrixTypes, v::CTMatrixTypes)Return the symplectic inner product of u and v.
CodingTheory.verify_dual_basis — Methodverify_dual_basis(E::FqNmodFiniteField, F::FqNmodFiniteField, basis::Vector{fq_nmod}, dual_basis::Vector{fq_nmod})
verify_complementary_basis(E::FqNmodFiniteField, F::FqNmodFiniteField, basis::Vector{fq_nmod}, dual_basis::Vector{fq_nmod})Return true if basis is the dual of dual_basis for E/F, otherwise return false.
CodingTheory.wt — Methodwt(f::CTPolyRingElem)Return the number of nonzero coefficients of the polynomial f.
Hecke.:⊗ — Method⊗(A::CTMatrixTypes, B::CTMatrixTypes)
kron(A::CTMatrixTypes, B::CTMatrixTypes)
tensor_product(A::CTMatrixTypes, B::CTMatrixTypes)
kronecker_product(A::CTMatrixTypes, B::CTMatrixTypes)Return the Kronecker product of the two matrices A and B.
Hecke.is_regular — Methodis_regular(G::SimpleGraph{Int})Return true if G is regular.
LinearAlgebra.tr — Functiontr(x::fq_nmod, K::FqNmodFiniteField, verify::Bool=false)Return the relative trace of x from its base field to the field K.
Notes
- If the optional parameter
verifyis set totrue, the two fields are checked for compatibility.