Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§3.4: Hermitian extended-binary-tree base construction (67)–(74)

Open
QAlgorithms.Papers.Independent.Extend50.P44.extendedTreeBase

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

prove2quantum

Let n≥1n\ge1n≥1 and N=2nN=2^nN=2n. Give the extended binary tree the edge between each vertex i>0i>0i>0 and ⌊i/2⌋\lfloor i/2\rfloor⌊i/2⌋, edge weight a2a_2a2​, diagonal weight a0a_0a0​ at vertex 0 and at vertices i≥N/2i\ge N/2i≥N/2, and diagonal weight a1a_1a1​ elsewhere. Assume Ma=max⁡t<3∣at∣>0M_a=\max_{t<3}|a_t|>0Ma​=maxt<3​∣at​∣>0.

There are data-independent reversible labels (69)-(74), with a full transpose completion, such that the Hermitian base circuit obeys

U†=U,(⟨0∣⊗I)U(∣0⟩⊗I)=A/(4Ma).U^\dagger=U,\qquad (\langle0|\otimes I)U(|0\rangle\otimes I)=A/(4M_a).U†=U,(⟨0∣⊗I)U(∣0⟩⊗I)=A/(4Ma​).

Three supplied values occupy four physical data states; four supported sparsity states occupy three bits, giving five flags. At N=2N=2N=2 the internal-node weight need not occur. No preamplification or PREP improvement is asserted here.

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.17-18, (67)-(74): Hermitian extended-tree base construction.
The three data items occupy a four-state register; four supported sparsity
states occupy three bits. At n=1 the low-bit register is empty. -/
theorem extendedTreeBase (n : ℕ) (hn : 1 ≤ n) :
    ∃ B : Scheme n 3 2 (n + 1), ∃ T : TransposeOracle B,
      TreeLabels B ∧
      (∀ l, (T.transpose l).2.val = if l.1.val = 2 then
        (l.2.val + 2 ^ n) % 2 ^ (n + 1) else l.2.val) ∧
      loadingCost (baseLoadingSchedule 3) = 3 ∧
      Fintype.card ((Bool × Bool) × Fin 8) = 2 ^ 5 ∧
      ∀ a : Fin 3 → ℝ, 0 < tableMax a →
        B.matrix (treeTable a) = extendedTree n a ∧
        QAlgorithms.IsBlockEncoding ((false, false), 0) (B.baseCircuit (treeTable a) true)
          (4 * tableMax a) 0 (extendedTree n a) ∧
        (B.baseCircuit (treeTable a) true)ᴴ = B.baseCircuit (treeTable a) true := 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. 18, §3.4: Hermitian extended-binary-tree base construction (67)–(74)
Read-back

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

For every natural number n≥1n\ge1n≥1, put N=2nN=2^nN=2n and [r]={0,…,r−1}[r]=\{0,\ldots,r-1\}[r]={0,…,r−1}. There exist a scheme BBB and a label permutation τ\tauτ as follows. The scheme has parameter balance 2+(n+1)=3+n2+(n+1)=3+n2+(n+1)=3+n, bijections c,r:[4]×[2N]→[8]×[N]c,r:[4]\times[2N]\to[8]\times[N]c,r:[4]×[2N]→[8]×[N], both slot sets {0,1,2,3}\{0,1,2,3\}{0,1,2,3}, and unitary slot matrices Hc,HrH_c,H_rHc​,Hr​ whose zeroth columns equal 1/21/21/2 on those slots and zero elsewhere. Valid labels map into their slot sets and are uniquely determined by their column and row output coordinates together. The validity condition is

