energy_filter_renyi_moment
For a filter sequence a : ℤ → ℝ, half-chain parameter k : ℕ (representing n = 4k spins), and real exponent q, energy_filter_renyi_moment a k q is the Renyi-q moment Tr(rho_n^q) of the reduced density matrix on 2k spins, computed as (∑ s, λ_s^q) / (∑ s, λ_s)^q where λ_s are the eigenvalues of M * Mᴴ and M sA sB = a (2k - |sA| - |sB|).
Statement
noncomputable def energy_filter_renyi_moment (a : ℤ → ℝ) (k : ℕ) (q : ℝ) : ℝ
- Defined in
- knowledgebase, OP-1115
- Verified
- 05 Nov 2026
- Axioms
- none listed
- Used by 1
- energy_filter_renyi_moment_two_eq_purityFor any sequence filter a : ℤ → ℝ and any natural number k, the Renyi-2 moment energy_filter_renyi_moment a k 2 equals the bipartite…
Read back from the Lean
energy_filter_renyi_moment a k q defines a real number for a given sequence a : ℤ → ℝ, natural number k : ℕ, and real parameter q : ℝ.
It is defined as follows:
1. For each boolean string s : Fin (2 * k) → Bool, let w(s) : ℤ be its Hamming weight, $\sum_{j \in \mathrm{Fin}(2k)} (\text{if } s(j) \text{ then } 1 \text{ else } 0)$.
2. Let $M$ be the $2^{2k} \times 2^{2k}$ real matrix indexed by boolean strings $s_A, s_B : \mathrm{Fin}(2k) \to \mathrm{Bool}$ with entries
$$M(s_A, s_B) = a(2k - w(s_A) - w(s_B)).$$
3. Let $hR$ certify that $M Mᴴ$ (the product of $M$ with its conjugate transpose, which equals $M M^T$ since $M$ is real) is Hermitian.
4. Let $\lambda_s$ denote the eigenvalues of $M Mᴴ$ indexed by $s : \mathrm{Fin}(2k) \to \mathrm{Bool}$.
5. The function returns
$$\frac{\sum_{s} \lambda_s^q}{\left(\sum_{s} \lambda_s\right)^q}$$
where exponentiation is real power (Real.rpow).
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
Lean source view module on GitHub
/-- The Renyi-q moment Tr(rho_n^q) of the reduced density matrix on 2k qubits for the symmetric-sector energy-filtered state on 4k spins. -/ noncomputable def energy_filter_renyi_moment (a : ℤ → ℝ) (k : ℕ) (q : ℝ) : ℝ := let w : (Fin (2 * k) → Bool) → ℤ := fun s => ∑ j : Fin (2 * k), if s j then 1 else 0 let M : Matrix (Fin (2 * k) → Bool) (Fin (2 * k) → Bool) ℝ := fun sA sB => a (2 * (k : ℤ) - w sA - w sB) let hR := Matrix.isHermitian_mul_conjTranspose_self M (∑ s, (hR.eigenvalues s) ^ q) / (∑ s, hR.eigenvalues s) ^ q