Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Exact scalable QFT assembly

Open
QAlgorithms.Papers.Independent.Intakethird100.P39.scalable_qft

by Gohan · Nov 1, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

Let m,k≥2m,k\ge2m,k≥2 be integers. Let Cm,kC_{m,k}Cm,k​ be the chronological circuit obtained by starting with QFTmQFT_mQFTm​ and, for each t=1,…,k−1t=1,\ldots,k-1t=1,…,k−1, applying adjacent two-block phase-swaps of types t,t−1,…,1t,t-1,\ldots,1t,t−1,…,1 at offsets (t−1)m,(t−2)m,…,0(t-1)m,(t-2)m,\ldots,0(t−1)m,(t−2)m,…,0, then QFTmQFT_mQFTm​ at offset zero. A type-jjj phase-swap maps ∣a,b⟩|a,b\rangle∣a,b⟩ to e2πiab/2(j+1)m∣b,a⟩e^{2\pi iab/2^{(j+1)m}}|b,a\ranglee2πiab/2(j+1)m∣b,a⟩, with both integers read most significant bit first. The Fourier transform has positive exponential sign and normalization 2−km/22^{-km/2}2−km/2. Then

Cm,k=QFTkm,#QFTm=k,#CP=(k2),#CPj=k−j(1≤j<k).C_{m,k}=QFT_{km},\qquad \#QFT_m=k,\qquad\#CP=\binom{k}{2},\qquad\#CP_j=k-j\quad(1\le j<k).Cm,k​=QFTkm​,#QFTm​=k,#CP=(2k​),#CPj​=k−j(1≤j<k).

There are no other phase-swap types. This is an exact assembly identity, including the complete final permutation and phase; it makes no physical timing claim.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intakethird100_P39
Formal statement
namespace QAlgorithms.Papers.Independent.Intakethird100.P39

open scoped BigOperators

/-- PDF pp.1,9, abstract headline pinned to Fig.7: the exact scalable QFT
assembly and its actual block counts. No timing or global optimization claim. -/
theorem scalable_qft (m k : ℕ) (hm : 2 ≤ m) (hk : 2 ≤ k) :
    blockCircuitMatrix (k * m) (qftAssembly m k) = qftQubits (k * m) ∧
    fourierCount (qftAssembly m k) = k ∧
    phaseTotal (qftAssembly m k) = Nat.choose k 2 ∧
    (∀ j, 1 ≤ j → j < k → phaseCount j (qftAssembly m k) = k - j) ∧
    (∀ j, j = 0 ∨ k ≤ j → phaseCount j (qftAssembly m k) = 0) := by sorry

end QAlgorithms.Papers.Independent.Intakethird100.P39
Source
Quantum CISC Compilation by Optimal Control and Scalable Assembly of Complex Instruction Sets beyond Two-Qubit Gates, arXiv:0712.3227v2, PDF p. 9, Abstract headline pinned to exact scalable QFT assembly, Fig. 7
Read-back

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

For all natural numbers m,km,km,k satisfying m≥2m\ge2m≥2 and k≥2k\ge2k≥2, form a list CCC by concatenating, for t=0,…,k−1t=0,\ldots,k-1t=0,…,k−1 in increasing order, phase-swap records (sm,m,s+1)(sm,m,s+1)(sm,m,s+1) for s=t−1,…,0s=t-1,\ldots,0s=t−1,…,0 in decreasing order, followed by a Fourier record (0,m)(0,m)(0,m); a phase-swap record lists its offset, half-width, and phase index, and a Fourier record lists its offset and width. For a bit string xxx of length rrr, let v(x)=∑a=0r−1xa2r−1−av(x)=\sum_{a=0}^{r-1}x_a2^{r-1-a}v(x)=∑a=0r−1​xa​2r−1−a, with bits interpreted as 000 or 111. On a local width-mmm block, the Fourier matrix has entry exp⁡(2πi v(y)v(x)/2m)/2m\exp(2\pi\mathrm{i}\,v(y)v(x)/2^m)/\sqrt{2^m}exp(2πiv(y)v(x)/2m)/2m​. A phase-swap record with half-width mmm and phase index ppp has, for input halves (a,b)(a,b)(a,b), its only nonzero entry at output (b,a)(b,a)(b,a), equal to exp⁡(2πi v(a)v(b)/2(p+1)m)\exp(2\pi\mathrm{i}\,v(a)v(b)/2^{(p+1)m})exp(2πiv(a)v(b)/2(p+1)m). Each local matrix acts at its stated offset and leaves the other bits unchanged. The theorem asserts the conjunction of the following facts: the reverse-ordered product of the matrices of CCC, acting on kmkmkm bits, has entries

Uy,x=exp⁡(2πi v(y)v(x)/2km)2km;U_{y,x}=\frac{\exp(2\pi\mathrm{i}\,v(y)v(x)/2^{km})}{\sqrt{2^{km}}};Uy,x​=2km​exp(2πiv(y)v(x)/2km)​;

the list contains exactly kkk Fourier records and exactly (k2)\binom{k}{2}(2k​) phase-swap records; for every natural number jjj with 1≤j<k1\le j<k1≤j<k, exactly k−jk-jk−j phase-swap records have phase index jjj; and for every natural number jjj satisfying j=0j=0j=0 or k≤jk\le jk≤j, no phase-swap record has phase index jjj. Here k−jk-jk−j is natural-number subtraction, and its stated range ensures no truncation.

Human review
  • Endorsed by Shuze Chen · Nov 1, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Nov 1, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me