Papers
Topics
Authors
Recent
Search
2000 character limit reached

Average Minimal Hamming Distance in Codes & Quantum Data

Updated 5 July 2026
  • Average minimal Hamming distance is defined as the minimum average pairwise Hamming distance over a code, distinguishing its interpretations in coding theory and quantum sampling.
  • It leverages Delsarte linear programming and Krawtchouk polynomials to derive explicit lower bounds and optimize extremal properties in binary codes.
  • Extensions include sample-based analysis in quantum data, where efficient nearest-neighbor and Fourier-analytic techniques quantify bit-string complexity.

Searching arXiv for the cited works to ground the article in the relevant literature. Average minimal Hamming distance denotes a family of closely related functionals on Hamming spaces. In binary coding theory, the principal quantity is the minimum average Hamming distance of an (n,M)(n,M) code C⊂F2nC\subset F_2^n, defined by minimizing the average pairwise distance

a(C)=1M2∑c,c′∈Cd(c,c′)a(C)=\frac{1}{M^2}\sum_{c,c'\in C} d(c,c')

over all codes of size MM; the resulting extremal value is denoted B(n,M)B(n,M) (0706.3295). In quantum-sampling analysis, the term refers instead to the average, over a set of distinct measured bit-strings, of each sample’s nearest-neighbor Hamming distance,

⟨dmin⁡⟩(Nb)=1Nb∑i=1Nbdmin⁡(x(i)),dmin⁡(x(i))=min⁡j≠id(x(i),x(j)),\langle d_{\min}\rangle(N_b)=\frac{1}{N_b}\sum_{i=1}^{N_b} d_{\min}(x^{(i)}), \qquad d_{\min}(x^{(i)})=\min_{j\neq i} d(x^{(i)},x^{(j)}),

which is used as a sample-level descriptor of bit-string complexity (Golubev et al., 3 Jun 2026). Related literature also studies the expectation or ensemble average of the minimum distance itself, rather than an average of pairwise or nearest-neighbor distances (Hao et al., 2019, 0905.4545).

1. Definitions and distinctions

For binary codes, F2nF_2^n is the set of binary words of length nn, and an (n,M)(n,M) code is a subset C⊂F2nC\subset F_2^n with C⊂F2nC\subset F_2^n0. The average Hamming distance of C⊂F2nC\subset F_2^n1 is

C⊂F2nC\subset F_2^n2

and the minimum average distance over all C⊂F2nC\subset F_2^n3 codes is

C⊂F2nC\subset F_2^n4

This is an isodiametric extremal problem in Hamming space: the optimization variable is the entire code, and the objective averages over all ordered pairs in the code (0706.3295).

A distinct quantity appears in the analysis of quantum measurement data. There one begins with a collection C⊂F2nC\subset F_2^n5 of C⊂F2nC\subset F_2^n6 distinct bit-strings of length C⊂F2nC\subset F_2^n7, defines the Hamming distance

C⊂F2nC\subset F_2^n8

then assigns to each sample its nearest-neighbor distance C⊂F2nC\subset F_2^n9, and finally averages these nearest-neighbor distances to obtain a(C)=1M2∑c,c′∈Cd(c,c′)a(C)=\frac{1}{M^2}\sum_{c,c'\in C} d(c,c')0 (Golubev et al., 3 Jun 2026). Here the functional is not an extremum over all codes of fixed size; it is a statistic of an observed sample set.

A common source of confusion is the distinction between minimum average distance and minimum distance. In the coding-theoretic notation of (0706.3295) and (Yu et al., 2019), the optimized object is an average over all pairs. By contrast, the random linear-code literature studies

a(C)=1M2∑c,c′∈Cd(c,c′)a(C)=\frac{1}{M^2}\sum_{c,c'\in C} d(c,c')1

and the Hamming-accumulate-accumulate literature studies probabilistic or ensemble-average behavior of that minimum distance (Hao et al., 2019, 0905.4545). These quantities are related only indirectly.

