Quadratic residue code
A quadratic residue code is a type of cyclic code.
There is a quadratic residue code of length
over the finite field
whenever
and
are primes,
is odd, and
is a quadratic residue modulo
.
Its generator polynomial as a cyclic code is given by
where is the set of quadratic residues of
in the set
and
is a primitive
th root of
unity in some finite extension field of
.
The condition that
is a quadratic residue
of
ensures that the coefficients of
lie in
. The dimension of the code is
.
Replacing
by another primitive
-th
root of unity
either results in the same code
or an equivalent code, according to whether or not
is a quadratic residue of
.