Alphabeta Math
TheoremStatement: Literature-sourcedProof: AI-adaptedPipeline-generated
How statement and proof provenance work

The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.

  • Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
  • AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
  • AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.

These labels describe origin, not correctness: citations and verification chips remain separate evidence.

Correctness of Gray-Path Two-Level Synthesis

Statement

The algorithm of Gray-Path Synthesis of a Two-Level Gate realizes the exact two-level unitary on the ordered selected pair (x,y) and fixes every other computational-basis vector. Write d for their Hamming distance and m=n−1. Before expansion there are 2(d−1) pattern-controlled swaps and one pattern-controlled target block.

Here are exact post-expansion counts for its literal circuits. A cost pair (c,q) counts CNOTs and arbitrary one-qubit gates, respectively; pairs are added componentwise and identity gate occurrences are retained. Define E1=(1,0),E2=(8,12),Es=(4s−8)(8,12)(s≥3), B1=(1,0),B2=(8,12),Br=2E⌈r/2⌉+2E⌊r/2⌋+1(r≥3). For a positive m-controlled one-qubit call the no-workspace cost is Q0=(0,1),Q1=(2,4),Qm=Qm−1+2Bm−1+(4,8)(m≥2), and the selected one-clean-bit cost is Km=2Bm+(2,4) for m≥1 (use K0=Q0 with no work bit). For each forward swap j, choose Sj∈{Qm,Km}, and for the middle block choose T∈{Qm,Km}. If zj and zV are the numbers of zero-valued controls in their patterns, the exact total pair is 2∑j=0d−2(Sj+(0,2zj))+T+(0,2zV). Its sum of coordinates is the exact elementary gate count. All-no-workspace selection uses n wires and O(dn2) gates; all-clean selection uses at most n+1 wires and O(dn) gates. For mixed selections one clean bit suffices and is reused sequentially, returned to zero after each call. When n=1, the circuit is one arbitrary one-qubit gate with cost (0,1) and no work bit.

Facts & Assumptions

Given: Distinct labels x,y, block V, and the path and literal expansion choices of Gray-Path Synthesis of a Two-Level Gate.

[F1]

Two-Level Unitary: the desired two-level operator applies V on the ordered pair (∣x⟩,∣y⟩) and is identity on its orthogonal complement.

[F2]

Big-endian encoding of ordered bit strings: a computational basis word is identified with its ordered bitstring, so individual wire values and bit flips determine the corresponding basis label.

[F3]

CNOT and Control-Target Order: a CNOT flips its target bit exactly when its named control bit is 1.

[F4]

Denotational semantics of a finite layered circuit: chronological circuit layers L1,…,Ld denote ULd⋯UL1.

[F5]

Finite circuit resource accounting: costs count declared gate occurrences under the explicit operation model.

[F6]

The computational basis is orthonormal: the ordered computational basis of the register is orthonormal.

[F7]

Multicontrolled Unitaries with and without a Clean Work Bit gives exact no-workspace O(m2) and one-clean-bit O(m) elementary constructions; each clean call returns its work bit to zero.

[F8]

Linear Multicontrolled X with One Borrowed Wire supplies an exact O(r) elementary implementation of Cr(X) with one borrowed wire, whose full operator is Cr(X)⊗I even on correlated inputs.

[F9]

Exact Controlled One-Qubit Unitary with Two CNOTs supplies an exact two-CNOT realization of each controlled one-qubit matrix with arbitrary one-qubit gates, retaining its scalar phase.

[F10]

Gray-Path Synthesis of a Two-Level Gate specifies the forward path swaps, the final controlled block with the ordered-block reversal when needed, their reversed adjoints, and the chosen literal expansions.

[F11]

One-Qubit Euler Decomposition gives the exact eiδRz(α)Ry(θ)Rz(β) decomposition and the displayed matrices for Rz and Ry.

Proof

1.1givenF1F2F3F6algebra

By [F2] and [F3], each path swap is an X controlled on the other bits' fixed values, so it exchanges exactly the two indicated basis labels and fixes every other basis vector. Each swap is a permutation of the orthonormal computational basis [F6], hence a unitary. Their chronological product P sends x=g0 to gd−1 and fixes y=gd, because the last path edge is deliberately omitted.

1.2F9F10F11algebra

For the algorithm's single-control list S, direct multiplication of the rotation matrices in [F11] gives ABC=I and AXBXC=e−iδW. Its two control branches therefore have target blocks I and e−iδW; the final phase gate makes them I,W exactly, as required by [F9]. The list in [F10] contains exactly two CNOTs and four one-qubit occurrences, even when one is the identity. For the fixed matrix J, the orthogonal projectors (I+X)/2 and (I−X)/2 give J2=X and unitarity. The list T(a,b;t) restores b and applies target exponent b−(b⊕a)+a=2ab of J, hence is exactly Toffoli. Its cost is 3(2,4)+(2,0)=(8,12).

2.1F10step 1.2algebrainduction

