Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Nearest-neighbour PQP matchgate languages lie in deterministic P

Open
QAlgorithms.Papers.Independent.Intakethird100.P77.nearestPQP_inP

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

prove2quantum

Let Vn.n.\mathcal V_{\mathrm{n.n.}}Vn.n.​ consist of languages recognized by effectively uniform nearest-neighbour matchgate circuits on computational-basis inputs and zero workspace, with a single designated output. Require symmetric majority gaps of inverse-exponential size: one polynomial qqq is selected before all inputs, with q(n)≥2q(n)\ge2q(n)≥2, and acceptance is at least 1/2+2−q(∣x∣)1/2+2^{-q(|x|)}1/2+2−q(∣x∣) on members and at most 1/2−2−q(∣x∣)1/2-2^{-q(|x|)}1/2−2−q(∣x∣) on nonmembers. Then

Vn.n.⊆P.\mathcal V_{\mathrm{n.n.}}\subseteq\mathrm P.Vn.n.​⊆P.

The polynomial exponent makes the source polynomial-padding convention explicit and keeps the condition meaningful at input length zero. The classical characteristic-function machine has worst-case polynomial runtime. This conclusion uses polynomially many strong-simulation accuracy digits to resolve the exponentially small gap.

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.16: nearest-neighbour PQP matchgate languages lie in P. Polynomially
many precision digits suffice for the explicitly padded inverse-exponential
gap; no constant bounded-error gap is substituted. Printed: gap 2^(-n).
Changed: one polynomially padded exponent >=2, chosen before all inputs.
Why: the literal zero-length gap is impossible, and the source's simulation
argument only needs polynomially many precision digits. -/
theorem nearestPQP_inP :
    {L : Set Str | InPQPMatchgate 1 L} ⊆ {L : Set Str | InP L} := by sorry

end QAlgorithms.Papers.Independent.Intakethird100.P77

end
Source
Matchgates and classical simulation of quantum circuits, arXiv:0804.4050v2, PDF p. 16, Section 7: nearest-neighbour PQP matchgate languages lie in P
Read-back

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

For every language LLL of finite Boolean strings, suppose there exists a family of widths w(s)w(s)w(s), finite gate lists, and output wires o(n)<w(true n)o(n)<w(\mathrm{true}^{\,n})o(n)<w(truen), with n≤w(true n)n\le w(\mathrm{true}^{\,n})n≤w(truen) for every n∈Nn\in\mathbb Nn∈N, together with a polynomial ppp with natural-number coefficients satisfying p(n)≥2p(n)\ge2p(n)≥2 for every nnn. Every gate has unitary Boolean-indexed complex 2×22\times22×2 matrices Ag,BgA_g,B_gAg​,Bg​ and an injective ordered wire pair vgv_gvg​; at each unary string require det⁡Ag=det⁡Bg\det A_g=\det B_gdetAg​=detBg​ and ∣vg(0)−vg(1)∣≤1|v_g(0)-v_g(1)|\le1∣vg​(0)−vg​(1)∣≤1. Its local matrix uses AgA_gAg​ on even-parity rows and columns, BgB_gBg​ on odd-parity rows and columns, indexing each block by the first bit, and zero between different parities, while leaving all other wires unchanged. Put u(j)=true ju(j)=\mathrm{true}^{\,j}u(j)=truej and T([a1,…,ak])=∥j(u(∣aj∣) false aj)T([a_1,\ldots,a_k])=\big\Vert_j(u(|a_j|)\,\mathrm{false}\,a_j)T([a1​,…,ak​])=​j​(u(∣aj​∣)falseaj​). Assume polynomial-time computability of s↦T([u(w(s)),u(gate count)]+ ⁣ ⁣+[T([u(vg(0)),u(vg(1))]):g in order])s\mapsto T([u(w(s)),u(\text{gate count})]\mathbin{+\!\!+}[T([u(v_g(0)),u(v_g(1))]):g\text{ in order}])s↦T([u(w(s)),u(gate count)]++[T([u(vg​(0)),u(vg​(1))]):g in order]) and x↦u(o(∣x∣))x\mapsto u(o(|x|))x↦u(o(∣x∣)), and polynomial-time approximation of the complex gate data as follows: for every valid entry index jjj, precision m∈Nm\in\mathbb Nm∈N, and Boolean bbb, input T([s,u(j),u(m),[b]])T([s,u(j),u(m),[b]])T([s,u(j),u(m),[b]]) yields a number within 2−m2^{-m}2−m of the real part if b=falseb=\mathrm{false}b=false, or imaginary part if b=trueb=\mathrm{true}b=true. Entries are listed gate by gate, AgA_gAg​ before BgB_gBg​, each in order (0,0),(0,1),(1,0),(1,1)(0,0),(0,1),(1,0),(1,1)(0,0),(0,1),(1,0),(1,1); an output string denotes its binary tail divided by 2m2^m2m, negated when its first bit is true, with missing bits zero. Let UnU_nUn​ be the reverse-order product of the embedded gate list at true n\mathrm{true}^{\,n}truen, the empty product being the identity, and let axa_xax​ be xxx padded with false to that width. Suppose that, for every xxx, the quantity ∑z: zo(∣x∣)=true∣(U∣x∣)z,ax∣2\sum_{z:\,z_{o(|x|)}=\mathrm{true}}|(U_{|x|})_{z,a_x}|^2∑z:zo(∣x∣)​=true​∣(U∣x∣​)z,ax​​∣2 is at least 12+2−p(∣x∣)\frac12+2^{-p(|x|)}21​+2−p(∣x∣) when x∈Lx\in Lx∈L, and at most 12−2−p(∣x∣)\frac12-2^{-p(|x|)}21​−2−p(∣x∣) when x∉Lx\notin Lx∈/L. Then a polynomial-time Boolean-string function exists which returns exactly [true] on LLL and exactly [false] outside LLL. Polynomial time throughout means computability by a TM2 Turing machine with identity input and output encodings, and every input condition includes the empty string.

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