Weight Enumerators, Distributions, And Minimum Distances
For more information on the algorithms contained in this function see "Enumeration Based Algorithms" by Gregory White.
enumeration-based algorithms using the binary, reflected Gray code such as Brouwer-Zimmermann and adaptions
notational used for complete and Hamming weight enumerators
AbstractAlgebra.polynomial
— Methodpolynomial(W::WeightEnumerator)
Returns the polynomial of the weight enumerator W
.
CodingTheory.CWE_to_HWE
— MethodCWE_to_HWE(CWE::WeightEnumerator)
Return the Hamming weight enumerator associated with the complete weight enumerator CWE
.
CodingTheory.QDistRndCSS
— FunctiondistrandCSS(H_X::Matrix{Int}, H_Z::Matrix{Int}, num::Int, min_dist::Int=0, debug::Int=0, field::GapObj=GAP.Globals.GF(2), max_av=Nothing)
Wrapper for the QDistRnd function DistRandCSS.
QDistRnd documentation
num
: number of information sets to construct (should be large).min_dist
: the algorithm stops when distance equal or belowmin_dist
is found and returns the result with negative sign. Setmin_dist
to 0 if you want the actual distance.debug
: optional integer argument containing debug bitmap (default:0
).- 1 (0s bit set): print 1st of the vectors found.
- 2 (1st bit set): check orthogonality of matrices and of the final vector.
- 4 (2nd bit set): show occasional progress update.
- 8 (3rd bit set): maintain cw count and estimate the success probability.
field
(Options stack): Galois field, default: GF(2).max_av
(Options stack): if set, terminate when<n>
greater thanmax_av
, see Section Emprirical. Not set by default.
CodingTheory.Sterns_attack
— FunctionSterns_attack(C::AbstractLinearCode, w::Int, p::Int, l::Int)
Search for codewords of C
of weight w
using Stern's attack and return any found.
CodingTheory.minimum_distance
— Functionminimum_distance(C::AbstractLinearCode, alg::String="trellis", sect::Bool=false)
Return the minimum distance of the linear code if known, otherwise computes it using the algorithm of alg
. If alg = "trellis"
, the sectionalization flag sect
can be set to true to further compactify the reprsentation.
CodingTheory.minimum_distance
— Functionminimum_distance(Q::AbstractStabilizerCode, alg::String="trellis", sect::Bool=false)
Return the minimum distance of the stabilizer code if known, otherwise computes it.
CodingTheory.minimum_words
— Methodminimum_words(C::AbstractLinearCode)
Return the set of codewords of C
with weight equal to the minimum distance.
Notes
- This algorithm simultaneously computes the minimum distance and stores the words of this weight that it finds, removing the repeated work of calling
w = minimum_distance(C); W = words_of_weight(C, w);
CodingTheory.type
— Methodtype(W::WeightEnumerator)
Returns the type of the weight enumerator W
.
CodingTheory.weight_distribution
— Functionweight_distribution(C::AbstractLinearCode, alg::String="auto", compact::Bool=true)
Return the weight distribution of C
using the algorithm alg
. If compact
is false, the result will be a Vector{BigInt}
of length length(C) + 1
whose i
th entry is the number of codewords of C
of Hamming weight i - 1
. Otherwise, the result is a Vector{Tuple{Int, BigInt}}
whose entries specify the nonzero indices and values of the above.
CodingTheory.weight_enumerator
— Functionweight_enumerator(C::AbstractLinearCode, type::Symbol=:complete, alg::String="auto")
Return either the :complete
or :Hamming
weight enumerator of C
using the algorithm alg
.
CodingTheory.weight_plot
— Functionweight_plot(S::AbstractStabilizerCode, alg::String="auto", type::String="stabilizer")
Return a bar plot of the weight distribution related to S
.
If type
is stabilizer
, the weight distribution of the stabilizers are computed. If type
is normalizer
, the weight distrbution of the normalizer of the stabilizers are computed. If type
is quotient
, the weight distrbution of the normalizer mod the stabilizers (logical representatives only) is computed.
CodingTheory.weight_plot
— Functionweight_plot(C::AbstractLinearCode, alg::String="auto")
Return a bar plot of the weight distribution of C
.
CodingTheory.words_of_weight
— Functionwords_of_weight(C::AbstractLinearCode, bound::Int, verbose::Bool=false)
Return all the codewords of C
of Hamming weight bound
.
CodingTheory.words_of_weight
— Functionwords_of_weight(C::AbstractLinearCode, l_bound::Int, u_bound::Int, verbose::Bool=false)
Return all the codewords of C
of Hamming weight in the range [l_bound, u_bound]
.
Hecke.support
— Functionsupport(S::AbstractStabilizerCode, alg::String="auto", type::String="stabilizer")
Returns the support related to S
.
The support is the collection of nonzero exponents of the Hamming weight enumerator. If type
is stabilizer
, the support of the stabilizers are computed. If type
is normalizer
, the support of the normalizer of the stabilizers are computed. If type
is quotient
, the support of the normalizer mod the stabilizers (logical representatives only) is computed.
Hecke.support
— Methodsupport(C::AbstractLinearCode)
Returns the support of C
.
Notes
- The support of
C
is the collection of nonzero exponents of the Hamming weight enumerator ofC
.