For the ladder L of [F10] with s≥3, each of its two compute/target/uncompute lists restores all spares, since the central H changes only the target. Let uj,vj be the values of aj just before H in the first and second lists. The common initial spare values give u1=a1⊕c1c2, v1=a1 and uj=aj⊕cj+1uj−1, vj=aj⊕cj+1vj−1 for j≥2. Induction yields uj⊕vj=∏h=1j+1ch, so the two target toggles sum to cs(us−2⊕vs−2)=∏h=1sch. Thus L is the exact controlled X and restores its arbitrary spares. Its lists contain 2s−3 and 2s−5 Toffolis, giving Es=(4s−8)(8,12); the CNOT and Toffoli base cases give E1,E2.

2.2step 1.1F1F4algebra

At the level of ideal data gates, let M be the middle operation and P the forward swap permutation. The middle gate acts only on (gd−1,gd); using XVX when the target bit of gd−1 is 1 makes its ordered action exactly V. By [F4], the data product is P∗MP. Since P sends (x,y) to (gd−1,gd) and no other basis vector into this active pair, the conjugate acts by V on (x,y) and fixes every other data basis vector. Thus the ideal data circuit is the exact two-level unitary, including its scalar phase.

3.1F6F8F10step 2.1algebra

For the balanced list D in [F10], put a=∏c∈Ac and b=∏c∈Bc. The ideal actions of F,G,F,G send z to z⊕a and back and toggle t by b(z⊕a)⊕bz=ab. Step 2.1 restores the temporary spares after each ladder, so this is valid even when the spares include the other call's controls or target. The inequalities q+1≥p−2 and p≥q−1 ensure enough spares. Two calls of each size have pair 2Ep+2Eq+1=Br; the one- and two-control cases have pairs B1,B2. Equality on every basis word extends by [F6] to the full operator Cr(X)⊗Iz, including entangled inputs, so these literal lists meet the borrowed-wire contract of [F8]. All spares are existing wires in each invocation of D.

4.1F10F12step 1.2step 3.1algebrainduction

For the no-workspace list N, [F12] gives the unitary square root Z prescribed in [F10]: each eigenvalue has modulus one, its half-angle scalar squares to it by the double-angle identities, and that scalar has modulus one. For at least two controls, put A0=∏c∈Ac. The two D(A;b;t) calls restore their borrowed data target exactly by step 3.1. Thus on a basis control branch the target exponent of Z in the five-call list is b−(b⊕A0)+A0=2A0b. Induction on the number of controls, with the one-control case of step 1.2 and the zero-control gate as bases, proves its exact Cm(W) action. No new wire is used. Its literal cost is Qm−1+2Bm−1+2(2,4), with Q1=(2,4) and Q0=(0,1); the recursion decreases the number of controls and terminates.

4.2F10step 1.2step 3.1algebra

In the clean branch, D(C;w;t) computes the controls' AND into w, restoring the borrowed data target by step 3.1. The list S(w,t;W) applies W precisely on that branch, and the reversed adjoint D list restores w=0 for every data input. Linearity extends this basis calculation to superposed or entangled data. This gives the exact clean-input data operation and pair 2Bm+(2,4)=Km for m≥1; with no controls the sole gate has pair K0=Q0. No claim about the other initial workspace sector is required.

5.1step 2.2step 4.1step 4.2F5F7F10algebra

There are d−1 swaps, their d−1 inverses, and one controlled-V call. Each zero-valued pattern control is implemented by an X before and after the positive-control call, adding exactly two one-qubit occurrences under [F5]. Steps 4.1–4.2 prove that these selected expansions implement the ideal data gates exactly and each clean-bit call returns its work bit to zero, in the model of [F7]. Sequential composition therefore permits reuse of that bit.

6.1step 1.1step 2.2step 4.1step 4.2step 5.1F7algebra

If d=1, the swap lists are empty and the single controlled target block acts on (x,y) directly. If n=1, there are no controls and the construction is one gate on the sole wire: its matrix is V when x=0,y=1, and XVX when x=1,y=0, so its action on the selected ordered pair is V in both cases. For the other cases, steps 4.1–4.2 supply the elementary expansions used in step 5.1 with the stated work-bit return, consistently with [F7]. Thus every case is an exact elementary implementation.

7.1step 5.1step 6.1step 3.1step 4.1step 4.2F5F7F10algebra∎

A zero control adds two one-qubit X gates, independently of the selected positive-control circuit. The reversed adjoint list has the same pair as its forward list. Adding all forward, reverse, and middle lists therefore gives the claimed total pair. Since Br=O(r), the recurrence sums to Qm=O(m2), whereas Km=O(m). There are 2d−1 calls, and at most m negative controls per call, giving the two claimed total bounds for n≥2. Sequential exact clean return permits reuse of one bit even on superposed data. The empty swap lists when d=1 and the direct ordered one-qubit block when n=1 give the stated boundary cases.

Depends on

Used by

Nothing in the library uses this result yet.

Dependency tree · two levels

48 results within two dependency steps of this one, each drawn at its shortest distance from it. An arrow runs from a result to what uses it, so the chart reads left to right and ends at this result, which carries a heavier outline. Every node is a link to that result. Click elsewhere on the chart to enlarge it.

Sources