v(u,t)=true⟺(u=0∧(t=0∨N/2≤t<N))∨(u=1∧0<t<N/2)∨(u=2∧t≠0∧t≠N),\begin{aligned} v(u,t)=\mathrm{true}\quad\Longleftrightarrow\quad& \bigl(u=0\land(t=0\lor N/2\le t<N)\bigr)\\ &\lor\bigl(u=1\land0<t<N/2\bigr)\\ &\lor\bigl(u=2\land t\ne0\land t\ne N\bigr), \end{aligned}v(u,t)=true⟺​(u=0∧(t=0∨N/2≤t<N))∨(u=1∧0<t<N/2)∨(u=2∧t=0∧t=N),​

and every valid label satisfies

r(u,t)2={t,u<2,⌊t/2⌋,u≥2 and t<N,t−N,u≥2 and t≥N.r(u,t)_2= \begin{cases} t,&u<2,\\ \lfloor t/2\rfloor,&u\ge2\text{ and }t<N,\\ t-N,&u\ge2\text{ and }t\ge N. \end{cases}r(u,t)2​=⎩⎨⎧​t,⌊t/2⌋,t−N,​u<2,u≥2 and t<N,u≥2 and t≥N.​

The permutation τ\tauτ is involutive, preserves the data index and validity, satisfies r(ℓ)=c(τ(ℓ))r(\ell)=c(\tau(\ell))r(ℓ)=c(τ(ℓ)) for every label, and Hr=HcH_r=H_cHr​=Hc​; its second coordinate is (t+N) mod (2N)(t+N)\bmod(2N)(t+N)mod(2N) when u=2u=2u=2, and ttt otherwise. The loading schedule [3][3][3] has sum 333, and two Boolean flags together with a slot in [8][8][8] form an ancillary index set of cardinality 252^525. For every real table a:[3]→Ra:[3]\to\mathbb Ra:[3]→R with A=max⁡(∣a0∣,∣a1∣,∣a2∣)>0A=\max(|a_0|,|a_1|,|a_2|)>0A=max(∣a0​∣,∣a1​∣,∣a2​∣)>0, extend it to a~=(a0,a1,a2,0)\widetilde a=(a_0,a_1,a_2,0)a=(a0​,a1​,a2​,0). The scheme matrix, formed by summing a~u\widetilde a_uau​ over valid labels with prescribed output coordinates, equals

Kij={a0,i=j and (i=0 or N/2≤i),a1,i=j and 0<i<N/2,a2,i≠j and ((i>0∧⌊i/2⌋=j)∨(j>0∧⌊j/2⌋=i)),0,otherwise.K_{ij}= \begin{cases} a_0,&i=j\text{ and }(i=0\text{ or }N/2\le i),\\ a_1,&i=j\text{ and }0<i<N/2,\\ a_2,&i\ne j\text{ and } \bigl((i>0\land\lfloor i/2\rfloor=j)\lor (j>0\land\lfloor j/2\rfloor=i)\bigr),\\ 0,&\text{otherwise}. \end{cases}Kij​=⎩⎨⎧​a0​,a1​,a2​,0,​i=j and (i=0 or N/2≤i),i=j and 0<i<N/2,i=j and ((i>0∧⌊i/2⌋=j)∨(j>0∧⌊j/2⌋=i)),otherwise.​

Let 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​) and Z=diag⁡(1,−1)Z=\operatorname{diag}(1,-1)Z=diag(1,−1). Applying HcH_cHc​ to the slot, c−1c^{-1}c−1, then R(a~u/A)ZR(\widetilde a_u/A)ZR(au​/A)Z to the first flag while flipping the second flag exactly at invalid labels, then r,Hr†r,H_r^\daggerr,Hr†​, gives a unitary Hermitian matrix UUU, with

4A U(((false,false),0),i),(((false,false),0),j)=Kijfor all i,j∈[N].4A\,U_{(((\mathrm{false},\mathrm{false}),0),i),(((\mathrm{false},\mathrm{false}),0),j)} =K_{ij} \quad\text{for all }i,j\in[N].4AU(((false,false),0),i),(((false,false),0),j)​=Kij​for all i,j∈[N].

The same scheme and permutation work for every such table, including tables with individual zero entries.

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