Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§3.2: banded Toeplitz block encoding (50)–(55)

Open
QAlgorithms.Papers.Independent.Extend50.P44.toeplitzBase

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

prove2quantum

For N=2nN=2^nN=2n, D=2d≤ND=2^d\le ND=2d≤N and 0≤k<D0\le k<D0≤k<D, fix the Toeplitz labels (51) and the overflow test (52), independently of the real values ata_tat​. Let Aij=atA_{ij}=a_tAij​=at​ when i−j=t−ki-j=t-ki−j=t−k for 0≤t<D0\le t<D0≤t<D, and zero otherwise. If Ma=max⁡t∣at∣>0M_a=\max_t|a_t|>0Ma​=maxt​∣at​∣>0, the base circuit has

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

It loads DDD items and uses d+2d+2d+2 flags. One absolute constant bounds the arithmetic Toffoli count by C(n+1)C(n+1)C(n+1), uniformly over n,d,kn,d,kn,d,k and the values, with clean work returned to zero. The signed integer offset is range-tested rather than wrapped into the target matrix.

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.14-15, (50)-(55): banded Toeplitz encoding. The absolute constant
precedes the dimensions, offset and data. The arithmetic is O(log N), including
a harmless small-size constant; the overflow qubit is a flag. -/
theorem toeplitzBase :
    ∃ C : ℝ, 0 < C ∧ ∀ (n d : ℕ), d ≤ n → ∀ k : Fin (2 ^ d),
      ∃ B : Scheme n d d n, ToeplitzLabels B k ∧
        (∃ work, B.ArithmeticCost (C * (n + 1)) work) ∧
        loadingCost (baseLoadingSchedule (2 ^ d)) = 2 ^ d ∧
        Fintype.card ((Bool × Bool) × Fin (2 ^ d)) = 2 ^ (d + 2) ∧
        ∀ a : Fin (2 ^ d) → ℝ, 0 < tableMax a →
          B.matrix a = bandedToeplitz n d k a ∧
          QAlgorithms.IsBlockEncoding ((false, false), 0) (B.baseCircuit a)
            ((2 ^ d : ℕ) * tableMax a) 0 (bandedToeplitz n d k 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. 15, §3.2: banded Toeplitz block encoding (50)–(55)
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 all natural numbers n,dn,dn,d with d≤nd\le nd≤n, and every k∈[2d]k\in[2^d]k∈[2d], there exists the following scheme BBB, where [r]={0,…,r−1}[r]=\{0,\ldots,r-1\}[r]={0,…,r−1}, N=2nN=2^nN=2n, and D=2dD=2^dD=2d. Its parameter balance is d+n=d+nd+n=d+nd+n=d+n; its column and row maps are bijections c,r:[D]×[N]→[D]×[N]c,r:[D]\times[N]\to[D]\times[N]c,r:[D]×[N]→[D]×[N]; both slot sets are [D][D][D]; and its slot matrices Hc,HrH_c,H_rHc​,Hr​ are unitary with zeroth column constantly D−1/2D^{-1/2}D−1/2. Valid labels map into the specified slot sets and are uniquely determined by their column and row output coordinates together. For every label (u,t)(u,t)(u,t), the column map is c(u,t)=(u,t)c(u,t)=(u,t)c(u,t)=(u,t), the row slot is r(u,t)1=ur(u,t)_1=ur(u,t)1​=u, the row output is the integer remainder

r(u,t)2=(u−k+t) mod N,r(u,t)_2=(u-k+t)\bmod N,r(u,t)2​=(u−k+t)modN,

and validity is equivalent to 0≤u−k+t<N0\le u-k+t<N0≤u−k+t<N, with these subtractions interpreted in the integers. For some natural number of work bits, three reversible Boolean circuits implement the column map, row map, and invalid-label-controlled flip of the second of two flags, respectively, preserving the flags in the first two maps and restoring all work bits to zero. The encodings concatenate the two flags and the most-significant-bit-first ddd-bit and nnn-bit coordinates. Each elementary gate flips a target conditioned on all of at most two distinct-from-target controls being true; the total number of two-control gates in the three circuits is at most C(n+1)C(n+1)C(n+1). The loading schedule [D][D][D] has sum DDD, and the ancillary index set consisting of two Boolean flags and a slot in [D][D][D] has cardinality 2d+22^{d+2}2d+2. For every real table a:[D]→Ra:[D]\to\mathbb Ra:[D]→R with A=max⁡u∈[D]∣au∣>0A=\max_{u\in[D]}|a_u|>0A=maxu∈[D]​∣au​∣>0, the scheme matrix, formed by summing aua_uau​ over valid labels with the given row and column output coordinates, equals the matrix

Kij={ai−j+k,0≤i−j+k<D,0,otherwise,K_{ij}= \begin{cases} a_{i-j+k},&0\le i-j+k<D,\\ 0,&\text{otherwise}, \end{cases}Kij​={ai−j+k​,0,​0≤i−j+k<D,otherwise,​

where the index test uses integers. Define 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 HcH_cHc​ to the slot, then c−1c^{-1}c−1, then R(au/A)R(a_u/A)R(au​/A) to the first flag while flipping the second flag exactly at invalid labels, then rrr, and finally Hr†H_r^\daggerHr†​, gives a unitary matrix UUU satisfying

DA U(((false,false),0),i),(((false,false),0),j)=Kij.DA\,U_{(((\mathrm{false},\mathrm{false}),0),i),(((\mathrm{false},\mathrm{false}),0),j)} =K_{ij}.DAU(((false,false),0),i),(((false,false),0),j)​=Kij​.

The constant is uniform in all parameters. The quantifiers include d=0d=0d=0 and n=0n=0n=0; in particular, when n=0n=0n=0, necessarily d=0d=0d=0 and k=0k=0k=0.

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