2. Delsarte linear programming for minimum average distance

The basic linear-programming framework for a(C)=1M2∑c,c′∈Cd(c,c′)a(C)=\frac{1}{M^2}\sum_{c,c'\in C} d(c,c')2 is Delsarte’s approach via the dual distance distribution. If a(C)=1M2∑c,c′∈Cd(c,c′)a(C)=\frac{1}{M^2}\sum_{c,c'\in C} d(c,c')3 is the usual distance distribution of a binary code a(C)=1M2∑c,c′∈Cd(c,c′)a(C)=\frac{1}{M^2}\sum_{c,c'\in C} d(c,c')4, and a(C)=1M2∑c,c′∈Cd(c,c′)a(C)=\frac{1}{M^2}\sum_{c,c'\in C} d(c,c')5 is the binary Krawtchouk polynomial of degree a(C)=1M2∑c,c′∈Cd(c,c′)a(C)=\frac{1}{M^2}\sum_{c,c'\in C} d(c,c')6, then the dual distance distribution is

a(C)=1M2∑c,c′∈Cd(c,c′)a(C)=\frac{1}{M^2}\sum_{c,c'\in C} d(c,c')7

The key facts are

a(C)=1M2∑c,c′∈Cd(c,c′)a(C)=\frac{1}{M^2}\sum_{c,c'\in C} d(c,c')8

together with the identity

a(C)=1M2∑c,c′∈Cd(c,c′)a(C)=\frac{1}{M^2}\sum_{c,c'\in C} d(c,c')9

Consequently, a lower bound on MM0 follows from an upper bound on MM1 (0706.3295).

This yields the linear program

MM2

subject to

MM3

MM4

and

MM5

The proof method uses dual feasible polynomials MM6 satisfying sign constraints such as MM7, MM8 on forbidden MM9, and B(n,M)B(n,M)0 on allowed B(n,M)B(n,M)1. By standard LP duality this yields an upper bound on B(n,M)B(n,M)2, hence a lower bound on B(n,M)B(n,M)3 (0706.3295).

A later reformulation works in the binary Hamming space B(n,M)B(n,M)4. If B(n,M)B(n,M)5 has size B(n,M)B(n,M)6 and distance distribution

B(n,M)B(n,M)7

then its average Hamming distance is

B(n,M)B(n,M)8

With B(n,M)B(n,M)9, one defines

⟨dmin⁡⟩(Nb)=1Nb∑i=1Nbdmin⁡(x(i)),dmin⁡(x(i))=min⁡j≠id(x(i),x(j)),\langle d_{\min}\rangle(N_b)=\frac{1}{N_b}\sum_{i=1}^{N_b} d_{\min}(x^{(i)}), \qquad d_{\min}(x^{(i)})=\min_{j\neq i} d(x^{(i)},x^{(j)}),0

where ⟨dmin⁡⟩(Nb)=1Nb∑i=1Nbdmin⁡(x(i)),dmin⁡(x(i))=min⁡j≠id(x(i),x(j)),\langle d_{\min}\rangle(N_b)=\frac{1}{N_b}\sum_{i=1}^{N_b} d_{\min}(x^{(i)}), \qquad d_{\min}(x^{(i)})=\min_{j\neq i} d(x^{(i)},x^{(j)}),1 is the ⟨dmin⁡⟩(Nb)=1Nb∑i=1Nbdmin⁡(x(i)),dmin⁡(x(i))=min⁡j≠id(x(i),x(j)),\langle d_{\min}\rangle(N_b)=\frac{1}{N_b}\sum_{i=1}^{N_b} d_{\min}(x^{(i)}), \qquad d_{\min}(x^{(i)})=\min_{j\neq i} d(x^{(i)},x^{(j)}),2th Krawtchouk polynomial, and obtains

