A root of the binary Golay generator polynomial has order , and the Frobenius endomorphism shows that are roots: . The BCH bound gives minimum Hamming distance at least five. The circular autocorrelation of the binary Golay generator makes its parity extension doubly even, excluding original weights five and six. The generator itself has Hamming weight seven, proving that the distance is exactly seven.
// Target: algebra.bigb
Binary digit 2026-10-14
A binary digit is a zero or one in the base-two positional representation of an integer. The sum determines the Thue–Morse sequence and is the Hamming weight of the binary representation.
Binary order on the discrete cube Created 2026-10-05 Updated 2026-10-06
Identify a vertex with the integer . Binary order is increasing order of these integers. Its initial segment of size has induced edges, where is the Hamming weight of the binary expansion of .
Binary powering multiplication count Created 2026-10-14 Updated 2026-10-24
For the optimized left-to-right exponentiation by squaring algorithm, let be the length of the binary expansion of a positive integer , and let be its Hamming weight, the number of digits equal to one. There are exactly digits after the leading one, and exactly remaining ones. Therefore the count is
Here counts squarings and counts further multiplications by the base; every squaring counts as one multiplication in . Assignment, digit reading, and any inversion are outside this count. The formula includes , which requires zero multiplications; define separately.
For a fixed length , the bounds are . A power of two reaches the lower bound because its Hamming weight is one; reaches the upper bound because all digits are one. For , and , giving . Thus the arithmetic operation count is in Big O notation, but inputs of similar magnitude can have different counts.
Figure 1.
Exact multiplication counts for optimized exponentiation by squaring depend on binary length and Hamming weight
. For positive exponents through , dots show , including each squaring. The dashed curves bound all counts at each binary length. Successive multiplication needs operations. The second panel compares squarings and further multiplications for exponents . These are exact counts, not timing measurements. Details.
This is a count for the specified algorithm, not a claim that it always minimizes multiplications among all methods. For instance, at the count is six, but the powers with exponents can be built in five multiplications: square, multiply by , square, square, then multiply by the already stored . Saving operations this way uses a different schedule and stored intermediate powers.
Store the Hamming weight of each possible byte in a 256-entry table. Extract each byte of a word by a logical right shift and a bit mask, then sum its table entries. The byte positions partition the word's bits, proving the formula. A 32-bit word needs four lookups, which can be unrolled. Logical extraction does not depend on the endianness of a stored word. The speed advantage depends on table-access costs as well as instruction counts.
When the columns of are every nonzero vector in , a nonzero row vector defines a nonzero linear functional . Exactly half the input vectors take value : translation by any vector on which the functional is pairs its zero and one fibres. Removing the zero input removes only a zero value. Thus every nonzero word in the binary simplex code has Hamming weight .
Designed distance 2026-10-14
The designed distance of a BCH code is the value specified by requiring consecutive defining zeros of a cyclic code. The BCH bound guarantees minimum Hamming distance at least , but the actual minimum Hamming distance can be larger. To prove equality, one can exhibit a nonzero codeword of Hamming weight exactly .
Dicke state Created 2026-10-14 Updated 2026-10-14
The -qubit Dicke state with excitations is the normalized equal superposition
where is the Hamming weight in the computational basis. The binomial coefficient counts the mutually orthogonal summands, proving normalization. Every permutation of the qubits leaves the vector unchanged. Splitting the sum according to the first bit and using gives
Terms with zero coefficient are omitted at the endpoints. This recursion is useful for partial traces and for distributing a logical qubit among many symmetric physical qubits.
Doubly even code 2026-10-14
A binary linear code is doubly even when the Hamming weight of every codeword is divisible by four.
// Target: algebra.bigb
For a binary linear code , the linear functional records Hamming weight modulo two. Its kernel of a linear map is the even-weight subcode. If vanishes, this is all of ; otherwise rank-nullity theorem gives dimension . This also proves closure under addition without treating ordinary integer weight as a linear function.
GHZ game 2026-10-25
A three-party nonlocal game with binary questions of even Hamming weight. Its winning output parity is half the question weight modulo two. For the four possible input triples, a hypothetical deterministic classical response would give four parity equations whose left sides cancel under exclusive or, while their right sides have odd total parity. Thus no classical strategy succeeds on every allowed triple, even with pre-shared randomness.
On the GHZ state, measure the Pauli X gate as an observable for question zero and the Pauli Y gate for question one, and encode the measured eigenvalue as . The joint observables XXX, XYY, YXY and YYX have respective GHZ eigenvalues . Their products of local outcomes enforce the required parity with certainty. The strategy uses pre-shared quantum entanglement and local measurements during the game, without communication. It realizes the GHZ theorem as an operational task. If the four questions are uniform, the best classical success is : the parity contradiction bounds it above, and the deterministic rule , wins three triples and loses only 011. The uniformity assumption is necessary for that numerical score, not for the impossibility of worst-case certainty.
For , a family of vertices in the Boolean hypercube has these minimum and maximum external vertex boundary sizes. The Harper theorem gives the minimum: in odd dimension take the lower half of the levels, and in even dimension add the middle-level sets containing coordinate one to all lower levels. The family of even Hamming weight attains the maximum, since every remaining vertex has an adjacent even-weight vertex.
Hamming space 2026-10-14
The Hamming space of length over a finite field is the set equipped with Hamming distance, the number of coordinates at which two words differ. The Hamming weight of a word is its distance from zero.
Every Fredkin gate preserves the Hamming weight of a computational-basis string, so any network of these gates does too. A Toffoli gate maps to and hence cannot equal such a network on the same three wires. Fixed ancillas returned unchanged do not remove the obstruction. Extra encoded outputs or input-dependent garbage change the resource model and do not by themselves implement the same clean coherent three-qubit gate.
Minimum distance of a code Created 2026-10-03 Updated 2026-10-14
The minimum distance of a code is the least Hamming distance between distinct codewords. For a linear code, translation invariance makes this equal to the least Hamming weight of a nonzero codeword.
Minimum Hamming distance of a linear code Created 2026-09-24 Updated 2026-09-24
The minimum Hamming distance of a nonzero linear code is the smallest Hamming weight of a nonzero codeword.
Write the Steane code basis as uniform quantum superpositions over a binary linear code and a disjoint coset , where is the even-weight part of the length-seven Hamming code. For , diagonal Pauli Z gates cannot connect the two cosets. Within coset , the overlap is
If , translation by a word with negates this sum, so it vanishes. Since the dual code is the length-seven Hamming code of minimum Hamming distance three, every nonzero of Hamming weight one or two has vanishing overlap. Taking from proves the displayed identity. The eight two-dimensional error images are orthogonal, so their projective measurement determines the error syndrome without revealing the logical state; applying the identified phase flip again recovers every code state. This proves nondegenerate quantum error-correcting code behaviour for the identity and all single-site phase flips, including their coherent linear span.
For , and , the reduced density matrix of any one qubit is
Use the Dicke state recursion. The rest-of-system vectors of different Hamming weights are orthogonal. For the diagonal terms this leaves the probabilities of the distinguished bit being zero and one. In the cross term, only the rest vector occurs in both states, with coefficients multiplying and multiplying . Thus , proving the matrix. A single Dicke state alone gives the diagonal matrix .
Suppose the generators of a binary linear code have Hamming weights divisible by four and have pairwise zero binary inner products. Their linear span is doubly even: for any two vectors,
The binary inner product says the intersection size is even. Induction on the number of generators in a sum proves divisibility by four.
// Target: algebra.bigb
Parity-check extension of a linear code Created 2026-09-24 Updated 2026-09-24
The parity-check extension of a binary linear code appends to each codeword the sum of its coordinates in , making every extended word have even Hamming weight.