Introduction

The concept of a linear codes over a finite field (see Chapter LINEAR CODES OVER FINITE FIELDS) can be generalized to the notion of an additive code. Given a finite field F and the space of all n-tuples of F, an additive code is a subset of F(n) which is a K-linear subspace for some subfield K ⊆F.

Additive codes have become increasingly important recently due to their application to the construction of quantum error-correcting codes, though they are also of interest in their own right. A Magma package for quantum error-correcting codes is built on the machinery for additive codes.

In Magma an additive code has both an alphabet F and a coefficient field K, which is a subfield of F. An error-correcting code is considered to be defined by its wordset, so there may be several different ways of presenting a given code using different coefficient fields.

Since a given code may be presented over different coefficient rings, the dimension k of an additive code is defined relative to the alphabet of the code, #C = (#F)k, leading to possibility of fractional dimensions. Consequently, the number of generators of an additive code will not equal its dimension, there being [F:K] times as many generators. So a length n K-additive code over F has between zero and n * [F:K] generators.

For example, consider the two length 3 vectors over F4: (1, 0, ω2), (0, ω, 0). The linear code generated by these vectors consists of all scalar multiples and sums, resulting in a total of 42 = 16 vectors. But the F2-additive code generated by these two vectors contains only their sums, resulting in a total of 22 = 4 vectors. These vectors are (0, 0, 0), (1, 0, ω2), (0, ω, 0), (1, ω, ω2). The alphabet of this code is F4, its coefficient field is F2, it has 2 generators and is of dimension 1.

A length n, dimension k K-additive code over F with kg generators is represented in Magma as an [n, k : kg] K-additive code over F. The concepts of weight, distance and their respective distributions and enumerators transfer directly from linear codes. An [n, k : kg, d] K-additive code over F is a K-linear subset of F(n) which has fractional dimension k, kg generators and a minimum weight of d.

As a general rule, additive and linear codes may be used interchangeably. Indeed any linear code can be expressed as an additive code, using either its alphabet or any subfield as its coefficient field. So any linear code over a finite field, of type CodeLinFld, is in fact also an additive code, of type CodeAdd. The theory of purely linear codes is more general than that of additive codes so unfortunately not all operations are transferable.

V2.28, 13 July 2023