Entrywise formula for a diagonal matrix sandwich
ProvedMatrix.diagonal_sandwich_applylinear-algebramatrix-theoryquantum-computing
Let be a diagonal complex matrix and any square complex matrix on a finite index set. Then the entry of is . Both matrix-product sums collapse because all off-diagonal entries of vanish.
Preamble
import Mathlib
Formal statement
namespace Matrix
/-- Multiplication on both sides by a diagonal matrix scales an entry by the two corresponding diagonal entries. -/
theorem diagonal_sandwich_apply {ι : Type*} [Fintype ι] [DecidableEq ι]
(D A : Matrix ι ι ℂ)
(hD : ∀ x y, x ≠ y → D x y = 0) (y z : ι) :
(D * A * D) y z = D y y * A y z * D z z := by sorry
end MatrixSource
Standard finite-dimensional matrix multiplication identity; used for Krivcenko, Nguyen, de Wolf, Fast Quantum Algorithms for Learning Linear Threshold Functions, arXiv:2609.40331, Lemma 3.3, Eq. (48).