⟨dmin⁡⟩(Nb)=1Nb∑i=1Nbdmin⁡(x(i)),dmin⁡(x(i))=min⁡j≠id(x(i),x(j)),\langle d_{\min}\rangle(N_b)=\frac{1}{N_b}\sum_{i=1}^{N_b} d_{\min}(x^{(i)}), \qquad d_{\min}(x^{(i)})=\min_{j\neq i} d(x^{(i)},x^{(j)}),3

This gives a primal–dual LP pair whose feasible dual vectors directly generate lower bounds on ⟨dmin⁡⟩(Nb)=1Nb∑i=1Nbdmin⁡(x(i)),dmin⁡(x(i))=min⁡j≠id(x(i),x(j)),\langle d_{\min}\rangle(N_b)=\frac{1}{N_b}\sum_{i=1}^{N_b} d_{\min}(x^{(i)}), \qquad d_{\min}(x^{(i)})=\min_{j\neq i} d(x^{(i)},x^{(j)}),4 (Yu et al., 2019).

3. Explicit lower bounds and sparse-code regimes

The linear-programming method yields several closed-form lower bounds on ⟨dmin⁡⟩(Nb)=1Nb∑i=1Nbdmin⁡(x(i)),dmin⁡(x(i))=min⁡j≠id(x(i),x(j)),\langle d_{\min}\rangle(N_b)=\frac{1}{N_b}\sum_{i=1}^{N_b} d_{\min}(x^{(i)}), \qquad d_{\min}(x^{(i)})=\min_{j\neq i} d(x^{(i)},x^{(j)}),5 that are valid for every integer pair ⟨dmin⁡⟩(Nb)=1Nb∑i=1Nbdmin⁡(x(i)),dmin⁡(x(i))=min⁡j≠id(x(i),x(j)),\langle d_{\min}\rangle(N_b)=\frac{1}{N_b}\sum_{i=1}^{N_b} d_{\min}(x^{(i)}), \qquad d_{\min}(x^{(i)})=\min_{j\neq i} d(x^{(i)},x^{(j)}),6 with ⟨dmin⁡⟩(Nb)=1Nb∑i=1Nbdmin⁡(x(i)),dmin⁡(x(i))=min⁡j≠id(x(i),x(j)),\langle d_{\min}\rangle(N_b)=\frac{1}{N_b}\sum_{i=1}^{N_b} d_{\min}(x^{(i)}), \qquad d_{\min}(x^{(i)})=\min_{j\neq i} d(x^{(i)},x^{(j)}),7. For very small codes,

⟨dmin⁡⟩(Nb)=1Nb∑i=1Nbdmin⁡(x(i)),dmin⁡(x(i))=min⁡j≠id(x(i),x(j)),\langle d_{\min}\rangle(N_b)=\frac{1}{N_b}\sum_{i=1}^{N_b} d_{\min}(x^{(i)}), \qquad d_{\min}(x^{(i)})=\min_{j\neq i} d(x^{(i)},x^{(j)}),8

For small codes,

⟨dmin⁡⟩(Nb)=1Nb∑i=1Nbdmin⁡(x(i)),dmin⁡(x(i))=min⁡j≠id(x(i),x(j)),\langle d_{\min}\rangle(N_b)=\frac{1}{N_b}\sum_{i=1}^{N_b} d_{\min}(x^{(i)}), \qquad d_{\min}(x^{(i)})=\min_{j\neq i} d(x^{(i)},x^{(j)}),9

More significantly, for codes of moderate size with F2nF_2^n0, the paper gives formulas that are nontrivial as soon as F2nF_2^n1 is of order F2nF_2^n2 (0706.3295).

If F2nF_2^n3 is even, then

F2nF_2^n4

If F2nF_2^n5 is odd, then

F2nF_2^n6

Further refinements depend on the residue class of F2nF_2^n7: F2nF_2^n8

These formulas are important because the earlier “classical” bound of Althöfer–Sillke,

F2nF_2^n9

is only useful when nn0. For codes of size nn1 that bound is vacuous, whereas the new bounds give a constant-order lower bound (0706.3295).

The numerical example nn2, nn3 illustrates the difference. The classical bound gives

