Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Circuit simulation: controlled-phase gates update graph weights exactly

Open
QAlgorithms.Papers.Independent.Intakethird100.P57.exact_phase_gate_update

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

prove2quantum

Let N,D≥1N,D\ge1N,D≥1, let A,ΦA,\PhiA,Φ be admissible data, take final rotations V=IV=IV=I, and let j≠kj\ne kj=k. For any real angle θ\thetaθ, update the two symmetric entries of the selected edge to (Φjk+θ) mod 2π∈[0,2π)(\Phi_{jk}+\theta)\bmod 2\pi\in[0,2\pi)(Φjk​+θ)mod2π∈[0,2π), leaving every other entry fixed. The resulting graph Φ′\Phi'Φ′ is admissible and

R(A,Φ′,I)=Ujk(θ)R(A,Φ,I).R(A,\Phi',I)=U_{jk}(\theta)R(A,\Phi,I).R(A,Φ′,I)=Ujk​(θ)R(A,Φ,I).

If the raw MPS is nonzero, normalization gives the same equality for unit vectors. Negative input angles are allowed. The gate acts once on the unordered pair; the simple rule applies in the stated V=IV=IV=I setting.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intakethird100_P57
Formal statement
noncomputable section

open scoped ComplexConjugate Matrix

namespace QAlgorithms.Papers.Independent.Intakethird100.P57

attribute [local instance] Classical.propDecidable

/-- PDF pp.3–4, circuit update: with V=I, phase gates are exact graph-weight updates.
The same equality is asserted for normalized states only when the raw MPS is nonzero. -/
theorem exact_phase_gate_update {N D : ℕ} (hN : 1 ≤ N) (hD : 1 ≤ D)
    (A : Tensors N D) (G : PhaseGraph N) (j k : Fin N) (hjk : j ≠ k) (theta : ℝ) :
    ∃ Gnew : PhaseGraph N, Gnew.weight = updatedWeights G j k theta ∧
      rage A Gnew (fun _ => 1) = controlledPhaseAction j k (Complex.exp (Complex.I * (theta : ℂ)))
        (rage A G (fun _ => 1)) ∧
      (traceMPS A ≠ 0 → IsState (normalizeRageVector (rage A Gnew (fun _ => 1))) ∧
        normalizeRageVector (rage A Gnew (fun _ => 1)) =
          controlledPhaseAction j k (Complex.exp (Complex.I * (theta : ℂ)))
            (normalizeRageVector (rage A G (fun _ => 1)))) := by sorry

end QAlgorithms.Papers.Independent.Intakethird100.P57

end
Source
Renormalization algorithm with graph enhancement, arXiv:0802.1211v1, PDF p. 3, Circuit simulation: controlled-phase gates update graph weights exactly
Read-back

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

For every pair of natural numbers N,DN,DN,D with 1≤N1\le N1≤N and 1≤D1\le D1≤D, every collection of complex D×DD\times DD×D matrices ArsA_r^sArs​, every graph GGG with real weights wrs=wsrw_{rs}=w_{sr}wrs​=wsr​, wrr=0w_{rr}=0wrr​=0, and 0≤wrs<2π0\le w_{rs}<2\pi0≤wrs​<2π, every pair of distinct sites j,k<Nj,k<Nj,k<N, and every real θ\thetaθ, there exists a graph GnewG_{\mathrm{new}}Gnew​ satisfying the same symmetry, zero-diagonal, nonnegativity, and strict 2π2\pi2π bounds, whose weights are

wab′={wjk+θ−2π⌊wjk+θ2π⌋,(a,b)=(j,k) or (a,b)=(k,j),wab,otherwise.w'_{ab}= \begin{cases} w_{jk}+\theta-2\pi\left\lfloor\dfrac{w_{jk}+\theta}{2\pi}\right\rfloor, &(a,b)=(j,k)\text{ or }(a,b)=(k,j),\\[4pt] w_{ab},&\text{otherwise}. \end{cases}wab′​=⎩⎨⎧​wjk​+θ−2π⌊2πwjk​+θ​⌋,wab​,​(a,b)=(j,k) or (a,b)=(k,j),otherwise.​

To state the remaining conclusions, define T(b)=tr⁡(∏r=0N−1Arbr)T(b)=\operatorname{tr}(\prod_{r=0}^{N-1}A_r^{b_r})T(b)=tr(∏r=0N−1​Arbr​​), using increasing site order, and vG(b)=ei∑r<s, br=bs=1wrsT(b)v_G(b)=e^{i\sum_{r<s,\ b_r=b_s=1}w_{rs}}T(b)vG​(b)=ei∑r<s, br​=bs​=1​wrs​T(b); this is the vector obtained using identity single-site rotations. Let CθC_\thetaCθ​ multiply an amplitude by eiθe^{i\theta}eiθ when bj=bk=1b_j=b_k=1bj​=bk​=1, and by 111 otherwise, and define n(v)=∥v∥−1vn(v)=\|v\|^{-1}vn(v)=∥v∥−1v, with n(0)=0n(0)=0n(0)=0. The graph can be chosen so that

vGnew=CθvG,T≠0 ⟹ (∥n(vGnew)∥=1  and  n(vGnew)=Cθn(vG)).v_{G_{\mathrm{new}}}=C_\theta v_G, \qquad T\ne0\ \Longrightarrow\ \left(\|n(v_{G_{\mathrm{new}}})\|=1 \ \text{ and }\ n(v_{G_{\mathrm{new}}})=C_\theta n(v_G)\right).vGnew​​=Cθ​vG​,T=0 ⟹ (∥n(vGnew​​)∥=1  and  n(vGnew​​)=Cθ​n(vG​)).

The nonzero condition is required only for the conditional conclusion, not for existence of the graph or the unnormalized equality. When N=1N=1N=1, the required distinct sites cannot be supplied.

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