Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§2.4: Hermitian base construction (35)–(36)

Open
QAlgorithms.Papers.Independent.Extend50.P44.hermitianBaseConstruction

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

prove2quantum

Fix a compatible base scheme and a transpose permutation TTT on every physical label. Assume T2=IT^2=IT2=I, TTT preserves the data label and range predicate, the row oracle is the column oracle composed with TTT, and the two sparsity preparations coincide. For real supplied data with Ma>0M_a>0Ma​>0, prepend Z to the data-flag RX rotation as in (36). Then

U†=U,(⟨0∣⊗I)U(∣0⟩⊗I)=A/(ScSrMa).U^\dagger=U,\qquad(\langle0|\otimes I)U(|0\rangle\otimes I)=A/(\sqrt{S_cS_r}M_a).U†=U,(⟨0∣⊗I)U(∣0⟩⊗I)=A/(Sc​Sr​​Ma​).

The circuit retains one loading of DDD items and s+2s+2s+2 physical flags. Hermiticity is a conclusion about the full unitary, including invalid-label completions.

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 p.11, (35)-(36): RX preceded by Z, transpose, and range deletion
produce a Hermitian full unitary with the base resources. -/
theorem hermitianBaseConstruction (B : Scheme n s d m) (T : TransposeOracle B)
    (a : Fin (2 ^ d) → ℝ) (active : Finset (Fin (2 ^ d))) (hactive : active.Nonempty)
    (hpadding : ∀ j, j ∉ active → a j = 0)
    (ha : 0 < tableMax a) :
    QAlgorithms.IsBlockEncoding ((false, false), 0) (B.baseCircuit a true)
      (B.baseAlpha a) 0 (B.matrix a) ∧
    (B.baseCircuit a true)ᴴ = B.baseCircuit a true ∧
    loadingCost (baseLoadingSchedule active.card) = active.card ∧
    Fintype.card ((Bool × Bool) × Fin (2 ^ s)) = 2 ^ (s + 2) := 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. 11, §2.4: Hermitian base construction (35)–(36)
Read-back

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

For natural numbers n,s,d,mn,s,d,mn,s,d,m, write Jt={0,…,2t−1}J_t=\{0,\ldots,2^t-1\}Jt​={0,…,2t−1} and L=Jd×JmL=J_d\times J_mL=Jd​×Jm​. Let BBB be a scheme with d+m=s+nd+m=s+nd+m=s+n, bijections C,R:L→Js×JnC,R:L\to J_s\times J_nC,R:L→Js​×Jn​, Boolean validity vvv, nonempty slot sets Sc,SrS_c,S_rSc​,Sr​, and unitaries Hc,HrH_c,H_rHc​,Hr​ with first columns uniform on their respective slot sets and zero elsewhere; valid labels map into the corresponding slot sets and are uniquely determined by their column and row system positions. Suppose a permutation τ\tauτ of LLL satisfies τ2=id\tau^2=\mathrm{id}τ2=id, τ(ℓ)1=ℓ1\tau(\ell)_1=\ell_1τ(ℓ)1​=ℓ1​, v(τ(ℓ))=v(ℓ)v(\tau(\ell))=v(\ell)v(τ(ℓ))=v(ℓ), R(ℓ)=C(τ(ℓ))R(\ell)=C(\tau(\ell))R(ℓ)=C(τ(ℓ)) for every label, and Hr=HcH_r=H_cHr​=Hc​. Let a:Jd→Ra:J_d\to\mathbb Ra:Jd​→R, and let active⊆Jd\mathrm{active}\subseteq J_dactive⊆Jd​ be nonempty, with aj=0a_j=0aj​=0 outside it and M=max⁡j∣aj∣>0M=\max_j|a_j|>0M=maxj​∣aj​∣>0. Define D(q)D(q)D(q) to have diagonal entries qqq and off-diagonal entries −i1−q2-\mathrm i\sqrt{1-q^2}−i1−q2​, and define

K((b,e),ℓ),((c,f),k)=1ℓ=k 1 e=(f if v(k) else ¬f) D(ak1/M)b,c{−1,c=true,1,c=false.K_{((b,e),\ell),((c,f),k)} =\mathbf1_{\ell=k}\, \mathbf1_{\,e=(f\text{ if }v(k)\text{ else }\neg f)}\, D(a_{k_1}/M)_{b,c} \begin{cases}-1,&c=\mathrm{true},\\1,&c=\mathrm{false}.\end{cases}K((b,e),ℓ),((c,f),k)​=1ℓ=k​1e=(f if v(k) else ¬f)​D(ak1​​/M)b,c​{−1,1,​c=true,c=false.​

Let PC,PRP_C,P_RPC​,PR​ implement the label bijections while preserving flags, let D(H)\mathcal D(H)D(H) apply HHH only to the slot, and set U=D(Hr)†PRKPC†D(Hc)U=\mathcal D(H_r)^\dagger P_RKP_C^\dagger\mathcal D(H_c)U=D(Hr​)†PR​KPC†​D(Hc​), regrouped onto (((b,e),t),i)(((b,e),t),i)(((b,e),t),i). For

Aij=∑ℓ: v(ℓ)=true, R(ℓ)2=i, C(ℓ)2=jaℓ1,α=∣Sc∣∣Sr∣ M,A_{ij}=\sum_{\ell:\,v(\ell)=\mathrm{true},\,R(\ell)_2=i,\,C(\ell)_2=j}a_{\ell_1}, \qquad \alpha=\sqrt{|S_c||S_r|}\,M,Aij​=ℓ:v(ℓ)=true,R(ℓ)2​=i,C(ℓ)2​=j∑​aℓ1​​,α=∣Sc​∣∣Sr​∣​M,

the conclusion is that UUU is unitary, its all-false, zero-slot block satisfies ∥αU00−A∥op≤0\|\alpha U_{00}-A\|_{\mathrm{op}}\le0∥αU00​−A∥op​≤0, and U†=UU^\dagger=UU†=U. The loading schedule [∣active∣][|\mathrm{active}|][∣active∣] has sum ∣active∣|\mathrm{active}|∣active∣, and the ancilla index set has cardinality 2s+22^{s+2}2s+2. Table entries within active\mathrm{active}active may be zero.

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