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 CF2nC\subset F_2^n, defined by minimizing the average pairwise distance

a(C)=1M2c,cCd(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)=1Nbi=1Nbdmin(x(i)),dmin(x(i))=minjid(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 CF2nC\subset F_2^n with CF2nC\subset F_2^n0. The average Hamming distance of CF2nC\subset F_2^n1 is

CF2nC\subset F_2^n2

and the minimum average distance over all CF2nC\subset F_2^n3 codes is

CF2nC\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 CF2nC\subset F_2^n5 of CF2nC\subset F_2^n6 distinct bit-strings of length CF2nC\subset F_2^n7, defines the Hamming distance

CF2nC\subset F_2^n8

then assigns to each sample its nearest-neighbor distance CF2nC\subset F_2^n9, and finally averages these nearest-neighbor distances to obtain a(C)=1M2c,cCd(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)=1M2c,cCd(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)=1M2c,cCd(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)=1M2c,cCd(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)=1M2c,cCd(c,c)a(C)=\frac{1}{M^2}\sum_{c,c'\in C} d(c,c')4, and a(C)=1M2c,cCd(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)=1M2c,cCd(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)=1M2c,cCd(c,c)a(C)=\frac{1}{M^2}\sum_{c,c'\in C} d(c,c')7

The key facts are

a(C)=1M2c,cCd(c,c)a(C)=\frac{1}{M^2}\sum_{c,c'\in C} d(c,c')8

together with the identity

a(C)=1M2c,cCd(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)=1Nbi=1Nbdmin(x(i)),dmin(x(i))=minjid(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)=1Nbi=1Nbdmin(x(i)),dmin(x(i))=minjid(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)=1Nbi=1Nbdmin(x(i)),dmin(x(i))=minjid(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)=1Nbi=1Nbdmin(x(i)),dmin(x(i))=minjid(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)=1Nbi=1Nbdmin(x(i)),dmin(x(i))=minjid(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)=1Nbi=1Nbdmin(x(i)),dmin(x(i))=minjid(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)=1Nbi=1Nbdmin(x(i)),dmin(x(i))=minjid(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)=1Nbi=1Nbdmin(x(i)),dmin(x(i))=minjid(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)=1Nbi=1Nbdmin(x(i)),dmin(x(i))=minjid(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)=1Nbi=1Nbdmin(x(i)),dmin(x(i))=minjid(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 CF2nC\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 CF2nC\subset F_2^n1 and CF2nC\subset F_2^n2 has size CF2nC\subset F_2^n3, then the degree-CF2nC\subset F_2^n4 Fourier weight is

CF2nC\subset F_2^n5

For CF2nC\subset F_2^n6,

CF2nC\subset F_2^n7

so the average-distance bound is equivalent to

CF2nC\subset F_2^n8

The paper also gives higher-degree bounds: CF2nC\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 CF2nC\subset F_2^n00 in CF2nC\subset F_2^n01, with

CF2nC\subset F_2^n02

the paper on random linear codes shows that

CF2nC\subset F_2^n03

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

CF2nC\subset F_2^n09

The leading-order term is therefore CF2nC\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 CF2nC\subset F_2^n11. If CF2nC\subset F_2^n12 is formed by serial concatenation of an CF2nC\subset F_2^n13 Hamming or extended-Hamming code with two rate-1 accumulate codes, then the uniform-interleaver ensemble-average weight enumerator is

CF2nC\subset F_2^n14

A union bound gives

CF2nC\subset F_2^n15

Asymptotically, if the spectral-shape function

CF2nC\subset F_2^n16

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

These results do not define “average minimal Hamming distance” in the same way as CF2nC\subset F_2^n32 or CF2nC\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 CF2nC\subset F_2^n34 unique bit-strings in the measurement basis, with CF2nC\subset F_2^n35. For a target sample size CF2nC\subset F_2^n36, one chooses at random, or by stratified sampling, a subset CF2nC\subset F_2^n37 of size CF2nC\subset F_2^n38, computes the Hamming distances between every pair of elements of CF2nC\subset F_2^n39, records each sample’s nearest-neighbor distance, and averages. Repeating this procedure typically CF2nC\subset F_2^n40–CF2nC\subset F_2^n41 times reduces sampling noise (Golubev et al., 3 Jun 2026).

The naive implementation requires CF2nC\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 CF2nC\subset F_2^n43 use approximate nearest-neighbor methods in Hamming space, such as locality-sensitive hashing or trie-based indexes, to reduce the CF2nC\subset F_2^n44 scaling (Golubev et al., 3 Jun 2026).

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

CF2nC\subset F_2^n46

The prefactor satisfies CF2nC\subset F_2^n47, the scaling exponent lies in CF2nC\subset F_2^n48, and the offset obeys CF2nC\subset F_2^n49. In practice, CF2nC\subset F_2^n50 for large Hilbert spaces, although occasionally CF2nC\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 CF2nC\subset F_2^n52 excitations, fitting over CF2nC\subset F_2^n53 gives CF2nC\subset F_2^n54, with CF2nC\subset F_2^n55, and the fit remains good until saturation at CF2nC\subset F_2^n56 for CF2nC\subset F_2^n57. For the exact ground state of the CF2nC\subset F_2^n58–CF2nC\subset F_2^n59 model on a CF2nC\subset F_2^n60 lattice at CF2nC\subset F_2^n61, the reported values are CF2nC\subset F_2^n62 and CF2nC\subset F_2^n63, with CF2nC\subset F_2^n64. For Haar-random 53-qubit Sycamore data, a typical exponent is CF2nC\subset F_2^n65 with prefactor CF2nC\subset F_2^n66. For a D-Wave CF2nC\subset F_2^n67 spin glass at quench time CF2nC\subset F_2^n68, fitting over CF2nC\subset F_2^n69 yields CF2nC\subset F_2^n70, CF2nC\subset F_2^n71, and negligible CF2nC\subset F_2^n72; at CF2nC\subset F_2^n73, one finds CF2nC\subset F_2^n74 and CF2nC\subset F_2^n75 (Golubev et al., 3 Jun 2026).

The interpretation proposed in that work is operational. The prefactor CF2nC\subset F_2^n76 reflects the “typical” nearest-neighbor distance when only one sample is drawn: larger CF2nC\subset F_2^n77 means the wave function is more delocalized in bit-string space. The exponent CF2nC\subset F_2^n78 measures how “connected” the manifold of high-probability bit-strings is: smaller CF2nC\subset F_2^n79 implies that even large numbers of samples rarely find very close neighbors. In the frustrated CF2nC\subset F_2^n80–CF2nC\subset F_2^n81 model, CF2nC\subset F_2^n82 exhibits a pronounced maximum in the intermediate regime CF2nC\subset F_2^n83–CF2nC\subset F_2^n84, coinciding with the quantum phase transition between Néel and stripe orders. This suggests that changes in CF2nC\subset F_2^n85 and CF2nC\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 CF2nC\subset F_2^n87 reliably, one needs at least CF2nC\subset F_2^n88–CF2nC\subset F_2^n89 unique bit-strings. At small CF2nC\subset F_2^n90, CF2nC\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 CF2nC\subset F_2^n92 for balanced Dicke states, one must include CF2nC\subset F_2^n93 in the fit or restrict to CF2nC\subset F_2^n94 below saturation. The parameters CF2nC\subset F_2^n95 and CF2nC\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 CF2nC\subset F_2^n97, and the Delsarte LP with dual-feasible Krawtchouk polynomials yields explicit nontrivial lower bounds in the regime CF2nC\subset F_2^n98, including the asymptotic identity CF2nC\subset F_2^n99 (0706.3295). In the dense regime a(C)=1M2c,cCd(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)=1M2c,cCd(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)=1M2c,cCd(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.