Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The specified seven-qubit circuit has the exact output vector

Proved
QAlgorithms.Papers.Independent.Support50.P24.specifiedCircuitOutput

by Goku · Oct 23, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

For U∈SU(2)U\in\mathrm{SU}(2)U∈SU(2) let fU=V(2)U2V(1)U2f_U=V^{(2)}U_2V^{(1)}U_2fU​=V(2)U2​V(1)U2​, with the fixed known gates defined by Figs. S2 and S3, including the displayed padding and wire swaps. The physical seven-qubit circuit fU2f_U^2fU2​ has exactly four forward calls. For every vector ∣ϕ⟩∈C2|\phi\rangle\in\mathbb C^2∣ϕ⟩∈C2,

fU2(∣ϕ⟩1⊗∣ψ−⟩23⊗∣04⟩4⋯7)=−∣ψU⟩12⊗(U†∣ϕ⟩)3⊗∣04⟩4⋯7,f_U^2\bigl(|\phi\rangle_1\otimes|\psi^-\rangle_{23}\otimes|0^4\rangle_{4\cdots7}\bigr) =-|\psi_U\rangle_{12}\otimes(U^\dagger|\phi\rangle)_3\otimes|0^4\rangle_{4\cdots7},fU2​(∣ϕ⟩1​⊗∣ψ−⟩23​⊗∣04⟩4⋯7​)=−∣ψU​⟩12​⊗(U†∣ϕ⟩)3​⊗∣04⟩4⋯7​,

where ∣ψU⟩=(U⊗I)∣ψ−⟩|\psi_U\rangle=(U\otimes I)|\psi^-\rangle∣ψU​⟩=(U⊗I)∣ψ−⟩ and ∣ψ−⟩=(∣01⟩−∣10⟩)/2|\psi^-\rangle=(|01\rangle-|10\rangle)/\sqrt2∣ψ−⟩=(∣01⟩−∣10⟩)/2​. Physical inputs have ∥ϕ∥=1\|\phi\|=1∥ϕ∥=1; the displayed identity extends linearly to all vectors as in (S21). This pins the global minus sign and the complete auxiliary output for the actual specified circuit.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Support50_P24
Formal statement
noncomputable section

open QAlgorithms MeasureTheory

open scoped BigOperators Matrix ComplexConjugate ComplexOrder Matrix.Norms.Elementwise

namespace QAlgorithms.Papers.Independent.Support50.P24

attribute [local instance] Classical.decEq Classical.propDecidable

attribute [local instance] QAlgorithms.Papers.Independent.Support50.P24.groupedContinuousENorm

/-- PDF pp.7-10, Theorem S1 and S21: the specified seven-qubit circuit has the
literal minus sign for SU(2), output on wire 3, catalyst on wires 1,2 and clean zeros.
The identity extends linearly to every vector phi, including zero. -/
theorem specifiedCircuitOutput :
    PhysicalCalls fourCircuit ∧ calls fourCircuit = 4 ∧
    ∀ (U : QubitSU) (phi : Bool → ℂ),
      (evaluateCalls fourCircuit U).mulVec (inputEmbedding.mulVec phi) =
        -((outputEmbedding U * U.valᴴ).mulVec phi) := by sorry

end QAlgorithms.Papers.Independent.Support50.P24

end
Source
Reversing Unknown Qubit-Unitary Operation, Deterministically and Exactly, arXiv:2209.02907v5, PDF p. 7, Theorem S1: the full output vector of the specified seven-qubit circuit
Read-back

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

On seven qubits numbered 0,…,60,\ldots,60,…,6, let X=(0110)X=\begin{pmatrix}0&1\\1&0\end{pmatrix}X=(01​10​), Yα=(cos⁡(α/2)−sin⁡(α/2)sin⁡(α/2)cos⁡(α/2))Y_\alpha=\begin{pmatrix}\cos(\alpha/2)&-\sin(\alpha/2)\\ \sin(\alpha/2)&\cos(\alpha/2)\end{pmatrix}Yα​=(cos(α/2)sin(α/2)​−sin(α/2)cos(α/2)​), and let G(L;t;M)G(L;t;M)G(L;t;M) act by MMM on wire ttt if all input wire–value conditions in LLL hold, otherwise by the identity, leaving the remaining bits unchanged. Let S(L;a,b)S(L;a,b)S(L;a,b) swap wires a,ba,ba,b if these conditions hold and otherwise leave the input unchanged. An empty control list always holds. The matrix of a chronological list [M1,…,Mr][M_1,\ldots,M_r][M1​,…,Mr​] is Mr⋯M1M_r\cdots M_1Mr​⋯M1​. Define, with ϑ=2arccos⁡2/3\vartheta=2\arccos\sqrt{2/3}ϑ=2arccos2/3​,

