Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Circuit simulation: local coordinate updates for the overlap objective

Open
QAlgorithms.Papers.Independent.Intakethird100.P57.local_gate_variational_update

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

prove2quantum

Let N,D≥1N,D\ge1N,D≥1. Normalize a nonzero initial RAGE vector with V=IV=IV=I and apply a single-qubit unitary at site qqq, giving the unit target χ\chiχ. Fix admissible nonzero trial data with the same nonincident edges, and vary one trial site tensor pair. Let LLL be its physical-state map, G=L†LG=L^\dagger LG=L†L, and b=L†χb=L^\dagger\chib=L†χ. The normal equations

Gx=bGx=bGx=b

have a solution. Every solution gives the orthogonal projection LxLxLx of χ\chiχ onto range⁡L\operatorname{range}LrangeL. If Lx≠0Lx\ne0Lx=0, it maximizes ∣⟨Ly,χ⟩∣2/∥Ly∥2|\langle Ly,\chi\rangle|^2/\|Ly\|^2∣⟨Ly,χ⟩∣2/∥Ly∥2 over all nonzero trial vectors; if Lx=0Lx=0Lx=0, all such objectives equal zero. Singular GGG is allowed.

With the trial tensors fixed, varying one edge incident on qqq keeps the norm squared ZZZ constant and gives

O(z)=c0+2Re⁡(c1z)Z,∣z∣=1,\mathcal O(z)=\frac{c_0+2\operatorname{Re}(c_1z)}Z,\qquad |z|=1,O(z)=Zc0​+2Re(c1​z)​,∣z∣=1,

with coefficients explicitly obtained from the complementary edge components. A maximum on this circle is attained. These are coordinate optima in an alternating sweep, with all other edges frozen.

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 p.4, Eq.(5) and following paragraph: coordinate optima in an alternating sweep.
The singular normal equations and zero-projection case are retained. Nonincident edges are
frozen by edgeTrial. The statement makes no claim of global convergence of the sweep. -/
theorem local_gate_variational_update {N D : ℕ} (hN : 1 ≤ N) (hD : 1 ≤ D)
    (A Atr : Tensors N D) (G Gtr : PhaseGraph N) (hv : traceMPS A ≠ 0)
    (htrial : traceMPS Atr ≠ 0) (q : Fin N) (U : Matrix.unitaryGroup Bool ℂ)
    (hfixed : ∀ i j, i ≠ q → j ≠ q → Gtr.weight i j = G.weight i j) (k : Fin N) :
    let chi := act (localGate q U) (normalizeRageVector (rage A G (fun _ => 1)))
    let L := siteMap Atr Gtr (fun _ => 1) k
    let G := L.conjTranspose * L
    let b := L.conjTranspose.mulVec (WithLp.ofLp chi)
    (∃ x : SiteCoordinates D → ℂ, G.mulVec x = b) ∧
    (∀ x : SiteCoordinates D → ℂ, G.mulVec x = b →
      (∀ y : SiteCoordinates D → ℂ,
        inner ℂ (siteVector L y) (chi - siteVector L x) = 0) ∧
      (siteVector L x ≠ 0 → ∀ y : SiteCoordinates D → ℂ, siteVector L y ≠ 0 →
        overlapObjective (siteVector L y) chi ≤ overlapObjective (siteVector L x) chi) ∧
      (siteVector L x = 0 → ∀ y : SiteCoordinates D → ℂ, siteVector L y ≠ 0 →
        overlapObjective (siteVector L y) chi = 0)) ∧
    (∀ j : Fin N, j ≠ q →
      let c := overlapCoefficients Atr Gtr q j chi
      let Z := ‖traceMPS Atr‖ ^ 2
      (∀ z : ℂ, ‖z‖ = 1 →
        overlapObjective (edgeTrial Atr Gtr (fun _ => 1) q j z) chi =
          (c.1 + 2 * (c.2 * z).re) / Z) ∧
      (∃ z : ℂ, ‖z‖ = 1 ∧ ∀ w : ℂ, ‖w‖ = 1 →
        overlapObjective (edgeTrial Atr Gtr (fun _ => 1) q j w) chi ≤
          overlapObjective (edgeTrial Atr Gtr (fun _ => 1) q j z) chi)) := by sorry