nn4

whereas the even-nn5 bound gives

nn6

The paper further proves the asymptotic statement

nn7

This establishes the exact constant nn8 in the limit for the sparse code size nn9 (0706.3295).

4. Improved LP bounds, dense-code asymptotics, and Fourier weights

For code size (n,M)(n,M)0 with fixed (n,M)(n,M)1, the improved LP analysis of Yu and Tan constructs a two-point dual feasible solution supported at (n,M)(n,M)2 and (n,M)(n,M)3, with (n,M)(n,M)4 and (n,M)(n,M)5, rather than the single-point solution used earlier (Yu et al., 2019). Evaluating the dual objective and optimizing over (n,M)(n,M)6 yields the asymptotic bound

(n,M)(n,M)7

where

(n,M)(n,M)8

The same paper shows that this is asymptotically optimal for the Fu–Wei–Yeung LP: for large (n,M)(n,M)9, no nonnegative dual feasible vector can asymptotically do better than the function C⊂F2nC\subset F_2^n0 obtained by the two-point construction. In that sense, all possible asymptotic bounds that can be derived by that linear program have been characterized (Yu et al., 2019).

A further aspect of the theory is its Fourier-analytic reformulation. If C⊂F2nC\subset F_2^n1 and C⊂F2nC\subset F_2^n2 has size C⊂F2nC\subset F_2^n3, then the degree-C⊂F2nC\subset F_2^n4 Fourier weight is

C⊂F2nC\subset F_2^n5

For C⊂F2nC\subset F_2^n6,

C⊂F2nC\subset F_2^n7

so the average-distance bound is equivalent to

C⊂F2nC\subset F_2^n8

The paper also gives higher-degree bounds: C⊂F2nC\subset F_2^n9 This places the coding-theoretic LP inside a broader MacWilliams–Delsarte and Fourier-analytic framework (Yu et al., 2019).

5. Expectation and ensemble averages of minimum distance

Closely related literature studies the expectation or ensemble average of the minimum Hamming distance, rather than the minimum over codes of an average pairwise distance. For a random linear code of dimension C⊂F2nC\subset F_2^n00 in C⊂F2nC\subset F_2^n01, with

C⊂F2nC\subset F_2^n02

the paper on random linear codes shows that

C⊂F2nC\subset F_2^n03

and that the c.d.f. of C⊂F2nC\subset F_2^n04 is C⊂F2nC\subset F_2^n05-close to the c.d.f. of the minimum of C⊂F2nC\subset F_2^n06 independent BinomialC⊂F2nC\subset F_2^n07 variables (Hao et al., 2019). When C⊂F2nC\subset F_2^n08, the minimum exhibits a Gumbel-limit description on an arithmetic lattice, and the expectation has the asymptotic form

C⊂F2nC\subset F_2^n09

The leading-order term is therefore C⊂F2nC\subset F_2^n10 (Hao et al., 2019).

For Hamming-accumulate-accumulate ensembles, the relevant object is the ensemble-average weight enumerator and the induced probabilistic lower bound on C⊂F2nC\subset F_2^n11. If C⊂F2nC\subset F_2^n12 is formed by serial concatenation of an C⊂F2nC\subset F_2^n13 Hamming or extended-Hamming code with two rate-1 accumulate codes, then the uniform-interleaver ensemble-average weight enumerator is

C⊂F2nC\subset F_2^n14

A union bound gives

C⊂F2nC\subset F_2^n15

Asymptotically, if the spectral-shape function

C⊂F2nC\subset F_2^n16

satisfies C⊂F2nC\subset F_2^n17 for all C⊂F2nC\subset F_2^n18, then with high probability C⊂F2nC\subset F_2^n19. Numerically, the paper reports C⊂F2nC\subset F_2^n20 for C⊂F2nC\subset F_2^n21AA, C⊂F2nC\subset F_2^n22 for C⊂F2nC\subset F_2^n23AA, C⊂F2nC\subset F_2^n24 for C⊂F2nC\subset F_2^n25AA, C⊂F2nC\subset F_2^n26 for C⊂F2nC\subset F_2^n27AA, C⊂F2nC\subset F_2^n28 for C⊂F2nC\subset F_2^n29AA, and C⊂F2nC\subset F_2^n30 for C⊂F2nC\subset F_2^n31AA (0905.4545).