T2(a,b,c)=[G([(a,1),(b,1)];c;X),G([(b,1)];a;X),G([(c,0)];b;Yπ/2),G([(a,0),(c,0)];b;Yπ/2),G([(b,0)];a;X),S([];a,b),S([];b,c)],T3(a,b,c,e)=[G([(a,0)];c;X),G([(c,1),(e,1)];b;X),G([(e,1)];c;X),G([(b,1)];c;X),G([(b,0)];e;Yπ),G([(a,1),(b,0),(c,1)];e;Y−ϑ),G([(a,1),(b,1),(c,1)];e;Yϑ),G([(e,1)];a;X),G([];a;X),S([];b,c),G([];b;X),G([(a,1)];b;X),S([(a,1)];b,c),G([(a,1),(b,1)];c;X)],K1=[S([];2,5),T2(0,1,2),G([(0,1)];6;X),T3(3,4,5,6)†,S([];3,6),S([];1,3)],K2=[S([];1,3),T3(0,1,2,3),S([];4,6),G([(4,1)];3;X),S([];5,6),T2(4,5,6)†,S([];2,4),S([];1,5),S([];0,4)].\begin{aligned} T_2(a,b,c)={}&[ G([(a,1),(b,1)];c;X),G([(b,1)];a;X), G([(c,0)];b;Y_{\pi/2}),\\ & G([(a,0),(c,0)];b;Y_{\pi/2}), G([(b,0)];a;X),S([];a,b),S([];b,c)],\\ T_3(a,b,c,e)={}&[ G([(a,0)];c;X),G([(c,1),(e,1)];b;X), G([(e,1)];c;X),G([(b,1)];c;X),\\ & G([(b,0)];e;Y_\pi), G([(a,1),(b,0),(c,1)];e;Y_{-\vartheta}), G([(a,1),(b,1),(c,1)];e;Y_\vartheta),\\ & G([(e,1)];a;X),G([];a;X),S([];b,c),G([];b;X), G([(a,1)];b;X),S([(a,1)];b,c), G([(a,1),(b,1)];c;X)],\\ K_1={}&[S([];2,5),T_2(0,1,2),G([(0,1)];6;X), T_3(3,4,5,6)^\dagger,S([];3,6),S([];1,3)],\\ K_2={}&[S([];1,3),T_3(0,1,2,3),S([];4,6), G([(4,1)];3;X),S([];5,6),T_2(4,5,6)^\dagger, S([];2,4),S([];1,5),S([];0,4)]. \end{aligned}T2​(a,b,c)=T3​(a,b,c,e)=K1​=K2​=​[G([(a,1),(b,1)];c;X),G([(b,1)];a;X),G([(c,0)];b;Yπ/2​),G([(a,0),(c,0)];b;Yπ/2​),G([(b,0)];a;X),S([];a,b),S([];b,c)],[G([(a,0)];c;X),G([(c,1),(e,1)];b;X),G([(e,1)];c;X),G([(b,1)];c;X),G([(b,0)];e;Yπ​),G([(a,1),(b,0),(c,1)];e;Y−ϑ​),G([(a,1),(b,1),(c,1)];e;Yϑ​),G([(e,1)];a;X),G([];a;X),S([];b,c),G([];b;X),G([(a,1)];b;X),S([(a,1)];b,c),G([(a,1),(b,1)];c;X)],[S([];2,5),T2​(0,1,2),G([(0,1)];6;X),T3​(3,4,5,6)†,S([];3,6),S([];1,3)],[S([];1,3),T3​(0,1,2,3),S([];4,6),G([(4,1)];3;X),S([];5,6),T2​(4,5,6)†,S([];2,4),S([];1,5),S([];0,4)].​

Named lists used as operations denote their matrices. For any Boolean-indexed U∈SU(2)U\in\mathrm{SU}(2)U∈SU(2), put Qj(U)=G([];j;U)Q_j(U)=G([];j;U)Qj​(U)=G([];j;U) and let EUE_UEU​ be the matrix of

[Q1(U),K1,Q1(U),K2,Q1(U),K1,Q1(U),K2].[Q_1(U),K_1,Q_1(U),K_2,Q_1(U),K_1,Q_1(U),K_2].[Q1​(U),K1​,Q1​(U),K2​,Q1​(U),K1​,Q1​(U),K2​].

The assertion is that the fixed matrices K1,K2K_1,K_2K1​,K2​ occurring in this list are unitary, it contains exactly four calls to UUU, and, for every such UUU and every vector ϕ:{0,1}→C\phi:\{0,1\}\to\mathbb Cϕ:{0,1}→C,

EU(∣ϕ⟩0⊗∣s⟩1,2⊗∣0000⟩3,4,5,6)=−∣χU⟩0,1⊗(U†∣ϕ⟩)2⊗∣0000⟩3,4,5,6,∣s⟩=∣01⟩−∣10⟩2,∣χU⟩=(U⊗I)∣s⟩.E_U\bigl(|\phi\rangle_0\otimes|s\rangle_{1,2} \otimes|0000\rangle_{3,4,5,6}\bigr) = -|\chi_U\rangle_{0,1}\otimes (U^\dagger|\phi\rangle)_2\otimes|0000\rangle_{3,4,5,6}, \qquad |s\rangle=\frac{|01\rangle-|10\rangle}{\sqrt2}, \quad |\chi_U\rangle=(U\otimes I)|s\rangle.EU​(∣ϕ⟩0​⊗∣s⟩1,2​⊗∣0000⟩3,4,5,6​)=−∣χU​⟩0,1​⊗(U†∣ϕ⟩)2​⊗∣0000⟩3,4,5,6​,∣s⟩=2​∣01⟩−∣10⟩​,∣χU​⟩=(U⊗I)∣s⟩.

The minus sign is part of the vector equality, and ϕ\phiϕ need not be normalized and may be zero.

Human review
  • Endorsed by Shuze Chen · Oct 24, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Goku · Oct 24, 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