quantum_hamming_bound_raw
theoremverifiedimported Lean
Quantum Hamming bound for non-degenerate codes. Let $C \le \mathcal{H}_n$ be a subspace of the $n$-qubit Hilbert space that is a non-degenerate quantum code correcting $t$ errors, and suppose its complex dimension is $\dim_{\mathbb{C}} C = 2^{k}$ for some natural number $k$. Then \[ \left(\sum_{j=0}^{t}\binom{n}{j}\,3^{j}\right)\cdot 2^{k} \;\le\; 2^{n}. \]
Statement
set_option linter.mathlibStandardSet false in open scoped BigOperators in open scoped Real in open scoped Nat in open scoped Classical in open scoped Pointwise in set_option maxRecDepth 4000 in set_option synthInstance.maxHeartbeats 20000 in set_option synthInstance.maxSize 128 in set_option relaxedAutoImplicit false in set_option autoImplicit false in open Complex Matrix in theorem quantum_hamming_bound_raw (n k t : ℕ) (C : Submodule ℂ (Hn n)) (h_dim : Module.finrank ℂ C = 2^k) (h_nondeg : IsNondegenerate n C t) : (∑ j ∈ Finset.range (t + 1), n.choose j * 3 ^ j) * 2 ^ k ≤ 2 ^ n
- Source
- TCSlib, `quantum_hamming_bound_raw`
- Lean proof
- By Allan Li, Hydroxyi (from the file's git history), from github.com/Shilun-Allan-Li/tcslib at
c8a02591b1e5(Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.25.0.quantum_hamming_bound_raw← quantum_hamming_bound_raw (TCSlib/ErrorCorrectingCodes/QuantumHamming.lean:462): verbatim
- Verified
- 16 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 11
- error_sphere_dimensionDimension of the error sphere of a non-degenerate code. Let $C \le \mathcal{H}_n$ be a code on $n$ qubits that is non-degenerate for $t$…
- ErrorSphereThe error sphere $\mathrm{ES}(C,t)$ is the subspace $\bigvee_{\mathrm{wt}(p)\le t} \hat{p}(C)$, i.e.\ the supremum of the Pauli…
- HnThe $n$-qubit Hilbert space $\mathcal{H}_n = \ell^2\!\bigl(\{0,1\}^n,\mathbb{C}\bigr)$, implemented as \texttt{EuclideanSpace ℂ (Fin n →…
- IsNondegenerateA code is non-degenerate if it satisfies the Knill--Laflamme condition and additionally $P_C E^\dagger F P_C = 0$ whenever…
- card_pauliErrorsLeCardinality of the bounded-weight Pauli error set. For natural numbers $n$ and $t$, the number of Pauli strings of length $n$ whose weight…
- finrank_HnComplex dimension of the $n$-qubit space. For every natural number $n$, the $n$-qubit Hilbert space $\mathcal{H}_n$ has complex dimension…
- codeProj_applyAction of the code projection. Let $C$ be a closed subspace of the $n$-qubit Hilbert space $\mathcal{H}_n$, and let…
- instFintypePauliStringinstFintypePauliString
- instFiniteDimensionalComplexSubtypeHnMemSubmoduleinstFiniteDimensionalComplexSubtypeHnMemSubmodule
- PauliStringA Pauli string of length $n$ is a function $p : \mathrm{Fin}\,n \to \mathrm{PauliBasis}$.
- PauliErrorsLeThe set of all Pauli strings of weight at most $t$:…
- Used by 1
- quantum_hamming_boundQuantum Hamming bound for non-degenerate codes. Let $C \le \mathcal{H}_n$ be a subspace of the $n$-qubit Hilbert space whose complex…
Lean source view module on GitHub
set_option linter.mathlibStandardSet false in open scoped BigOperators in open scoped Real in open scoped Nat in open scoped Classical in open scoped Pointwise in set_option maxRecDepth 4000 in set_option synthInstance.maxHeartbeats 20000 in set_option synthInstance.maxSize 128 in set_option relaxedAutoImplicit false in set_option autoImplicit false in open Complex Matrix in /-- Quantum Hamming bound (raw form): for a non-degenerate `[[n, k]]` quantum code correcting t errors, the total dimension of the error sphere does not exceed the ambient space. -/ theorem quantum_hamming_bound_raw (n k t : ℕ) (C : Submodule ℂ (Hn n)) (h_dim : Module.finrank ℂ C = 2^k) (h_nondeg : IsNondegenerate n C t) : (∑ j ∈ Finset.range (t + 1), n.choose j * 3 ^ j) * 2 ^ k ≤ 2 ^ n := by classical have h_sphere : Module.finrank ℂ (ErrorSphere n t C) = (∑ j ∈ Finset.range (t + 1), n.choose j * 3 ^ j) * 2 ^ k := by simpa [h_dim, card_pauliErrorsLe, Nat.mul_assoc, Nat.mul_left_comm, Nat.mul_comm] using (error_sphere_dimension (n:=n) (t:=t) (C:=C) h_nondeg) have h_le : Module.finrank ℂ (ErrorSphere n t C) ≤ 2^n := by have : Module.finrank ℂ (ErrorSphere n t C) ≤ Module.finrank ℂ (Hn n) := Submodule.finrank_le (ErrorSphere n t C) simpa [finrank_Hn n] using this simpa [h_sphere] using h_le