These results do not define “average minimal Hamming distance” in the same way as C⊂F2nC\subset F_2^n32 or C⊂F2nC\subset F_2^n33. They nevertheless show that neighboring notions of averaging—expectation over a random-code ensemble or over a concatenated-code ensemble—play an important role in minimum-distance analysis.

6. Sample-based average minimal Hamming distance in quantum data

In quantum sampling data, the average minimal Hamming distance is computed from a dataset of C⊂F2nC\subset F_2^n34 unique bit-strings in the measurement basis, with C⊂F2nC\subset F_2^n35. For a target sample size C⊂F2nC\subset F_2^n36, one chooses at random, or by stratified sampling, a subset C⊂F2nC\subset F_2^n37 of size C⊂F2nC\subset F_2^n38, computes the Hamming distances between every pair of elements of C⊂F2nC\subset F_2^n39, records each sample’s nearest-neighbor distance, and averages. Repeating this procedure typically C⊂F2nC\subset F_2^n40–C⊂F2nC\subset F_2^n41 times reduces sampling noise (Golubev et al., 3 Jun 2026).

The naive implementation requires C⊂F2nC\subset F_2^n42 bit-operations. The paper notes two concrete optimizations: use bitwise XOR and population-count hardware instructions to compute Hamming distances extremely quickly, and for large C⊂F2nC\subset F_2^n43 use approximate nearest-neighbor methods in Hamming space, such as locality-sensitive hashing or trie-based indexes, to reduce the C⊂F2nC\subset F_2^n44 scaling (Golubev et al., 3 Jun 2026).

Empirically, over several decades in C⊂F2nC\subset F_2^n45, a wide variety of quantum states obey

C⊂F2nC\subset F_2^n46

The prefactor satisfies C⊂F2nC\subset F_2^n47, the scaling exponent lies in C⊂F2nC\subset F_2^n48, and the offset obeys C⊂F2nC\subset F_2^n49. In practice, C⊂F2nC\subset F_2^n50 for large Hilbert spaces, although occasionally C⊂F2nC\subset F_2^n51 when the minimal distance saturates at the smallest possible value (Golubev et al., 3 Jun 2026).

The reported examples are specific. For a 24-qubit Dicke state with C⊂F2nC\subset F_2^n52 excitations, fitting over C⊂F2nC\subset F_2^n53 gives C⊂F2nC\subset F_2^n54, with C⊂F2nC\subset F_2^n55, and the fit remains good until saturation at C⊂F2nC\subset F_2^n56 for C⊂F2nC\subset F_2^n57. For the exact ground state of the C⊂F2nC\subset F_2^n58–C⊂F2nC\subset F_2^n59 model on a C⊂F2nC\subset F_2^n60 lattice at C⊂F2nC\subset F_2^n61, the reported values are C⊂F2nC\subset F_2^n62 and C⊂F2nC\subset F_2^n63, with C⊂F2nC\subset F_2^n64. For Haar-random 53-qubit Sycamore data, a typical exponent is C⊂F2nC\subset F_2^n65 with prefactor C⊂F2nC\subset F_2^n66. For a D-Wave C⊂F2nC\subset F_2^n67 spin glass at quench time C⊂F2nC\subset F_2^n68, fitting over C⊂F2nC\subset F_2^n69 yields C⊂F2nC\subset F_2^n70, C⊂F2nC\subset F_2^n71, and negligible C⊂F2nC\subset F_2^n72; at C⊂F2nC\subset F_2^n73, one finds C⊂F2nC\subset F_2^n74 and C⊂F2nC\subset F_2^n75 (Golubev et al., 3 Jun 2026).