end QAlgorithms.Papers.Independent.Intakethird100.P57

end
Source
Renormalization algorithm with graph enhancement, arXiv:0802.1211v1, PDF p. 4, Circuit simulation: local coordinate updates for the overlap objective
Read-back

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

For all natural numbers N,DN,DN,D with 1≤N1\le N1≤N and 1≤D1\le D1≤D, let ArsA_r^sArs​ and Atr,rsA_{\mathrm{tr},r}^sAtr,rs​ be two collections of complex D×DD\times DD×D matrices, and let G,GtrG,G_{\mathrm{tr}}G,Gtr​ be graphs whose respective real weights w,wtrw,w^{\mathrm{tr}}w,wtr are symmetric, vanish on the diagonal, and lie in [0,2π)[0,2\pi)[0,2π). Assume both vectors

T(b)=tr⁡ ⁣(∏r=0N−1Arbr),Ttr(b)=tr⁡ ⁣(∏r=0N−1Atr,rbr)T(b)=\operatorname{tr}\!\left(\prod_{r=0}^{N-1}A_r^{b_r}\right), \qquad T_{\mathrm{tr}}(b)=\operatorname{tr}\!\left(\prod_{r=0}^{N-1}A_{\mathrm{tr},r}^{b_r}\right)T(b)=tr(r=0∏N−1​Arbr​​),Ttr​(b)=tr(r=0∏N−1​Atr,rbr​​)

are nonzero, where products are in increasing site order. Choose sites q,k<Nq,k<Nq,k<N and a unitary complex 2×22\times22×2 matrix UUU, and assume wijtr=wijw^{\mathrm{tr}}_{ij}=w_{ij}wijtr​=wij​ whenever i≠qi\ne qi=q and j≠qj\ne qj=q. Define ΦG(b)=∑r<s, br=bs=1wrs\Phi_G(b)=\sum_{r<s,\ b_r=b_s=1}w_{rs}ΦG​(b)=∑r<s, br​=bs​=1​wrs​, and define Φtr\Phi_{\mathrm{tr}}Φtr​ using wtrw^{\mathrm{tr}}wtr. Let vG(b)=eiΦG(b)T(b)v_G(b)=e^{i\Phi_G(b)}T(b)vG​(b)=eiΦG​(b)T(b), and let χ\chiχ be obtained from vG/∥vG∥v_G/\|v_G\|vG​/∥vG​∥ by applying UUU at site qqq and the identity at all other sites; explicitly, χ(b)=∑s∈{0,1}U(bq,s)vG(b[q←s])/∥vG∥\chi(b)=\sum_{s\in\{0,1\}}U(b_q,s)v_G(b[q\leftarrow s])/\|v_G\|χ(b)=∑s∈{0,1}​U(bq​,s)vG​(b[q←s])/∥vG​∥. Index site coordinates by C={0,1}×{0,…,D−1}×{0,…,D−1}C=\{0,1\}\times\{0,\ldots,D-1\}\times\{0,\ldots,D-1\}C={0,1}×{0,…,D−1}×{0,…,D−1}. For e∈Ce\in Ce∈C, replace the trial tensor at site kkk by the matrices whose (i,ℓ)(i,\ell)(i,ℓ) entry for bit sss is 111 if (s,i,ℓ)=e(s,i,\ell)=e(s,i,ℓ)=e, and 000 otherwise, leaving all other trial tensors unchanged; call this collection Atr[e]A_{\mathrm{tr}}^{[e]}Atr[e]​. Define the matrix LLL, with rows indexed by bit strings and columns by CCC, by

Lb,e=eiΦtr(b)tr⁡ ⁣(∏r=0N−1(Atr[e])rbr),M=L†L,β=L†χ,L_{b,e}=e^{i\Phi_{\mathrm{tr}}(b)} \operatorname{tr}\!\left(\prod_{r=0}^{N-1}(A_{\mathrm{tr}}^{[e]})_r^{b_r}\right), \qquad M=L^\dagger L,\qquad \beta=L^\dagger\chi,Lb,e​=eiΦtr​(b)tr(r=0∏N−1​(Atr[e]​)rbr​​),M=L†L,β=L†χ,

