Hn
abbrevimported Lean
The $n$-qubit Hilbert space
$\mathcal{H}_n = \ell^2\!\bigl(\{0,1\}^n,\mathbb{C}\bigr)$,
implemented as EuclideanSpace ℂ (Fin n → Fin 2).
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 noncomputable abbrev Hn (n : ℕ)
- Defined in
- TCSlib, `Hn`
- 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.Hn← Hn (TCSlib/ErrorCorrectingCodes/QuantumHamming.lean:207): verbatim
- Verified
- 07 Oct 2026
- Axioms
- none listed
- Used by 20
- pauliLiouvilleMomentTwoFor an n-qubit pure state ψ, the second Pauli-Liouville moment m_2(ψ) is (1/2^n) times the sum over all n-qubit Pauli strings P of…
- codeProj_applyAction of the code projection. Let $C$ be a closed subspace of the $n$-qubit Hilbert space $\mathcal{H}_n$, and let…
- quantum_hamming_bound_rawQuantum Hamming bound for non-degenerate codes. Let $C \le \mathcal{H}_n$ be a subspace of the $n$-qubit Hilbert space that is a…
- codeProjThe orthogonal projection of $\mathcal{H}_n$ onto a subspace $C$, viewed as an endomorphism $P_C : \mathcal{H}_n \to \mathcal{H}_n$.
- stabilizer_subspace_finrank_eq_two_powLet $k \le n$ and let $g_1, \dots, g_{n-k}$ be $n$-qubit Pauli operators $g_l = \varepsilon_l P_l$ with signs…
- magicFluctuationFor an n-qubit pure state ψ in Hn n, with D = 2^n, magicFluctuation n ψ is the scaled magic fluctuation statistic Real.sqrt D * (D *…
- codeProj_eq_self_of_memProjection onto a code fixes its own vectors. Let $C$ be a subspace of the $n$-qubit Hilbert space $\mathcal{H}_n$, and let…
- IsNondegenerateA code is non-degenerate if it satisfies the Knill--Laflamme condition and additionally $P_C E^\dagger F P_C = 0$ whenever…
- instFiniteDimensionalComplexSubtypeHnMemSubmoduleinstFiniteDimensionalComplexSubtypeHnMemSubmodule
- pauliOpAdjointThe adjoint (Hermitian conjugate) $\hat{p}^\dagger : \mathcal{H}_n \to \mathcal{H}_n$ of the Pauli operator associated with a Pauli string…
- KnillLaflammeA subspace $C \le \mathcal{H}_n$ satisfies the Knill--Laflamme condition for $t$-error correction if for all Pauli strings $E,F$…
- 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…
- pauli_moment_two_eq_four_replica_sumFor every natural number n and n-qubit pure state ψ in Hn n, the second Pauli-Liouville moment (pauliLiouvilleMomentTwo n ψ as a complex…
- pauliOpFor $p \in \mathrm{PauliString}\,n$, the associated Pauli operator $\hat{p} : \mathcal{H}_n \to \mathcal{H}_n$.
- ising_graph_stateFor a graph G on n vertices with edge angles θ, the Ising graph state psi_G is exp(-i sum_{uv in E} θ_uv Z_u Z_v) |+⟩^{⊗ n}, with…
- error_subspaces_orthogonalOrthogonality of distinct error subspaces. Let $C \le \mathcal{H}_n$ be a code that is non-degenerate for $t$-error correction, and let…
- finrank_HnComplex dimension of the $n$-qubit space. For every natural number $n$, the $n$-qubit Hilbert space $\mathcal{H}_n$ has complex dimension…
- 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…
- hypergraphStateFor a natural number n and a hypergraph H : Finset (Finset (Fin n)), hypergraphState n H is the quantum state vector in Hn n whose…
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 /-- The n-qubit Hilbert space ℂ^(2^n), realized as a Euclidean space indexed by `Fin n → Fin 2`. -/ noncomputable abbrev Hn (n : ℕ) := EuclideanSpace ℂ (Fin n → Fin 2)