fermion_pair_stabilizer_fidelity
The function fermion_pair_stabilizer_fidelity (s m : ℕ) : ℝ returns the real number given by the maximum of (Finset.range m).fold max 0 (fun k => max (pure_val k 0) (pure_val k 1)) and (Finset.Icc 1 m).fold max 0 bal_val, evaluating to 0 when m = 0, where A = (2 : ℝ)^s, p = 1 / (1 + A), q = 1 - p, pure_val k η = (2 : ℝ)^(-(k : ℤ)) * (fermion_parity_amplitude_sum m p q η (2^k))^2, and bal_val k = (2 : ℝ)^(-(k : ℤ)) * (fermion_parity_amplitude_sum m p q 0 (2^(k-1)) + fermion_parity_amplitude_sum m p q 1 (2^(k-1)))^2.
Statement
noncomputable def fermion_pair_stabilizer_fidelity (s : ℕ) (m : ℕ) : ℝ
- Defined in
- arXiv:2611.07003; OP-1787
- Verified
- 17 Nov 2026
- Axioms
- none listed
- Built on 1
- fermion_parity_amplitude_sumFor 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…
Read back from the Lean
A definition of a noncomputable function fermion_pair_stabilizer_fidelity (s : ℕ) (m : ℕ) : ℝ.
Given $s, m \in \mathbb{N}$, set:
- $A = 2^s$
- $p = \frac{1}{1 + A}$
- $q = 1 - p$
Define helper values:
- For $k, \eta \in \mathbb{N}$:
$$\text{pure\_val}(k, \eta) = 2^{-k} \cdot \left(\text{fermion\_parity\_amplitude\_sum}(m, p, q, \eta, 2^k)\right)^2$$
- For $k \in \mathbb{N}$:
$$\text{bal\_val}(k) = 2^{-k} \cdot \left(\text{fermion\_parity\_amplitude\_sum}(m, p, q, 0, 2^{k-1}) + \text{fermion\_parity\_amplitude\_sum}(m, p, q, 1, 2^{k-1})\right)^2$$
The function returns the maximum of:
1. The maximum over $k \in \{0, \dots, m - 1\}$ of $\max(\text{pure\_val}(k, 0), \text{pure\_val}(k, 1))$ (folded with default base value $0$, which is returned if $m = 0$), and
2. The maximum over $k \in \{1, \dots, m\}$ of $\text{bal\_val}(k)$ (folded with default base value $0$, which is returned if $m = 0$).
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 maximum parity-preserving local-unitary stabilizer fidelity F_m of m identical fermion pairs. -/ noncomputable def fermion_pair_stabilizer_fidelity (s : ℕ) (m : ℕ) : ℝ := let A : ℝ := (2 : ℝ) ^ s let p : ℝ := 1 / (1 + A) let q : ℝ := 1 - p let pure_val (k : ℕ) (η : ℕ) : ℝ := (2 : ℝ) ^ (- (k : ℤ)) * (fermion_parity_amplitude_sum m p q η (2 ^ k)) ^ 2 let bal_val (k : ℕ) : ℝ := (2 : ℝ) ^ (- (k : ℤ)) * (fermion_parity_amplitude_sum m p q 0 (2 ^ (k - 1)) + fermion_parity_amplitude_sum m p q 1 (2 ^ (k - 1))) ^ 2 max ((Finset.range m).fold max 0 (fun k => max (pure_val k 0) (pure_val k 1))) ((Finset.Icc 1 m).fold max 0 bal_val)