- class property galois.FieldArray.quadratic_non_residues : FieldArray
All quadratic non-residues in the Galois field.
An element \(x\) in \(\mathrm{GF}(p^m)\) is a quadratic non-residue if there does not exist a \(y\) such that \(y^2 = x\) in the field.
See also
Examples¶
In fields with characteristic 2, no elements are quadratic non-residues.
In [1]: GF = galois.GF(2**4) In [2]: GF.quadratic_non_residues Out[2]: GF([], order=2^4)
In fields with characteristic greater than 2, exactly half of the nonzero elements are quadratic non-residues.
In [3]: GF = galois.GF(11) In [4]: GF.quadratic_non_residues Out[4]: GF([ 2, 6, 7, 8, 10], order=11)