Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§3.3: symmetric tridiagonal encoding (57)–(62)

Open
QAlgorithms.Papers.Independent.Extend50.P44.tridiagonalBase

by Gohan · Oct 29, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

For N=2nN=2^nN=2n, let real values a0,…,a2N−2a_0,\ldots,a_{2N-2}a0​,…,a2N−2​ specify the symmetric tridiagonal matrix with diagonal a2ia_{2i}a2i​ and adjacent entries a2i+1a_{2i+1}a2i+1​. Append a fixed zero sentinel at address 2N−12N-12N−1 and assume the resulting maximum magnitude MaM_aMa​ is positive. A label scheme (58)-(60), chosen before the data, and the H3 preparation on 00,01,11 give

(⟨0∣⊗I)U(∣0⟩⊗I)=A/(3Ma).(\langle0|\otimes I)U(|0\rangle\otimes I)=A/(3M_a).(⟨0∣⊗I)U(∣0⟩⊗I)=A/(3Ma​).

The base circuit has four flags and 2N2N2N padded loading slots. An absolute constant bounds arithmetic Toffoli count by C(n+1)C(n+1)C(n+1) with no extra work qubits. The sparse-access reference flag register has n+3n+3n+3 bits. The construction includes N=1N=1N=1 and N=2N=2N=2 using the same effective sparsity support.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Extend50_P44
Formal statement
noncomputable section

namespace QAlgorithms.Papers.Independent.Extend50.P44

open scoped BigOperators ComplexConjugate Matrix

open QAlgorithms.Papers.Independent.Frontier18.P11 (complexMatrix)

open QAlgorithms.Papers.Independent.Information100.P34 (permutationMatrix)

open QAlgorithms.Papers.Independent.Next46.P21 (tCount)

variable {n s d m : ℕ}

/-- PDF pp.15-16, (57)-(62): symmetric tridiagonal base construction.
Three supported sparsity states give normalization 3 max|a| despite four
physical states. Arithmetic needs no extra work qubits; data uses 2N slots. -/
theorem tridiagonalBase :
    ∃ C : ℝ, 0 < C ∧ ∀ n : ℕ, ∃ B : Scheme n 2 (n + 1) 1,
      TridiagonalLabels B ∧ B.ArithmeticCost (C * (n + 1)) 0 ∧
      loadingCost (baseLoadingSchedule (2 * 2 ^ n)) = 2 * 2 ^ n ∧
      Fintype.card ((Bool × Bool) × Fin 4) = 2 ^ 4 ∧
      Fintype.card ((Bool × Bool × Bool) × Fin (2 ^ n)) = 2 ^ (n + 3) ∧
      ∀ a : Fin (2 * 2 ^ n - 1) → ℝ, 0 < tableMax (triTable n a) →
        B.matrix (triTable n a) = tridiagonal n a ∧
        QAlgorithms.IsBlockEncoding ((false, false), 0) (B.baseCircuit (triTable n a))
          (3 * tableMax (triTable n a)) 0 (tridiagonal n a) := by sorry

end QAlgorithms.Papers.Independent.Extend50.P44

end
Source
Block-encoding structured matrices for data input in quantum computing, arXiv:2302.10949v2, PDF p. 16, §3.3: symmetric tridiagonal encoding (57)–(62)
Read-back

What the Lean code literally says, in plain math · gpt-6.1-sol

There is a real constant C>0C>0C>0 such that for every natural number nnn, including n=0n=0n=0, writing N=2nN=2^nN=2n and [r]={0,…,r−1}[r]=\{0,\ldots,r-1\}[r]={0,…,r−1}, there exists a scheme BBB with parameter balance (n+1)+1=2+n(n+1)+1=2+n(n+1)+1=2+n, bijections c,r:[2N]×[2]→[4]×[N]c,r:[2N]\times[2]\to[4]\times[N]c,r:[2N]×[2]→[4]×[N], both slot sets equal to {0,1,3}\{0,1,3\}{0,1,3}, and unitary slot matrices Hc,HrH_c,H_rHc​,Hr​ whose zeroth columns are 1/31/\sqrt31/3​ on those slots and zero at slot 222. Valid labels map into their respective slot sets and are uniquely determined by their column and row output coordinates together. For every label (u,t)(u,t)(u,t),

