Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Uniform linear size of the supplied-program processor

Open
QAlgorithms.Papers.Independent.Extend50.P43.linear_processor_cost

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

prove2quantum

Count a two-qubit Bell measurement with its four-valued readout as a fixed primitive operation, equivalently any fixed elementary realization at constant cost. For each m≥1m\geq1m≥1, let Cm\mathcal C_mCm​ be the fixed list measuring (A1,B1),…,(Am,Bm)(A_1,B_1),\ldots,(A_m,B_m)(A1​,B1​),…,(Am​,Bm​), with register CCC designated as output. Let s(Cm)s(\mathcal C_m)s(Cm​) be the actual list length. There is an absolute constant C0>0C_0>0C0​>0 such that, uniformly over mmm, every unitary UUU and every normalized data input ddd,

s(Cm)≤C0m,ρC,o+=2−2m∣Ud⟩⟨Ud∣,Tr⁡ρC,o+=2−2m.s(\mathcal C_m)\leq C_0m,\qquad \rho_{C,o_+}=2^{-2m}|Ud\rangle\langle Ud|,\qquad \operatorname{Tr}\rho_{C,o_+}=2^{-2m}.s(Cm​)≤C0​m,ρC,o+​​=2−2m∣Ud⟩⟨Ud∣,TrρC,o+​​=2−2m.

Here the input is dA⊗PUd_A\otimes P_UdA​⊗PU​ with the Eq.(11) supplied program; ρC,o+\rho_{C,o_+}ρC,o+​​ is the actual unnormalized output obtained by executing the listed Bell projectors and tracing out A,BA,BA,B. Readout is included. The bound excludes preparing PUP_UPU​ and repeating failed attempts, and expresses the source's linear cost without attributing an elementary-gate constant to it.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Extend50_P43
Formal statement
namespace QAlgorithms.Papers.Independent.Extend50.P43

open scoped ComplexConjugate

noncomputable section

/-- PDF p.3, linear gate-operation claim (construction on p.2): a universal
constant bounds the actual supplied-program processor size linearly in m.
Bell readout is counted as a fixed two-qubit primitive and C is the allowed
output register. The execution semantics retain the exact successful output
and probability. Program preparation and repetitions are outside this bound. -/
theorem linear_processor_cost :
    ∃ C : ℝ, 0 < C ∧ ∀ m : ℕ, 1 ≤ m →
      ((fixedProcessor m).length : ℝ) ≤ C * (m : ℝ) ∧
      ∀ U : Matrix (Qubits m) (Qubits m) ℂ,
        U ∈ Matrix.unitaryGroup (Qubits m) ℂ →
        ∀ d : EuclideanSpace ℂ (Qubits m), IsState d →
          processorOutputDensity (fixedProcessor m) (successOutcome m)
              (tensorVec d (program U)) =
            ((2 : ℂ) ^ (2 * m))⁻¹ • pureDensity (act U d) ∧
          (processorOutputDensity (fixedProcessor m) (successOutcome m)
              (tensorVec d (program U))).trace.re =
            ((2 : ℝ) ^ (2 * m))⁻¹ := by sorry

end

end QAlgorithms.Papers.Independent.Extend50.P43
Source
Programmable quantum gate arrays, arXiv:quant-ph/9703032v1, PDF p. 3, Unnumbered main resource bound: linear size of the supplied-program processor
Read-back

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

There exists a real constant C>0C>0C>0 such that, for every natural number m≥1m\ge1m≥1, the length of the list [0,1,…,m−1][0,1,\ldots,m-1][0,1,…,m−1], regarded as a real number, is at most CmCmCm; and, for every unitary complex matrix UUU indexed by Bm×BmB_m\times B_mBm​×Bm​, where Bm={0,1}mB_m=\{0,1\}^mBm​={0,1}m, and every complex vector ddd indexed by BmB_mBm​ with ∥d∥=1\|d\|=1∥d∥=1, the following output matrix satisfies the stated identities. Set

v0(a,(b,c))=d(a)Uc,b2m,v_0(a,(b,c))=d(a)\frac{U_{c,b}}{\sqrt{2^m}},v0​(a,(b,c))=d(a)2m​Uc,b​​,

and apply the positions i=0,…,m−1i=0,\ldots,m-1i=0,…,m−1 in increasing order using the update

vi+1(a,(b,c))=121{ai=bi}∑s∈{0,1}vi(a[i←s],(b[i←s],c)),v_{i+1}(a,(b,c)) =\frac12\mathbf1_{\{a_i=b_i\}} \sum_{s\in\{0,1\}}v_i\bigl(a[i\leftarrow s],(b[i\leftarrow s],c)\bigr),vi+1​(a,(b,c))=21​1{ai​=bi​}​s∈{0,1}∑​vi​(a[i←s],(b[i←s],c)),

where 1\mathbf11 denotes an indicator and brackets denote replacement of a bit. Define

ρc,c′=∑a,b∈Bmvm(a,(b,c)) vm(a,(b,c′))‾.\rho_{c,c'}=\sum_{a,b\in B_m}v_m(a,(b,c))\,\overline{v_m(a,(b,c'))}.ρc,c′​=a,b∈Bm​∑​vm​(a,(b,c))vm​(a,(b,c′))​.

Then, writing (Ud)(c)=∑t∈BmUc,td(t)(Ud)(c)=\sum_{t\in B_m}U_{c,t}d(t)(Ud)(c)=∑t∈Bm​​Uc,t​d(t),

ρc,c′=2−2m(Ud)(c) (Ud)(c′)‾for every c,c′∈Bm,Re⁡tr⁡ρ=2−2m.\rho_{c,c'}=2^{-2m}(Ud)(c)\,\overline{(Ud)(c')} \quad\text{for every }c,c'\in B_m, \qquad \operatorname{Re}\operatorname{tr}\rho=2^{-2m}.ρc,c′​=2−2m(Ud)(c)(Ud)(c′)​for every c,c′∈Bm​,Retrρ=2−2m.
Human review
  • Endorsed by Shuze Chen · Oct 29, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 29, 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