Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§3.1: checkerboard base circuit and costs (40)–(44)

Open
QAlgorithms.Papers.Independent.Extend50.P44.checkerboardBase

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

prove2quantum

Let n≥1n\ge1n≥1 and N=2nN=2^nN=2n. There are fixed arithmetic label oracles (41)-(42), chosen independently of the two real values a0,a1a_0,a_1a0​,a1​, for the checkerboard matrix Aij=a(i+j) mod 2A_{ij}=a_{(i+j)\bmod2}Aij​=a(i+j)mod2​. For every table with max⁡(∣a0∣,∣a1∣)>0\max(|a_0|,|a_1|)>0max(∣a0​∣,∣a1​∣)>0, the no-deletion base circuit satisfies

(⟨0∣⊗I)U(∣0⟩⊗I)=ANmax⁡(∣a0∣,∣a1∣).(\langle0|\otimes I)U(|0\rangle\otimes I)=\frac{A}{N\max(|a_0|,|a_1|)}.(⟨0∣⊗I)U(∣0⟩⊗I)=Nmax(∣a0​∣,∣a1​∣)A​.

It loads two items, uses n+1n+1n+1 flags, and its arithmetic oracles use only X and CNOT gates, hence zero Toffoli/T cost. No full-unitary Hermiticity is asserted for (43). This example demonstrates repeated-value loading with data-independent structure.

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, (43)-(44): checkerboard construction, with exactly two loaded
data slots, n+1 flags, and zero Toffoli cost in the arithmetic oracles. -/
theorem checkerboardBase (n : ℕ) (hn : 1 ≤ n) :
    ∃ B : Scheme n n 1 (2 * n - 1), CheckerLabels B ∧ B.ArithmeticCost 0 0 ∧
      loadingCost (baseLoadingSchedule 2) = 2 ∧
      Fintype.card (Bool × Fin (2 ^ n)) = 2 ^ (n + 1) ∧
      ∀ a : Fin 2 → ℝ, 0 < tableMax a →
        B.matrix a = checkerboard n a ∧
        QAlgorithms.IsBlockEncoding (false, 0) (B.simpleCircuit a)
          ((2 ^ n : ℕ) * max |a 0| |a 1|) 0 (checkerboard 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. 13, §3.1: checkerboard base circuit and costs (40)–(44)
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 M=22n−1M=2^{2n-1}M=22n−1, and write [r]={0,…,r−1}[r]=\{0,\ldots,r-1\}[r]={0,…,r−1}. There exists a scheme BBB consisting of column and row bijections c,r:[2]×[M]→[N]×[N]c,r:[2]\times[M]\to[N]\times[N]c,r:[2]×[M]→[N]×[N], a Boolean validity function, nonempty slot sets C,R⊆[N]C,R\subseteq[N]C,R⊆[N], and unitary slot matrices Hc,HrH_c,H_rHc​,Hr​, with parameter balance 1+(2n−1)=n+n1+(2n-1)=n+n1+(2n−1)=n+n. Every label is valid, C=R=[N]C=R=[N]C=R=[N], both slot matrices have zeroth column constantly N−1/2N^{-1/2}N−1/2, and labels are uniquely determined by their column and row output coordinates together. For every label (u,t)(u,t)(u,t),

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 scheme admits three reversible Boolean circuits, with no work bits, implementing the column bijection, row bijection, and validity-controlled flip of the second of two flags, respectively, while preserving both flags in the first two maps. Labels and slot/output pairs are encoded by concatenating their fixed-width binary representations, most significant bit first. Each elementary Boolean gate flips a target exactly when all its controls are true, has at most two controls, and does not use its target as a control; the total number of gates with two controls across the three circuits is zero, with no bound asserted on the numbers of gates with fewer controls. The loading schedule [2][2][2] has sum 222, and the ancillary index set {false,true}×[N]\{\mathrm{false},\mathrm{true}\}\times[N]{false,true}×[N] has cardinality 2n+12^{n+1}2n+1. 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, the matrix whose (i,j)(i,j)(i,j)-entry is the sum of aua_uau​ over valid labels (u,t)(u,t)(u,t) with row output iii and column output jjj equals Kij=a(i+j) mod 2K_{ij}=a_{(i+j)\bmod2}Kij​=a(i+j)mod2​. Define

R(q)=(q−i1−q2−i1−q2q).R(q)=\begin{pmatrix}q&-\mathrm i\sqrt{1-q^2}\\-\mathrm i\sqrt{1-q^2}&q\end{pmatrix}.R(q)=(q−i1−q2​​−i1−q2​q​).

The matrix UUU obtained by applying HcH_cHc​ to the slot, the inverse column bijection, R(au/A)R(a_u/A)R(au​/A) to a Boolean flag while holding the label (u,t)(u,t)(u,t) fixed, the row bijection, and finally Hr†H_r^\daggerHr†​ to the slot is unitary and satisfies

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

The same scheme works for all such tables, including tables with one zero 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