Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Nearest-neighbour parity gates without the determinant constraint are efficiently universal

Open
QAlgorithms.Papers.Independent.Intakethird100.P77.unequalDeterminants_encodedUniversality

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

prove2quantum

Consider the same effective nearest-neighbour controlled-ZZZ/one-qubit source presentation with a first-wire output. If a parity-preserving gate may use arbitrary unitary even and odd blocks, without requiring their determinants to agree, there is an absolute C>0C>0C>0 and an effective target family on four wires per logical wire satisfying

∣Gs∣≤C∣Cs∣,range⁡(Gs)≤1,pb(Gs,E4ψ,1)=pb(Cs,ψ,1).|G_s|\le C|C_s|,\qquad \operatorname{range}(G_s)\le1,\qquad p_b(G_s,E_4\psi,1)=p_b(C_s,\psi,1).∣Gs​∣≤C∣Cs​∣,range(Gs​)≤1,pb​(Gs​,E4​ψ,1)=pb​(Cs​,ψ,1).

The encoder E4E_4E4​ sends logical basis states to 000000000000 and 100110011001 and is extended linearly; the equality holds for every normalized logical input ψ\psiψ and either outcome bbb. All blocks remain unitary. This specifies the encoded input/output meaning of efficient universality after dropping the determinant constraint.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intakethird100_P77
Formal statement
noncomputable section

namespace QAlgorithms.Papers.Independent.Intakethird100.P77

open QAlgorithms

open QAlgorithms.Complexity (Str)

open QAlgorithms.Papers.Independent.Advance50.P19 (Major CARSystem)

open QAlgorithms.Papers.Independent.Information100.P32 (Op)

open scoped BigOperators Matrix ComplexConjugate

attribute [local instance] Classical.propDecidable Classical.decEq

/-- PDF p.4: dropping only det A=det B permits physical SWAP and gives a
uniform encoded nearest-neighbour simulation, preserving the first output
probability. A and B remain unitary. The source size convention is as in
Theorem 2, rather than arbitrary-connectivity routing at constant cost. -/
theorem unequalDeterminants_encodedUniversality :
    ∃ C : ℕ, 0 < C ∧ ∀ F : SourceFamily, F.Effective →
      (∀ s, 0 < F.width s) →
      ∃ G : (s : Str) → List (ParityApp (4 * F.width s)),
        (ParityFamily.mk (fun s => 4 * F.width s) G).Effective ∧
        (∀ s, RangeBound 1 (G s) ∧ (G s).length ≤ C * (F.gates s).length) ∧
        ∀ s (k : Fin (F.width s)), k.val = 0 →
          ∀ (q : Fin (4 * F.width s)), q.val = 0 →
            ∀ psi : EuclideanSpace ℂ (Qubits (F.width s)), IsState psi →
              ∀ b, singleWireProbability (parityCircuit (G s)).unitary
                  (encodeState encodeFourBits psi) q b =
                singleWireProbability (sourceCircuit (F.gates s)).unitary psi k b := by sorry

end QAlgorithms.Papers.Independent.Intakethird100.P77

end
Source
Matchgates and classical simulation of quantum circuits, arXiv:0804.4050v2, PDF p. 4, Section 2: nearest-neighbour parity-preserving gates without determinant constraint are universal
Read-back

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

There exists a positive natural number CCC such that, for every effective source family FFF having positive width nsn_sns​ at every finite Boolean string sss, there is a family of ordered gate lists GsG_sGs​ on 4ns4n_s4ns​ wires with the following properties. A source gate is either an arbitrary one-qubit unitary on a specified wire or controlled-ZZZ on specified wires i,ji,ji,j satisfying i+1=ji+1=ji+1=j. To specify effectiveness, let u(r)u(r)u(r) be the string of rrr true bits and let τ([v1,…,vℓ])\tau([v_1,\ldots,v_\ell])τ([v1​,…,vℓ​]) concatenate u(∣vj∣)u(|v_j|)u(∣vj​∣), one false bit, and vjv_jvj​ for each jjj. The source family’s code is τ([u(ns),u(Ls)]+ ⁣ ⁣+gate descriptions)\tau([u(n_s),u(L_s)]\mathbin{+\!\!+}\text{gate descriptions})τ([u(ns​),u(Ls​)]++gate descriptions), using τ([[false],u(i)])\tau([[{\rm false}],u(i)])τ([[false],u(i)]) for a one-qubit gate and τ([[true],u(i),u(j)])\tau([[{\rm true}],u(i),u(j)])τ([[true],u(i),u(j)]) for controlled-ZZZ; this code must be polynomial-time computable from sss. Its numerical list consists of the entries (00,01,10,11)(00,01,10,11)(00,01,10,11) of each one-qubit matrix in gate order. There must also be a polynomial-time function which, on τ([s,u(j),u(r),[b]])\tau([s,u(j),u(r),[b]])τ([s,u(j),u(r),[b]]), approximates the real part of numerical entry jjj if bbb is false and its imaginary part if bbb is true, to absolute error at most 2−r2^{-r}2−r, for every valid jjj and every natural precision rrr; its output is interpreted as a signed binary integer divided by 2r2^r2r, with a true first bit indicating a negative sign and the tail encoding the magnitude, with missing bits read as false. Each target gate consists of two 2×22\times22×2 unitary matrices A,BA,BA,B and an injection selecting two distinct wires. Its local entry from yyy to xxx is zero if their two-bit parities differ, is Ax0,y0A_{x_0,y_0}Ax0​,y0​​ when both parities are even, and is Bx0,y0B_{x_0,y_0}Bx0​,y0​​ when both are odd. The target family has polynomial-time computable code τ([u(4ns),u(∣Gs∣)]+ ⁣ ⁣+[τ([u(ig),u(jg)])]g)\tau([u(4n_s),u(|G_s|)]\mathbin{+\!\!+}[\tau([u(i_g),u(j_g)])]_g)τ([u(4ns​),u(∣Gs​∣)]++[τ([u(ig​),u(jg​)])]g​) and polynomial-time approximable numerical data consisting of the four entries of AgA_gAg​ followed by the four entries of BgB_gBg​ in gate order, with the same approximation convention. For every sss, the two wires of each target gate have index difference at most 111, and ∣Gs∣≤CLs|G_s|\le C L_s∣Gs​∣≤CLs​. For every sss, source wire kkk of index 000, target wire qqq of index 000, unit vector ψ\psiψ on length-nsn_sns​ bit strings, and Boolean bbb,

∑z:zq=b∣(WsE4ψ)z∣2=∑x:xk=b∣(Vsψ)x∣2,E4ψ=∑xψx ∣x0 0 0 x0 x1 0 0 x1⋯ ⟩,\sum_{z:z_q=b}|(W_sE_4\psi)_z|^2 = \sum_{x:x_k=b}|(V_s\psi)_x|^2, \qquad E_4\psi=\sum_x\psi_x\,|x_0\,0\,0\,x_0\,x_1\,0\,0\,x_1\cdots\rangle,z:zq​=b∑​∣(Ws​E4​ψ)z​∣2=x:xk​=b∑​∣(Vs​ψ)x​∣2,E4​ψ=x∑​ψx​∣x0​00x0​x1​00x1​⋯⟩,

where Vs,WsV_s,W_sVs​,Ws​ apply their respective gate lists in listed order, with identity action on untouched wires. The quantifiers include the empty parameter string and empty source lists; an empty source list forces an empty target list through the length bound. The equality is required for the index-zero wires and every normalized input vector.

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