and write F(ξ)=∣⟨ξ,χ⟩∣2/∥ξ∥2F(\xi)=|\langle\xi,\chi\rangle|^2/\|\xi\|^2F(ξ)=∣⟨ξ,χ⟩∣2/∥ξ∥2, taking F(0)=0F(0)=0F(0)=0. The theorem asserts that Mx=βMx=\betaMx=β has a solution x:C→Cx:C\to\mathbb Cx:C→C, and that every solution satisfies

∀y:C→C,⟨Ly,χ−Lx⟩=0,Lx≠0 ⟹ ∀y:C→C,Ly≠0 ⟹ F(Ly)≤F(Lx),Lx=0 ⟹ ∀y:C→C,Ly≠0 ⟹ F(Ly)=0.\begin{gathered} \forall y:C\to\mathbb C,\quad \langle Ly,\chi-Lx\rangle=0,\\ Lx\ne0\ \Longrightarrow\ \forall y:C\to\mathbb C,\quad Ly\ne0\ \Longrightarrow\ F(Ly)\le F(Lx),\\ Lx=0\ \Longrightarrow\ \forall y:C\to\mathbb C,\quad Ly\ne0\ \Longrightarrow\ F(Ly)=0. \end{gathered}∀y:C→C,⟨Ly,χ−Lx⟩=0,Lx=0 ⟹ ∀y:C→C,Ly=0 ⟹ F(Ly)≤F(Lx),Lx=0 ⟹ ∀y:C→C,Ly=0 ⟹ F(Ly)=0.​

It also asserts the following for every site j≠qj\ne qj=q: set

Bj(b)=eiΦtr(b)−iwqjtr1{bq=bj=1}Ttr(b),B_j(b)=e^{i\Phi_{\mathrm{tr}}(b)-iw^{\mathrm{tr}}_{qj}\mathbf1_{\{b_q=b_j=1\}}}T_{\mathrm{tr}}(b),Bj​(b)=eiΦtr​(b)−iwqjtr​1{bq​=bj​=1}​Ttr​(b),

let uju_juj​ be BjB_jBj​ restricted to strings whose selected bits are not both 111, extended by zero, and let vjv_jvj​ be its restriction to strings whose selected bits are both 111, extended by zero. With

aj=⟨uj,χ⟩,bj=⟨vj,χ⟩,c0,j=∣aj∣2+∣bj∣2,c1,j=ajbj‾,Z=∥Ttr∥2,a_j=\langle u_j,\chi\rangle,\quad b_j=\langle v_j,\chi\rangle,\quad c_{0,j}=|a_j|^2+|b_j|^2,\quad c_{1,j}=a_j\overline{b_j},\quad Z=\|T_{\mathrm{tr}}\|^2,aj​=⟨uj​,χ⟩,bj​=⟨vj​,χ⟩,c0,j​=∣aj​∣2+∣bj​∣2,c1,j​=aj​bj​​,Z=∥Ttr​∥2,

one has

∀z∈C,∣z∣=1 ⟹ F(uj+zvj)=c0,j+2Re⁡(c1,jz)Z,\forall z\in\mathbb C,\quad |z|=1\ \Longrightarrow\ F(u_j+zv_j)=\frac{c_{0,j}+2\operatorname{Re}(c_{1,j}z)}{Z},∀z∈C,∣z∣=1 ⟹ F(uj​+zvj​)=Zc0,j​+2Re(c1,j​z)​,

and there exists z∈Cz\in\mathbb Cz∈C with ∣z∣=1|z|=1∣z∣=1 such that F(uj+wvj)≤F(uj+zvj)F(u_j+wv_j)\le F(u_j+zv_j)F(uj​+wvj​)≤F(uj​+zvj​) for every w∈Cw\in\mathbb Cw∈C with ∣w∣=1|w|=1∣w∣=1. The site kkk need not differ from qqq; when N=1N=1N=1, the final assertions quantified over j≠qj\ne qj=q are vacuous.

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