The interpretation proposed in that work is operational. The prefactor C⊂F2nC\subset F_2^n76 reflects the “typical” nearest-neighbor distance when only one sample is drawn: larger C⊂F2nC\subset F_2^n77 means the wave function is more delocalized in bit-string space. The exponent C⊂F2nC\subset F_2^n78 measures how “connected” the manifold of high-probability bit-strings is: smaller C⊂F2nC\subset F_2^n79 implies that even large numbers of samples rarely find very close neighbors. In the frustrated C⊂F2nC\subset F_2^n80–C⊂F2nC\subset F_2^n81 model, C⊂F2nC\subset F_2^n82 exhibits a pronounced maximum in the intermediate regime C⊂F2nC\subset F_2^n83–C⊂F2nC\subset F_2^n84, coinciding with the quantum phase transition between Néel and stripe orders. This suggests that changes in C⊂F2nC\subset F_2^n85 and C⊂F2nC\subset F_2^n86 can signal phase boundaries without requiring computation of order parameters (Golubev et al., 3 Jun 2026).

The same paper also states the main practical limitations. To extract C⊂F2nC\subset F_2^n87 reliably, one needs at least C⊂F2nC\subset F_2^n88–C⊂F2nC\subset F_2^n89 unique bit-strings. At small C⊂F2nC\subset F_2^n90, C⊂F2nC\subset F_2^n91 has large sample-to-sample variance, so averaging over multiple random subsets is necessary. When the minimal Hamming distance saturates at the theoretical lower bound, such as C⊂F2nC\subset F_2^n92 for balanced Dicke states, one must include C⊂F2nC\subset F_2^n93 in the fit or restrict to C⊂F2nC\subset F_2^n94 below saturation. The parameters C⊂F2nC\subset F_2^n95 and C⊂F2nC\subset F_2^n96 are empirical descriptors and may depend weakly on measurement basis, so comparisons require identical bases and fitting windows (Golubev et al., 3 Jun 2026).

7. Conceptual placement

Taken together, these works place average minimal Hamming distance at the intersection of extremal coding theory, probabilistic minimum-distance analysis, and data-driven characterization of high-dimensional discrete distributions. In coding theory, the central problem is to determine or bound C⊂F2nC\subset F_2^n97, and the Delsarte LP with dual-feasible Krawtchouk polynomials yields explicit nontrivial lower bounds in the regime C⊂F2nC\subset F_2^n98, including the asymptotic identity C⊂F2nC\subset F_2^n99 (0706.3295). In the dense regime a(C)=1M2∑c,c′∈Cd(c,c′)a(C)=\frac{1}{M^2}\sum_{c,c'\in C} d(c,c')00, the improved LP of Yu and Tan characterizes the asymptotically optimal output of that linear program and connects the problem to Fourier weights of Boolean functions (Yu et al., 2019).

In adjacent settings, “average” may refer instead to averaging over a random-code ensemble or over repeated subset selections from measured bit-strings. The random linear-code results show that linear dependencies have only an a(C)=1M2∑c,c′∈Cd(c,c′)a(C)=\frac{1}{M^2}\sum_{c,c'\in C} d(c,c')01 effect on the c.d.f. of the minimum distance beyond the identification of proportional codewords (Hao et al., 2019). The quantum-sampling results show that averaging nearest-neighbor distances across unique bit-strings can produce a robust power-law descriptor a(C)=1M2∑c,c′∈Cd(c,c′)a(C)=\frac{1}{M^2}\sum_{c,c'\in C} d(c,c')02 across experimentally and numerically generated states (Golubev et al., 3 Jun 2026).

A plausible implication is that the phrase “average minimal Hamming distance” should always be read with its precise ambient definition: an extremal average over all code pairs, an expectation of a minimum over a random ensemble, or a nearest-neighbor average over an observed sample set. The cited literature treats all three with technically different objectives, constraints, and asymptotic regimes.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Average Minimal Hamming Distance.