# Linear \(q\)-ary code

## Description

An \((n,K,d)_q\) linear code is denoted as \([n,k,d]_q\), where \(k=\log_{q}K\) need not be an integer. Its codewords form a linear subspace, i.e., for any codewords \(x,y\), \(\alpha x+ \beta y\) is also a codeword for any \(q\)-ary digits \(\alpha,\beta\).

Linear codes can be defined in terms of a generator matrix \(G\), whose rows form a basis for the \(k\)-dimensional codespace. Given a codeword \(x\), the corresponding encoded codeword is \(G^T x\). The generator matrix can be reduced via coordinate permutations to its standard or systematic form \(G = [I_k~~A]\), where \(I_k\) is a \(k\times k\) identity matrix and \(A\) is a \(k \times (n-k)\) \(q\)-ary matrix.

## Protection

## Decoding

## Notes

## Parent

- Additive \(q\)-ary code — For \(q>2\), additive codes need not be linear since linearity also requires closure under multiplication.

## Children

## Cousins

- Entanglement-assisted (EA) QECC — Any linear \(q\)-ary code can be used to construct an EAQECC.
- Entanglement-assisted (EA) stabilizer code — Any linear quaternary (\(q=4\)) code can be used to construct an EA stabilizer code.
- Galois-qudit CSS code — Construction uses two related \(q\)-ary linear codes \(C_X\) and \(C_Z\).
- Low-density parity-check (LDPC) code — \(q\)-ary LDPC codes are a subset of \(q\)-ary linear codes.
- Modular-qudit CSS code — Construction for prime \(q=p\) uses two related \(p\)-ary linear codes \(C_X\) and \(C_Z\).
- True Galois-qudit stabilizer code — A true Galois-qudit stabilizer code is the closest quantum analogue of a linear code over \(GF(q)\) because the \(q\)-ary vectors defining each code form a linear subspace.

## Zoo code information

## References

- [1]
- Atri Rudra and Mary Wootters, “Average-radius list-recovery of random linear codes: it really ties the room together”. 1704.02420

## Cite as:

“Linear \(q\)-ary code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2022. https://errorcorrectionzoo.org/c/q-ary_linear