v(u,t)=true⟺¬((u mod 2=0∧t=1)∨u+1=2N),v(u,t)=\mathrm{true} \quad\Longleftrightarrow\quad \neg\bigl((u\bmod2=0\land t=1)\lor u+1=2N\bigr),v(u,t)=true⟺¬((umod2=0∧t=1)∨u+1=2N),

and whenever the label is valid,

r(u,t)2=(⌊u/2⌋+t) mod N,c(u,t)2=(⌊u/2⌋+{u mod 2,t=0,0,t≠0) mod N.r(u,t)_2=(\lfloor u/2\rfloor+t)\bmod N,\qquad c(u,t)_2= \left(\lfloor u/2\rfloor+ \begin{cases}u\bmod2,&t=0,\\0,&t\ne0\end{cases}\right)\bmod N.r(u,t)2​=(⌊u/2⌋+t)modN,c(u,t)2​=(⌊u/2⌋+{umod2,0,​t=0,t=0​)modN.

There are three reversible Boolean circuits with no work bits implementing the column map, row map, and invalid-label-controlled flip of the second of two flags, respectively, preserving both flags for the first two maps. Coordinates are encoded by concatenated, most-significant-bit-first binary strings. Elementary gates flip a target when all of at most two controls are true, with the target excluded from its controls; the total number of two-control gates across the three circuits is at most C(n+1)C(n+1)C(n+1). The schedule [2N][2N][2N] has sum 2N2N2N; the ancillary index set of two Boolean flags and a slot in [4][4][4] has cardinality 242^424; and the set of three Boolean flags together with an index in [N][N][N] has cardinality 2n+32^{n+3}2n+3. For every real a:[2N−1]→Ra:[2N-1]\to\mathbb Ra:[2N−1]→R, extend it to a~:[2N]→R\widetilde a:[2N]\to\mathbb Ra:[2N]→R by setting its last entry to zero, and suppose A=max⁡u∣a~u∣>0A=\max_u|\widetilde a_u|>0A=maxu​∣au​∣>0. The scheme matrix formed by summing a~u\widetilde a_uau​ over valid labels with prescribed row and column output coordinates equals

Kij={a2i,i=j,a2min⁡(i,j)+1,∣i−j∣=1,0,otherwise.K_{ij}= \begin{cases} a_{2i},&i=j,\\ a_{2\min(i,j)+1},&|i-j|=1,\\ 0,&\text{otherwise}. \end{cases}Kij​=⎩⎨⎧​a2i​,a2min(i,j)+1​,0,​i=j,∣i−j∣=1,otherwise.​

With R(q)=(q−i1−q2−i1−q2q)R(q)=\bigl(\begin{smallmatrix}q&-\mathrm i\sqrt{1-q^2}\\-\mathrm i\sqrt{1-q^2}&q\end{smallmatrix}\bigr)R(q)=(q−i1−q2​​−i1−q2​q​), applying Hc,c−1H_c,c^{-1}Hc​,c−1, then R(a~u/A)R(\widetilde a_u/A)R(au​/A) to the first flag and a flip of the second flag exactly at invalid labels, then r,Hr†r,H_r^\daggerr,Hr†​, gives a unitary matrix UUU whose ancillary block at ((false,false),0)((\mathrm{false},\mathrm{false}),0)((false,false),0), multiplied by 3A3A3A, equals KKK. For n=0n=0n=0, the input table and the target matrix each have one entry.

Human review
  • Endorsed by Shuze Chen · Oct 30, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 30, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me