flag_bound_magic_expectation_phi_plus_ne_zero
The expectation value of the flag-based three-qubit bound magic density matrix rho_B on the state vector phi_plus is nonzero.
Statement
open scoped Matrix in theorem flag_bound_magic_expectation_phi_plus_ne_zero : dotProduct (star flag_bound_magic_state.phi_plus) (flag_bound_magic_state *ᵥ flag_bound_magic_state.phi_plus) ≠ 0
- Source
- arXiv:2611.34872 Proposition 5 -- Bound magic in multi-qubit systems
- Verified
- 29 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 10
- flag_bound_magic_stateThe three-qubit bound magic density matrix rho_B is defined by applying the flag Pauli channel F to the projector |phi_+><phi_+|, where…
- PauliBasis.toMatrixMaps each Pauli basis element $\{I,X,Y,Z\}$ to its corresponding $2\times 2$ matrix $\{\sigma_I,\sigma_X,\sigma_Y,\sigma_Z\}$.
- PauliBasisThe four Pauli basis elements $\{I,X,Y,Z\}$, represented as an inductive type.
- PauliStringA Pauli string of length $n$ is a function $p : \mathrm{Fin}\,n \to \mathrm{PauliBasis}$.
- pauliMatrixFor a Pauli string $p$ on $n$ qubits, the $2^n\times 2^n$ matrix obtained as the tensor product of the single-qubit Pauli matrices…
- sigmaIThe $2\times 2$ identity matrix over $\mathbb{C}$, i.e.\ the Pauli operator $I$.
- sigmaXThe bit-flip Pauli matrix $X = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}$ over $\mathbb{C}$.
- sigmaYThe bit-phase-flip Pauli matrix $Y = \begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix}$ over $\mathbb{C}$.
- sigmaZThe phase-flip Pauli matrix $Z = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}$ over $\mathbb{C}$.
- MFor a group $G$, $M$ is the set of elements $s \in G \setminus \{1\}$ such that $c_G(x) \le c_G(s)$ for all $x \in G \setminus \{1\}$.
Read back from the Lean
The expectation value (inner product / dot product) of the 3-qubit state flag_bound_magic_state.phi_plus with respect to the matrix flag_bound_magic_state, defined as dotProduct (star phi_plus) (flag_bound_magic_state *ᵥ phi_plus), is not equal to 0 in ℂ.
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
The proof, explained
Proof sketch: The expectation value of the flag bound magic state on phi_plus expands as a positive combination r^2/8 + T/24, where r is the norm of phi_plus and T is a sum of squared matrix elements. Since phi_plus is non-zero, r > 0, and since T >= 0, the sum is strictly positive, hence non-zero.
Single-qubit Pauli matrices are Hermitian.
Case analysis on the Pauli basis elements and entrywise verification.
cases b <;> ext i j <;> fin_cases i <;> fin_cases j <;> simp [PauliBasis.toMatrix, sigmaI, sigmaX, sigmaY, sigmaZ, Matrix.conjTranspose_apply]
Pauli string matrices are Hermitian.
Since each single-qubit factor is Hermitian, their tensor product is Hermitian.
ext i j simp only [Matrix.conjTranspose_apply, pauliMatrix, star_prod] refine Finset.prod_congr rfl (fun k _ => ?_) have h := congrFun (congrFun (flag_bound_magic_expectation_phi_plus_ne_zero_sigma_hermitian (p k)) (i k)) (j k) simpa [Matrix.conjTranspose_apply] using h
- Unresolved check: no step explains line(s) 24, 25, 27, 28, 36, 37, 38, 40, 41, 42, 43, 44, 45, 46, 52, 53, 54, 55, 56, 58 -- every tactic of the proof has to belong to some step
Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
open scoped Matrix/-- The single-qubit Pauli matrices are Hermitian. -/lemma flag_bound_magic_expectation_phi_plus_ne_zero_sigma_hermitian (b : PauliBasis) : (b.toMatrix)ᴴ = b.toMatrix := by cases b <;> ext i j <;> fin_cases i <;> fin_cases j <;> simp [PauliBasis.toMatrix, sigmaI, sigmaX, sigmaY, sigmaZ, Matrix.conjTranspose_apply]/-- Every Pauli string matrix is Hermitian. -/lemma flag_bound_magic_expectation_phi_plus_ne_zero_pauliMatrix_hermitian {n : ℕ} (p : PauliString n) : (pauliMatrix p)ᴴ = pauliMatrix p := by ext i j simp only [Matrix.conjTranspose_apply, pauliMatrix, star_prod] refine Finset.prod_congr rfl (fun k _ => ?_) have h := congrFun (congrFun (flag_bound_magic_expectation_phi_plus_ne_zero_sigma_hermitian (p k)) (i k)) (j k) simpa [Matrix.conjTranspose_apply] using h/-- An outer product applied to a vector. -/lemma flag_bound_magic_expectation_phi_plus_ne_zero_vecMulVec_mulVec {m : Type*} [Fintype m] (u v w : m → ℂ) : Matrix.vecMulVec u v *ᵥ w = (v ⬝ᵥ w) • u := by ext i simp only [Matrix.vecMulVec, Matrix.of_apply, Matrix.mulVec, dotProduct, Pi.smul_apply, smul_eq_mul] rw [Finset.sum_mul] exact Finset.sum_congr rfl fun j _ => by ring/-- The expectation of a Hermitian conjugate of the projector `|φ><φ|` is the squaredmodulus of `⟨φ, Pφ⟩`. -/lemma flag_bound_magic_expectation_phi_plus_ne_zero_sandwich {m : Type*} [Fintype m] (M : Matrix m m ℂ) (hM : Mᴴ = M) (φ : m → ℂ) : (star φ) ⬝ᵥ ((M * Matrix.vecMulVec φ (star φ) * M) *ᵥ φ) = ↑(Complex.normSq ((star φ) ⬝ᵥ (M *ᵥ φ))) := by set A := M *ᵥ φ with hA set z := (star φ) ⬝ᵥ A with hz have h1 : (M * Matrix.vecMulVec φ (star φ) * M) *ᵥ φ = M *ᵥ (Matrix.vecMulVec φ (star φ) *ᵥ (M *ᵥ φ)) := by rw [← Matrix.mulVec_mulVec, ← Matrix.mulVec_mulVec] have h2 : Matrix.vecMulVec φ (star φ) *ᵥ A = z • φ := by rw [flag_bound_magic_expectation_phi_plus_ne_zero_vecMulVec_mulVec, hz] have h3 : (star φ) ⬝ᵥ (M *ᵥ (z • φ)) = (star A) ⬝ᵥ (z • φ) := by rw [Matrix.dotProduct_mulVec, ← hM, ← Matrix.star_mulVec, ← hA] rw [h1, h2, h3, dotProduct_smul, Matrix.star_dotProduct, smul_eq_mul, hz] exact Complex.mul_conj zopen scoped Matrix in/-- The expectation value of the flag-based three-qubit bound magic state on phi_plus is nonzero. -/theorem flag_bound_magic_expectation_phi_plus_ne_zero : dotProduct (star flag_bound_magic_state.phi_plus) (flag_bound_magic_state *ᵥ flag_bound_magic_state.phi_plus) ≠ 0 := by set φ := flag_bound_magic_state.phi_plus with hφ set P0 := Matrix.vecMulVec φ (star φ) with hP0 set S := ∑ P ∈ flag_bound_magic_state.flag_paulis, pauliMatrix P * P0 * pauliMatrix P with hS set r : ℝ := ∑ i, Complex.normSq (φ i) with hr set T : ℝ := ∑ P ∈ flag_bound_magic_state.flag_paulis, Complex.normSq ((star φ) ⬝ᵥ (pauliMatrix P *ᵥ φ)) with hT have hρ : flag_bound_magic_state = (1/8 : ℂ) • P0 + (1/24 : ℂ) • S := by simp only [flag_bound_magic_state, flag_bound_magic_state.proj_phi_plus, ← hφ, ← hP0, ← hS] have hstep1 : dotProduct (star φ) (flag_bound_magic_state *ᵥ φ) = (1/8 : ℂ) * dotProduct (star φ) (P0 *ᵥ φ) + (1/24 : ℂ) * dotProduct (star φ) (S *ᵥ φ) := by rw [hρ, Matrix.add_mulVec, Matrix.smul_mulVec, Matrix.smul_mulVec] rw [dotProduct_add, dotProduct_smul, dotProduct_smul] simp [smul_eq_mul] have hd : dotProduct (star φ) φ = ↑r := by simp only [dotProduct, Pi.star_apply, hr] rw [show ∑ x, star (φ x) * φ x = ∑ x, ↑(Complex.normSq (φ x)) from Finset.sum_congr rfl (fun i _ => by rw [mul_comm]; exact Complex.mul_conj (φ i))] rw [← Complex.ofReal_sum] have hterm0 : dotProduct (star φ) (P0 *ᵥ φ) = dotProduct (star φ) φ * dotProduct (star φ) φ := by rw [hP0, flag_bound_magic_expectation_phi_plus_ne_zero_vecMulVec_mulVec, dotProduct_smul, smul_eq_mul] have htermS : dotProduct (star φ) (S *ᵥ φ) = ↑T := by rw [hS, Matrix.sum_mulVec, dotProduct_sum] rw [hT] rw [show ∑ i ∈ flag_bound_magic_state.flag_paulis, dotProduct (star φ) ((pauliMatrix i * P0 * pauliMatrix i) *ᵥ φ) = ∑ i ∈ flag_bound_magic_state.flag_paulis, ↑(Complex.normSq (dotProduct (star φ) (pauliMatrix i *ᵥ φ))) from Finset.sum_congr rfl (fun P _ => by simp only [hP0] exact flag_bound_magic_expectation_phi_plus_ne_zero_sandwich (pauliMatrix P) (flag_bound_magic_expectation_phi_plus_ne_zero_pauliMatrix_hermitian P) φ)] rw [← Complex.ofReal_sum] have hφ0 : φ (fun _ => 0) ≠ 0 := by rw [hφ] simp only [flag_bound_magic_state.phi_plus, flag_bound_magic_state.u, flag_bound_magic_state.v] simp only [if_true] have hnum : ((1:ℂ) + ↑flag_bound_magic_state.t) ≠ 0 := by have h : (1:ℝ) + flag_bound_magic_state.t ≠ 0 := by have ht : (0:ℝ) < flag_bound_magic_state.t := by simp only [flag_bound_magic_state.t]; positivity positivity exact_mod_cast h have hden : ((Real.sqrt (2 * (1 + flag_bound_magic_state.t)) : ℝ) : ℂ) ≠ 0 := by have h : (0:ℝ) < Real.sqrt (2 * (1 + flag_bound_magic_state.t)) := Real.sqrt_pos.mpr (by have ht : (0:ℝ) < flag_bound_magic_state.t := by simp only [flag_bound_magic_state.t]; positivity positivity) exact_mod_cast ne_of_gt h exact div_ne_zero hnum hden have hrpos : 0 < r := by rw [hr] have hsingle : 0 < Complex.normSq (φ (fun _ => 0)) := Complex.normSq_pos.mpr hφ0 have hle := Finset.single_le_sum (f := fun i : Fin 3 → Fin 2 => Complex.normSq (φ i)) (fun i _ => Complex.normSq_nonneg (φ i)) (Finset.mem_univ (fun _ => 0 : Fin 3 → Fin 2)) linarith have hTnn : 0 ≤ T := by rw [hT] exact Finset.sum_nonneg (fun P _ => Complex.normSq_nonneg _) have hE : dotProduct (star φ) (flag_bound_magic_state *ᵥ φ) = ↑(r * r / 8 + T / 24) := by rw [hstep1, hterm0, hd, htermS] push_cast ring rw [hE] intro h have h' : r * r / 8 + T / 24 = 0 := by have h2 : (↑(r * r / 8 + T / 24) : ℂ) = ↑(0:ℝ) := by simpa using h exact Complex.ofReal_inj.mp h2 nlinarith