Here is a list of codes whose codewords have constant weight.
| Code | Description | 
|---|---|
| Balanced code | An even-length-\(n\) \(q\)-ary code whose nonzero codewords all have a Hamming weight of \(n/2\). A code is \(\epsilon\)-balanced if the relative weight (i.e., weight divided by \(n\)) of all nonzero codewords lies in the interval \([\frac{1-\epsilon}{2},\frac{1+\epsilon}{2}]\). A code is \(\gamma\)-unbiased if the relative weight lies in the interval \((\frac{1}{2}-\frac{1}{n^{\gamma}},\frac{1}{2}+\frac{1}{n^{\gamma}})\). | 
| Binary balanced spherical code | An \((n-1,K,\frac{nd}{nw-w^2})\) spherical code obtained from a constant-weight-\(w\) binary \((n,K,d)\) code via a component-wise binary balanced mapping (also known as the CW\(_2\) construction), \begin{align} \begin{split} 0&\to\sqrt{\frac{w}{n\left(n-w\right)}}\\1&\to -\sqrt{\frac{n-w}{nw}}~. \end{split} \tag*{(1)}\end{align} This construction can be extended to the general balanced binary construction CW\(_q\) for spherical code alphabets of size \(q\) [1; Sec. 6.6]. | 
| Combinatorial design | A constant-weight binary code that is mapped into a combinatorial \(t\)-design. | 
| Constant-dimension code | A subspace code whose codewords are \(k\)-dimensional subspaces of \(\mathbb{F}_q^n\) for fixed \(k\). Constant-dimension codes are equivalent to linear authentication codes [2; Thm. 4.1]. | 
| Constant-excitation (CE) code | Code whose codewords lie in an excited-state eigenspace of a Hamiltonian governing the total energy or total number of excitations of the underlying quantum system. For qubit codes, such a Hamiltonian is often the total spin Hamiltonian, \(H=\sum_i Z_i\). For spin-\(S\) codes, this generalizes to \(H=\sum_i J_z^{(i)}\), where \(J_z\) is the spin-\(S\) \(Z\)-operator. For bosonic (and, similarly, for fermion) codes, such as Fock-state codes, codewords are often in an eigenspace with eigenvalue \(N>0\) of the total excitation or energy Hamiltonian, \(H=\sum_i \hat{n}_i\). | 
| Constant-weight block code | A block code whose codewords all have the same number of nonzero coordinates. Code constructions exist for codes over fields [3] or rings [4]. | 
| Constant-weight code | A binary code whose codewords all have the same Hamming weight \(w\). | 
| Divisible code | A linear \(q\)-ary block code is \(\Delta\)-divisible if the Hamming weight of each of its codewords is divisible by divisor \(\Delta\). A \(2\)-divisible (\(4\)-divisible, \(8\)-divisible) code is called even (doubly even, triply even) [5,6]. A code is called singly even if all codewords are even and at least one has weight equal to 2 modulo 4. More generally, a code is \(m\)-even if it is \(2^{m}\)-divisible. | 
| Hadamard code | An \([2^m,m,2^{m-1}]\) balanced binary code. The \([2^m,m+1,2^{m-1}]\) augmented Hadamard code is the first-order RM code (a.k.a. RM\((1,m)\)), while the \([2^m-1,m,2^{m-1}]\) shortened Hadamard code is the simplex code (a.k.a. RM\(^*(1,m)\)). | 
| Linear \(q\)-ary code | 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\). This extra structure yields much information about their properties, making them a large and well-studied subset of codes. | 
| Linear binary code | An \((n,2^k,d)\) linear code is denoted as \([n,k]\) or \([n,k,d]\), where \(d\) is the code’s distance. Its codewords form a linear subspace, i.e., for any codewords \(x,y\), \(x+y\) is also a codeword. A code that is not linear is called nonlinear. | 
| Linear code over \(\mathbb{Z}_q\) | A code encoding \(K\) states (codewords) in \(n\) coordinates over the ring \(\mathbb{Z}_q\) of integers modulo \(q\) that forms an Abelian subgroup of \(\mathbb{Z}_q^n\) under addition. Since addition of \(m\) identical elements is equivalent to multiplying by \(m\), linear codes over \(\mathbb{Z}_q\) are automatically closed under scalar multiplication. More technically, linear codes over \(\mathbb{Z}_q\) are submodules of \(\mathbb{Z}_q^n\). | 
| One-hot code | A length-\(n\) binary code whose codewords are those with Hamming weight one. The reverse of this code, where all codewords have Hamming weight \(n-1\) is called a one-cold code. | 
| One-versus-one (OVO) code | A length-\(n\) ternary code over \(\{\pm 1,0\}\) whose whose generator matrix has columns with one \(+1\), one \(-1\), and with the rest of the entries zero. | 
| Universally optimal \(q\)-ary code | A binary or \(q\)-ary code that (weakly) minimizes all completely monotonic potentials on Hamming space [7]. | 
| Weight-two code | A length-\(n\) binary code whose codewords all have Hamming weight two. Such codes provide slightly extra redundancy for storage of small-scale information such as ZIP codes or decimal digits. | 
| \([2^m-1,m,2^{m-1}]\) simplex code | A member of the equidistant code family that is dual to the \([2^m,2^m-m-1,3]\) Hamming family. The columns of its generator matrix are in one-to-one correspondence with the elements of the projective space \(PG(m-1,2)\), with each column being a chosen representative of the corresponding element. Simplex codes saturate the Plotkin bound and hence have nonzero codewords all of the same weight, \(2^{m-1}\) [8; Th. 11(a)]. The codewords form a \((2^m,2^m+1)\) simplex spherical code under the antipodal mapping. | 
| \([7,3,4]\) simplex code | Second-smallest member of the simplex code family. The columns of its generator matrix are in one-to-one correspondence with the elements of the projective space \(PG(2,2)\), with each column being a chosen representative of the corresponding element. The codewords form a \((8,9)\) simplex spherical code under the antipodal mapping. | 
| \(q\)-ary code over \(\mathbb{Z}_q\) | A code encoding \(K\) states (codewords) in \(n\) coordinates over the ring \(\mathbb{Z}_q\) of integers modulo \(q\). | 
| \(q\)-ary simplex code | An \([n,m,q^{m-1}]_q\) equidistant projective code with \(n=\frac{q^m-1}{q-1}\), denoted as \(S(q,m)\). The columns of the generator matrix are in one-to-one correspondence with the elements of the projective space \(PG(m-1,q)\), with each column being a chosen representative of the corresponding element. All nonzero simplex codewords have a constant weight of \(q^{m-1}\) [9,10]. | 
References
- [1]
 - T. Ericson, and V. Zinoviev, eds. Codes on Euclidean spheres. Elsevier, 2001.
 - [2]
 - Huaxiong Wang, Chaoping Xing, and R. Safavi-Naini, “Linear authentication codes: bounds and constructions”, IEEE Transactions on Information Theory 49, 866 (2003) DOI
 - [3]
 - Fang-Wei Fu, A. J. Han Vinck, and Shi-Yi Shen, “On the constructions of constant-weight codes”, IEEE Transactions on Information Theory 44, 328 (1998) DOI
 - [4]
 - J. A. Wood, “The structure of linear codes of constant weight”, Transactions of the American Mathematical Society 354, 1007 (2001) DOI
 - [5]
 - S. Kurz, “Divisible Codes”, (2023) arXiv:2112.11763
 - [6]
 - J. H. Conway and N. J. A. Sloane, Sphere Packings, Lattices and Groups (Springer New York, 1999) DOI
 - [7]
 - H. Cohn and Y. Zhao, “Energy-Minimizing Error-Correcting Codes”, IEEE Transactions on Information Theory 60, 7442 (2014) arXiv:1212.1913 DOI
 - [8]
 - F. J. MacWilliams and N. J. A. Sloane. The theory of error correcting codes. Elsevier, 1977.
 - [9]
 - A. E.F. Jr. and H. F. Mattson, “Error-correcting codes: An axiomatic approach”, Information and Control 6, 315 (1963) DOI
 - [10]
 - E. Weiss, “Linear Codes of Constant Weight”, SIAM Journal on Applied Mathematics 14, 106 (1966) DOI