Galois-field \(q\)-ary code 

Root code for the Galois-field Kingdom


Encodes \(K\) states (codewords) in \(n\) \(q\)-ary coordinates over the field \(GF(q)=\mathbb{F}_q\) and has distance \(d\). Usually denoted as \((n,K,d)_q\). The distance is the minimum number of coordinates where two strings in the code differ.


The standard metric for Galois-field \(q\)-ary codes is the Hamming metric, but other metrics also exist [1]. Detects errors on up to \(d-1\) coordinates, corrects erasure errors on up to \(d-1\) coordinates, and corrects general errors on up to \(\left\lfloor (d-1)/2 \right\rfloor\) coordinates.


The rate of a \(q\)-ary code is usually defined as \(R=\frac{1}{n}\log_q K\) dits per symbol.


For small \(n\), decoding can be based on a lookup table. For infinite code families, the size of such a table scales exponentially with \(n\), so approximate decoding algorithms scaling polynomially with \(n\) have to be used. The decoder determining the most likely error given a noise channel is called the maximum-likelihood decoder.Given a received string \(x\) and an error bound \(e\), a list decoder returns a list of all codewords that are at most \(e\) from \(x\). The number of codewords in a neighborhood of \(x\) has to be polynomial in \(n\) in order for this decoder to run in time polynomial in \(n\).


Tables of bounds and examples of linear codes for various \(n\) and \(k\), extending code tables by Brouwer [2], are maintained by M. Grassl at this website.


  • Ring code — Galois fields are rings under addition.



  • Combinatorial design code — Designs can be constructed from \(q\)-ary codes by taking the supports of a subset of codewords of constant weight.
  • Convolutional code — Convolutional codes for finite block size are \(q\)-ary codes.
  • Polyphase code — Polyphase codes are spherical codes that can be obtained from \(q\)-ary codes.


M. Grassl, A.-L. Horlemann, and V. Weger, “The Subfield Metric and its Application to Quantum Error Correction”, Journal of Algebra and Its Applications (2023) arXiv:2212.00431 DOI
Andries E. Brouwer, Bounds on linear codes, in: Vera S. Pless and W. Cary Huffman (Eds.), Handbook of Coding Theory, pp. 295-461, Elsevier, 1998.
Page edit log

Your contribution is welcome!

on (edit & pull request)— see instructions

edit on this site

Zoo Code ID: q-ary_digits_into_q-ary_digits

Cite as:
“Galois-field \(q\)-ary code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2022.
@incollection{eczoo_q-ary_digits_into_q-ary_digits, title={Galois-field \(q\)-ary code}, booktitle={The Error Correction Zoo}, year={2022}, editor={Albert, Victor V. and Faist, Philippe}, url={} }
Share via:
Twitter | Mastodon |  | E-mail
Permanent link:

Cite as:

“Galois-field \(q\)-ary code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2022.