In quantum information, the gnu code refers to a particular family of quantum error correcting codes, with the special property of being invariant under permutations of the qubits. Given integers g (the gap), n (the occupancy), and m (the length of the code), the two codewords are


where
are the Dicke states consisting of a uniform superposition of all weight-k words on m qubits, e.g.

The real parameter
scales the length of the code. The number
needs to be at least 1. The length
, hence the name of the code. The distance of the code is the minimum of
and
. For
and
, the gnu code is capable of correcting
erasure errors, or deletion errors. The code can also correct up to
corrupted qubits from the property of the distance.