Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§3.1: checkerboard PREP circuit (45)–(47)

Open
QAlgorithms.Papers.Independent.Extend50.P44.checkerboardPrep

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

prove2quantum

Let n≥1n\ge1n≥1, N=2nN=2^nN=2n, and Aij=a(i+j) mod 2A_{ij}=a_{(i+j)\bmod2}Aij​=a(i+j)mod2​ for real values not both zero. Fix the checkerboard label scheme and its data-preserving tensor factors before choosing the values. Signed normalized PREP and UNPREP operators at p=1/2p=1/2p=1/2 can be chosen so that circuit (45), without a deletion flag, satisfies

(⟨0∣⊗I)U(∣0⟩⊗I)=A/α,α=N2(∣a0∣+∣a1∣)≤Nmax⁡(∣a0∣,∣a1∣).(\langle0|\otimes I)U(|0\rangle\otimes I)=A/\alpha,\qquad\alpha=\frac N2(|a_0|+|a_1|)\le N\max(|a_0|,|a_1|).(⟨0∣⊗I)U(∣0⟩⊗I)=A/α,α=2N​(∣a0​∣+∣a1​∣)≤Nmax(∣a0​∣,∣a1​∣).

The preparation convention is (29)-(30), which also covers negative values; no square root of a negative data item is used. This improves the checkerboard base normalization.

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.13, (45)-(47): signed PREP/UNPREP checkerboard construction.
The two normalized preparation operators use the general sign conventions,
rather than taking square roots of negative entries in the printed (46). -/
theorem checkerboardPrep (n : ℕ) (hn : 1 ≤ n) :
    ∃ B : Scheme n n 1 (2 * n - 1), ∃ L : PrepLayout B,
      CheckerLabels B ∧ L.active = Finset.univ ∧
      ∀ a : Fin 2 → ℝ, 0 < tableMax a →
      ∃ P : PreparationPair L a (1 / 2), B.matrix a = checkerboard n a ∧
        QAlgorithms.IsBlockEncoding (0 : Fin (2 ^ n)) (L.noDeleteCircuit P)
          ((2 ^ n : ℕ) * (|a 0| + |a 1|) / 2) 0 (checkerboard n a) ∧
        ((2 ^ n : ℕ) : ℝ) * (|a 0| + |a 1|) / 2 ≤
          (2 ^ n : ℕ) * max |a 0| |a 1| := 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. 13, §3.1: checkerboard PREP circuit (45)–(47)
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, M=22n−1M=2^{2n-1}M=22n−1, and [r]={0,…,r−1}[r]=\{0,\ldots,r-1\}[r]={0,…,r−1}. There exist a scheme BBB and a preparation layout LLL as follows. The scheme has parameter balance 1+(2n−1)=2n1+(2n-1)=2n1+(2n−1)=2n, bijections c,r:[2]×[M]→[N]×[N]c,r:[2]\times[M]\to[N]\times[N]c,r:[2]×[M]→[N]×[N], all labels valid, both slot sets equal to [N][N][N], unitary slot matrices with zeroth column constantly N−1/2N^{-1/2}N−1/2, and uniqueness of each label from its column and row output coordinates together; its output coordinates satisfy

r(u,t)2=⌊tN/2⌋,c(u,t)2=2(t mod (N/2))+(u+⌊tN/2⌋) mod 2.r(u,t)_2=\left\lfloor\frac{t}{N/2}\right\rfloor,\qquad c(u,t)_2=2(t\bmod(N/2))+ \left(u+\left\lfloor\frac{t}{N/2}\right\rfloor\right)\bmod2.r(u,t)2​=⌊N/2t​⌋,c(u,t)2​=2(tmod(N/2))+(u+⌊N/2t​⌋)mod2.

The layout has active set [2][2][2], natural numbers kc,krk_c,k_rkc​,kr​, slot factorizations fc:[N]≃[2]×[2kc]f_c:[N]\simeq[2]\times[2^{k_c}]fc​:[N]≃[2]×[2kc​], fr:[N]≃[2]×[2kr]f_r:[N]\simeq[2]\times[2^{k_r}]fr​:[N]≃[2]×[2kr​] sending zero to (0,0)(0,0)(0,0), nonempty residual sets C0,R0C_0,R_0C0​,R0​, and unitary residual matrices Kc,KrK_c,K_rKc​,Kr​ with zeroth columns equal to the normalized indicators of those sets. Slot membership is equivalent to the data factor being active and the residual factor belonging to its residual set, and the data factors of the column and row slots of (u,t)(u,t)(u,t) both equal uuu. For every real table a:[2]→Ra:[2]\to\mathbb Ra:[2]→R with A=max⁡(∣a0∣,∣a1∣)>0A=\max(|a_0|,|a_1|)>0A=max(∣a0​∣,∣a1​∣)>0, there exist unitary matrices Pc,PrP_c,P_rPc​,Pr​ on C[2]\mathbb C^{[2]}C[2], writing S=∣a0∣+∣a1∣S=|a_0|+|a_1|S=∣a0​∣+∣a1​∣, such that

(Pc)u0=sign⁡(au)∣au∣S,(Pr)0u=∣au∣S.(P_c)_{u0}=\frac{\operatorname{sign}(a_u)\sqrt{|a_u|}}{\sqrt S}, \qquad (P_r)_{0u}=\frac{\sqrt{|a_u|}}{\sqrt S}.(Pc​)u0​=S​sign(au​)∣au​∣​​,(Pr​)0u​=S​∣au​∣​​.

The scheme matrix, defined by summing aua_uau​ over valid labels with the specified row and column output coordinates, equals Kij=a(i+j) mod 2K_{ij}=a_{(i+j)\bmod2}Kij​=a(i+j)mod2​. Reindex Pc⊗KcP_c\otimes K_cPc​⊗Kc​ and Pr⊗Kr†P_r\otimes K_r^\daggerPr​⊗Kr†​ through fc,frf_c,f_rfc​,fr​ to get slot matrices Fc,FrF_c,F_rFc​,Fr​. The matrix UUU on slot/output pairs obtained by applying FcF_cFc​, then c−1c^{-1}c−1, then rrr, then FrF_rFr​, is precisely the false-to-false flag block of the layout circuit, since all labels are valid; it is unitary and obeys

NS2 U(0,i),(0,j)=Kij,NS2≤Nmax⁡(∣a0∣,∣a1∣).\frac{NS}{2}\,U_{(0,i),(0,j)}=K_{ij},\qquad \frac{NS}{2}\le N\max(|a_0|,|a_1|).2NS​U(0,i),(0,j)​=Kij​,2NS​≤Nmax(∣a0​∣,∣a1​∣).

Only the table as a whole must be nonzero; an individual entry may vanish.

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