fermion_parity_amplitude_sum
For natural numbers m, η, N and real numbers p, q, fermion_parity_amplitude_sum m p q η N is the sum over j in Finset.range (m + 1) of (taken : ℝ) * Real.sqrt (p^w * q^(m - w)), where w = η + 2 * j, cum = ∑ i in Finset.range j, Nat.choose m (η + 2 * i), and taken = min (Nat.choose m w) (N - cum).
Statement
noncomputable def fermion_parity_amplitude_sum (m : ℕ) (p q : ℝ) (η : ℕ) (N : ℕ) : ℝ
- Defined in
- arXiv:2611.07003; OP-1787
- Verified
- 17 Nov 2026
- Axioms
- none listed
- Used by 1
- fermion_pair_stabilizer_fidelityThe function fermion_pair_stabilizer_fidelity (s m : ℕ) : ℝ returns the real number given by the maximum of (Finset.range m).fold max 0…
Read back from the Lean
fermion_parity_amplitude_sum is a function that takes natural numbers m, η, N and real numbers p, q, and returns a real number defined as the finite sum over j from 0 to m (i.e., j ∈ Finset.range (m + 1)) of:
taken * Real.sqrt (p ^ w * q ^ (m - w))
where:
- w : ℕ is η + 2 * j,
- cum : ℕ is the sum over i from 0 to j - 1 of Nat.choose m (η + 2 * i),
- taken : ℕ is min (Nat.choose m w) (N - cum) (with N - cum being truncated natural number subtraction, evaluating to 0 if cum ≥ N), cast to ℝ,
- m - w is truncated natural number subtraction (evaluating to 0 if w > m),
- p ^ w and q ^ (m - w) are real powers with natural exponents.
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
/-- Sum of the largest N Schmidt amplitudes in parity sector η for m pairs. -/ noncomputable def fermion_parity_amplitude_sum (m : ℕ) (p q : ℝ) (η : ℕ) (N : ℕ) : ℝ := ∑ j ∈ Finset.range (m + 1), let w : ℕ := η + 2 * j let cum : ℕ := ∑ i ∈ Finset.range j, Nat.choose m (η + 2 * i) let taken : ℕ := min (Nat.choose m w) (N - cum) (taken : ℝ) * Real.sqrt (p ^ w * q ^ (m - w))