Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Heralded exact universal processing with 2m program qubits

Open
QAlgorithms.Papers.Independent.Extend50.P43.probabilistic_universal_array

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

prove2quantum

Fix m≥1m\geq1m≥1. Let AAA be the mmm-qubit data register and split the 2m2m2m program qubits into B,CB,CB,C. For every unitary UUU on mmm qubits, supply the explicitly constructed normalized program

PU=(IB⊗UC)Φm,Φm=2−m/2∑x∈{0,1}m∣x⟩B∣x⟩C.P_U=(I_B\otimes U_C)\Phi_m,\qquad \Phi_m=2^{-m/2}\sum_{x\in\{0,1\}^m}|x\rangle_B|x\rangle_C.PU​=(IB​⊗UC​)Φm​,Φm​=2−m/2x∈{0,1}m∑​∣x⟩B​∣x⟩C​.

The fixed processor measures each ordered pair (Ai,Bi)(A_i,B_i)(Ai​,Bi​) in the Bell basis. Write KoψK_o\psiKo​ψ for the unnormalized remaining CCC vector obtained by contraction with the product Bell bra for outcome ooo, and set po(ψ)=∥Koψ∥2p_o(\psi)=\|K_o\psi\|^2po​(ψ)=∥Ko​ψ∥2. The outcomes form a complete measurement, so ∑opo(ψ)=1\sum_o p_o(\psi)=1∑o​po​(ψ)=1 for every normalized full input ψ\psiψ. For every normalized data vector ddd, the designated outcome o+o_+o+​ in which all pairs give Φ+\Phi^+Φ+ satisfies

Ko+(d⊗PU)=2−mUd,po+(d⊗PU)=2−2m,Ko+(d⊗PU)po+(d⊗PU)=Ud.K_{o_+}(d\otimes P_U)=2^{-m}Ud,\qquad p_{o_+}(d\otimes P_U)=2^{-2m},\qquad \frac{K_{o_+}(d\otimes P_U)}{\sqrt{p_{o_+}(d\otimes P_U)}}=Ud.Ko+​​(d⊗PU​)=2−mUd,po+​​(d⊗PU​)=2−2m,po+​​(d⊗PU​)​Ko+​​(d⊗PU​)​=Ud.

Thus the measured flag certifies exact output for every U,dU,dU,d with the same positive probability. Register CCC is designated as the output, as the source permits; no assertion is made about accidental agreement on failure outcomes.

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

open scoped ComplexConjugate

noncomputable section

/-- PDF pp.2–3, Eq.(11) and the all-Phi-plus construction: one fixed complete
Bell measurement implements every U with its explicit normalized 2m-qubit
program. Success amplitude is exactly 2^(-m) U d, probability is 2^(-2m),
and conditional C output is exactly U d. C is the allowed output location.
No claim is made that failure labels cannot accidentally give the same ray. -/
theorem probabilistic_universal_array (m : ℕ) (hm : 1 ≤ m) :
    (∀ psi : EuclideanSpace ℂ (Qubits m × (Qubits m × Qubits m)),
      IsState psi → ∑ o : Fin m → Fin 4, bellOutcomeProbability o psi = 1) ∧
    ∀ U : Matrix (Qubits m) (Qubits m) ℂ,
      U ∈ Matrix.unitaryGroup (Qubits m) ℂ →
      IsState (program U) ∧
      ∀ d : EuclideanSpace ℂ (Qubits m), IsState d →
        contractBellOutcome (successOutcome m) (tensorVec d (program U)) =
            ((2 : ℂ) ^ m)⁻¹ • act U d ∧
        bellOutcomeProbability (successOutcome m) (tensorVec d (program U)) =
            ((2 : ℝ) ^ (2 * m))⁻¹ ∧
        normalizedBellOutput (successOutcome m) (tensorVec d (program U)) =
            act U d := by sorry

end

end QAlgorithms.Papers.Independent.Extend50.P43
Source
Programmable quantum gate arrays, arXiv:quant-ph/9703032v1, PDF p. 3, Unnumbered main construction: heralded exact universal processor with 2m program qubits
Read-back

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

For every natural number m≥1m\ge 1m≥1, let Bm={0,1}mB_m=\{0,1\}^mBm​={0,1}m, identifying false with 000 and true with 111, and equip complex vectors indexed by these finite sets with the Euclidean norm. For r∈{0,1,2,3}r\in\{0,1,2,3\}r∈{0,1,2,3} and bits a,ba,ba,b, define the amplitudes

βr(a,b)=12(−1)(r mod 2)a1{a⊕b=⌊r/2⌋},\beta_r(a,b)=\frac{1}{\sqrt2}(-1)^{(r\bmod 2)a}\mathbf1_{\{a\oplus b=\lfloor r/2\rfloor\}},βr​(a,b)=2​1​(−1)(rmod2)a1{a⊕b=⌊r/2⌋}​,

where ⊕\oplus⊕ is addition modulo 222 and 1\mathbf11 denotes an indicator. For an outcome assignment o:{0,…,m−1}→{0,1,2,3}o:\{0,\ldots,m-1\}\to\{0,1,2,3\}o:{0,…,m−1}→{0,1,2,3}, put Bo(a,b)=∏i=0m−1βo(i)(ai,bi)B_o(a,b)=\prod_{i=0}^{m-1}\beta_{o(i)}(a_i,b_i)Bo​(a,b)=∏i=0m−1​βo(i)​(ai​,bi​), and for a vector ψ\psiψ indexed by Bm×(Bm×Bm)B_m\times(B_m\times B_m)Bm​×(Bm​×Bm​), define the vector CoψC_o\psiCo​ψ by

(Coψ)(c)=∑a,b∈BmBo(a,b)‾ ψ(a,(b,c)).(C_o\psi)(c)=\sum_{a,b\in B_m}\overline{B_o(a,b)}\,\psi(a,(b,c)).(Co​ψ)(c)=a,b∈Bm​∑​Bo​(a,b)​ψ(a,(b,c)).

The assertion is that every such ψ\psiψ with ∥ψ∥=1\|\psi\|=1∥ψ∥=1 satisfies ∑o∥Coψ∥2=1\sum_o\|C_o\psi\|^2=1∑o​∥Co​ψ∥2=1; and that, for every unitary complex matrix UUU indexed by Bm×BmB_m\times B_mBm​×Bm​, the vector PU(b,c)=Uc,b/2mP_U(b,c)=U_{c,b}/\sqrt{2^m}PU​(b,c)=Uc,b​/2m​ has norm 111, and every vector ddd indexed by BmB_mBm​ with ∥d∥=1\|d\|=1∥d∥=1 satisfies, for Ψ(a,(b,c))=d(a)PU(b,c)\Psi(a,(b,c))=d(a)P_U(b,c)Ψ(a,(b,c))=d(a)PU​(b,c) and the assignment o0(i)=0o_0(i)=0o0​(i)=0,

Co0Ψ=2−mUd,∥Co0Ψ∥2=2−2m,(∥Co0Ψ∥2)−1Co0Ψ=Ud,C_{o_0}\Psi=2^{-m}Ud,\qquad \|C_{o_0}\Psi\|^2=2^{-2m},\qquad \bigl(\sqrt{\|C_{o_0}\Psi\|^2}\bigr)^{-1}C_{o_0}\Psi=Ud,Co0​​Ψ=2−mUd,∥Co0​​Ψ∥2=2−2m,(∥Co0​​Ψ∥2​)−1Co0​​Ψ=Ud,

where (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).

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