Alphabeta Math
Pipeline-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.

Quantum Fourier-Transform Circuits

1 · Prerequisites

2 · Summary

This page fixes the positive-sign cyclic QFT as the inverse of the negative-sign, unitary-normalized discrete Fourier transform. For binary registers it proves the product factorization, specifies the ordered Hadamard/controlled-phase circuit and final bit reversal, proves the three-CNOT SWAP identity, and counts ideal gates. It also proves that adding spectator wires preserves local gate operator norms, supplies a local cosine-series proof of 2<π/2, and uses these results to bound truncation and verify the finite example. Finite-alphabet synthesis is a separate conditional gate-count result under fixed-arity decomposition and Solovay–Kitaev interfaces; it makes no classical target-angle bit-time claim. The N=1 and cutoff-at-or-above-register-width cases are included. The exact circuit-denotation and generic resource-accounting suppliers are still required for the corresponding readiness claims.

3 · Logical flowchart

4 · Definitions, theorems and proofs

TheoremStatement: Literature-sourcedProof: AI-adaptedjudge pass (gpt-6-luna)Open item page →

Projective operator closeness bounds output distributions

Statement

Let H be a nonzero finite-dimensional complex inner-product space (Real and complex inner product spaces, with the inner product linear in the first argument) with a fixed orthonormal computational basis B (Orthogonal vectors and subspaces, orthogonal and orthonormal sets, and orthonormal bases), and let U,V:H→H be unitary operators, meaning invertible linear isometries (Linear isometries, and orthogonal or unitary operators on finite-dimensional inner product spaces). For a unit vector ψ, write Uψ=∑b∈Bαb∣b⟩ and Vψ=∑b∈Bβb∣b⟩, and define their output laws by pUψ(b)=∣αb∣2 and pVψ(b)=∣βb∣2. Unitarity and orthonormality make these finite probability laws (Finite probability spaces, outcome weights, events, and event probabilities). For laws p,q on B, define total variation by dTV(p,q):=12∑b∈B∣p(b)−q(b)∣. Define projective operator distance by dpr(U,V):=inf⁡∣λ∣=1∥U−λV∥, where ∥⋅∥ is the operator norm. If dpr(U,V)≤ε for ε≥0, then

dTV(pUψ,pVψ)≤ε.

The same bound therefore holds for every computational-basis output law of the two operators. The proof verifies directly that multiplying a vector by a unit scalar leaves these coordinate probabilities unchanged.

Facts & Assumptions

Given: A nonzero finite-dimensional complex inner-product space, an orthonormal computational basis B, unitary operators U,V, a unit input ψ, and ε≥0.

[F1]

A finite probability space is a finite outcome set with nonnegative weights summing to 1 (Finite probability spaces, outcome weights, events, and event probabilities).

[F2]

For finite real lists ak,bk, ∣∑kakbk∣≤(∑kak2)1/2(∑kbk2)1/2 (The Cauchy-Schwarz inequality for finite sums).

[F3]

If T has nonzero finite-dimensional domain, ∥T∥=max⁡∥v∥=1∥Tv∥ (The operator norm is zero on the zero domain and otherwise is max_{||v||=1} ||Tv||).

[F5]

Complex modulus is multiplicative and satisfies ∣z+w∣≤∣z∣+∣w∣ (Conjugation is an involutive real-field automorphism, zz‾=∣z∣2, and modulus is definite, multiplicative, and subadditive).

[F6]

In an orthonormal basis, the squared norm is the sum of squared coordinate moduli (Bessel's inequality for a finite orthonormal list and Parseval's identity for an orthonormal basis).

[F7]

The norm induced by an inner product satisfies ∥λv∥=∣λ∣ ∥v∥ (The induced length is a norm).

Proof

technique · direct

Given: The objects and hypotheses above.

1.1givenF1F2F4F5F6F7algebra

Fix any λ with ∣λ∣=1, and set α=Uψ and β=λVψ. By [F4], [F7] and ∣λ∣=1, both vectors have norm 1. Parseval [F6] makes their squared coordinate moduli nonnegative weights summing to 1, so [F1] gives the output probability laws. For each b∈B, [F5] applied to αb=(αb−βb)+βb and then to the reversed pair gives ∣∣αb∣−∣βb∣∣≤∣αb−βb∣. Factoring a difference of squares and applying [F2] gives dTV(pUψ,pλVψ)≤12∥α−β∥2(∑b(∣αb∣+∣βb∣)2)1/2. Expanding the last squared sum and applying [F2] to the two nonnegative coordinate lists bounds its square root by ∥α∥2+∥β∥2=2, so the total variation is at most ∥α−β∥2.

2.1givenF3F5step 1.1

If γb is the b-th coordinate of Vψ, then βb=λγb and ∣βb∣2=∣λ∣2∣γb∣2=∣γb∣2 by modulus multiplicativity in [F5]. Hence pλVψ=pVψ. Also ∥α−β∥2=∥(U−λV)ψ∥2≤∥U−λV∥ by [F3] and ∥ψ∥2=1. Combining with step 1.1 gives dTV(pUψ,pVψ)≤∥U−λV∥ for every unit scalar λ.

3.1givenstep 2.1algebra∎

Taking the infimum over all ∣λ∣=1 in step 2.1 gives dTV(pUψ,pVψ)≤dpr(U,V)≤ε. No minimizing phase is required.

Remarks

The proof uses no axiom of choice: the inequality holds for each phase separately, then for their infimum. Standalone phase invariance follows directly from modulus multiplicativity, so no quantum-specific global-phase theorem is required.

LemmaStatement: AI-adaptedProof: AI-adaptedjudge pass (gpt-6-luna)Open item page →

The half-turn constant exceeds 2

Statement

With π defined by the first positive zero of cosine, one has 2<π2.

Facts & Assumptions

Given: The cosine power series, its strict decrease on [0,2], the first positive zero γ=π/2, and the nonnegative square root 2.

[F1]

The first positive cosine zero is the unique γ∈(0,2) with cos⁡γ=0, and π/2=γ (Cosine has a smallest positive zero, lying strictly between zero and two, Pi as twice the smallest positive zero of cosine).

[F2]

Cosine is given by its alternating power series and is strictly decreasing on [0,2] (Sine and cosine defined by their real power series, Sine is positive and cosine is strictly decreasing on (0,2), with cos 2 at most -1/3).

[F4]

The real numbers form a complete totally ordered field, so each nonnegative real has a unique nonnegative square root (The reals are complete, Square roots exist: a unique a≥0 with (a)2=a; the positives are {x2:x≠0}).

Proof

technique · direct

Given: The facts above.

1.1givenF2F3F4algebra

Let x=2, so x>0 and x2=2 by [F4]. For k≥2 put ak=x2k/(2k)!; then ak+1/ak=2/((2k+1)(2k+2))≤1/15<1, so (ak)k≥2 decreases to zero. In the cosine series [F2], the terms for k=0,1 cancel because 1−x2/2=0. Reindexing the remaining tail as an alternating series gives first two partial sums a2 and a2−a3; [F3] bounds its sum below by a2−a3>0. Thus cos⁡x>0.

2.1givenF4step 1.1algebra

One has x<2: otherwise x≥2 and x+2>0 would imply x2−4=(x−2)(x+2)≥0, contradicting x2=2<4 from step 1.1. Hence x∈(0,2).

3.1givenF1F2step 1.1step 2.1∎

By [F1], γ=π/2∈(0,2) and cos⁡γ=0. If x≥γ, strict decrease of cosine on [0,2] from [F2] would give cos⁡x≤cos⁡γ=0, contradicting step 1.1. Therefore 2=x<γ=π/2.

DefinitionDefinition: Literature-sourcedProof: Not applicablejudge pass (gpt-6-luna)Open item page →

Positive-sign cyclic quantum Fourier transform

Definition

For an integer N≥1, let FN be the negative-sign, N−1/2-normalized transform of The unitary discrete Fourier transform on Z/NZ. Define the cyclic quantum Fourier transform by QFT⁡N:=FN−1. The inverse exists by Finite Fourier inversion for the unitary transform on Z/NZ, and its matrix on the standard basis indexed by 0,…,N−1 is

QFT⁡N∣x⟩=N−1/2∑y=0N−1e2πixy/N∣y⟩,0≤x<N.

Here the standard-basis ket convention is the one specified by Dirac Notation Conversion. Thus the transform has the positive sign and the same N−1/2 normalization as the inverse Fourier formula. At N=1 it is the identity on the one-dimensional register. In the binary specialization N=2n, the circuit page writes each index in its unique base-two expansion.

LemmaStatement: Literature-sourcedProof: AI-adaptedjudge pass (gpt-6-luna)Open item page →

Binary factorization of QFT basis output

Statement

Let n≥0, N=2n, and take the input word (xn−1,…,x0) in wire order qn−1,…,q0. By the big-endian index convention, its integer is x=∑i=0n−1xi2i, with xi∈{0,1}. For 0≤j<n, set

Rj:=2−1/2(∣0⟩+e2πi∑i=0jxi2−(j−i+1)∣1⟩).

With the register order qn−1,…,q0, the standard-basis output QFT⁡2n∣x⟩ is R0⊗R1⊗⋯⊗Rn−1. The ordered factors immediately before the final wire-reversal permutation of the exact circuit are Rn−1⊗⋯⊗R0. For n=0, both are the empty tensor product, interpreted as the scalar 1.

Facts & Assumptions

Given: The positive-sign transform QFT⁡2n of Positive-sign cyclic quantum Fourier transform, binary input encoding by Big-endian encoding of ordered bit strings, ordered tensor registers and reversal permutation by Ordered tensor registers, their inner product, and wire permutations, the standard ket convention of Dirac Notation Conversion, and bijectivity of the binary index.

[F1]

The map enc⁡n is a bijection from length-n bit strings to {0,…,2n−1} (Big-endian bit-string indices are bijective).

[F2]

A bit tuple (b0,…,bn−1) has big-endian index ∑k<nbk2n−1−k, so the first listed wire is most significant (Big-endian encoding of ordered bit strings).

[F3]

The product basis is ordered lexicographically by factor indices, and a wire permutation sends a product-basis tuple to the tuple in the permuted factor order (Ordered tensor registers, their inner product, and wire permutations).

[F4]

A ket denotes its vector, and the standard coordinate kets are the corresponding coordinate vectors (Dirac Notation Conversion).

[L1]

The definition Positive-sign cyclic quantum Fourier transform gives the basis amplitude 2−n/2e2πixy/2n at output integer y.

[F5]

The Hadamard sends ∣b⟩ to 2−1/2(∣0⟩+(−1)b∣1⟩) for b∈{0,1} (Exact one-qubit gates and rotations).

[F6]

The controlled phase CP(θ) fixes ∣00⟩,∣01⟩,∣10⟩ and multiplies ∣11⟩ by eiθ (Controlled Phase Rotation).

Proof

technique · direct

Given: n≥0, an input bit string x0,…,xn−1, and the stated ordered-basis conventions.

1.1givenF1F2L1algebra

For n≥1, bijectivity [F1] lets us index the output basis by all bit words (yn−1,…,y0) in wire order; [F2] gives y=∑j=0n−1yj2j. Then xy/2n=∑jyjx/2n−j. In the term indexed by yj, put k=n−1−j. The fractional part of x/2n−j is ∑i=0kxi2−(k−i+1): terms with i>k are integers and the remaining powers have exactly these denominators. Thus the phase attached to output bit yj is the phase of Rn−1−j.

2.1givenF3F4L1step 1.1algebra

Consequently e2πixy/2n=∏je2πiyj∑i=0n−1−jxi2−(n−j−i). Summing over all bit strings y factors as a tensor product of the two-term sums for the individual yj; the normalization 2−n/2 is the product of the n factors 2−1/2. By [F3], in wire order qn−1,…,q0 the factor sequence is R0⊗⋯⊗Rn−1, and [F4] identifies these coordinate factors with the corresponding kets.

3.1givenF3F5F6step 2.1algebra∎

In the descending-target circuit, the block on qj applies H followed by CP(2π/2j−i+1) from each control qi with i<j. Before this block, all lower wires are still in the basis states ∣xi⟩: previous blocks target only higher wires, and [F6] leaves basis controls unchanged. By [F5], the Hadamard contributes relative phase (−1)xj=e2πixj/2; by [F6], the controlled phases multiply it by ∏i<je2πixi/2j−i+1. Thus the block prepares Rj without changing the lower wires or previously prepared higher factors. Induction down the finite loop gives Rn−1⊗⋯⊗R0 before reversal. By [F3], reversal gives the output of step 2.1. At n=0, the loop is empty, N=1, and both states are the empty tensor 1.

Remarks

The binary fraction in Rj is 0.xjxj−1⋯x0 in base two. In particular, the output factor order and the pre-swap factor order differ; suppressing the final reversal changes the bit convention.

LemmaStatement: AI-adaptedProof: AI-adaptedOpen item page →

Operator Norm Is Unchanged by Spectator Registers

Statement

Let S and R be nonzero finite-dimensional complex inner-product spaces with specified finite orthonormal bases, and let T:S→S be linear. With the product inner product on S⊗R,

∥T⊗IR∥=∥T∥.

If P is a unitary wire permutation on a finite ordered tensor register, then conjugating an endomorphism A by P preserves its operator norm: ∥PAP−1∥=∥A∥. Thus a one- or two-register gate has the same operator norm after identity factors are added on spectators and its wires are moved to their declared positions.

Facts & Assumptions

Given: Nonzero finite-dimensional complex inner-product spaces S,R with specified orthonormal bases, a linear endomorphism T of S, their ordered tensor register, and a unitary wire permutation P when the conjugation clause is used.

[F1]

The lexicographically ordered elementary product vectors form an orthonormal basis and their squared norms are computed by the product inner product (The product basis is orthonormal and tensor dimensions multiply).

[F2]

The tensor map T⊗IR acts on elementary tensors by s⊗r↦Ts⊗r (Tensor products of finitely many linear maps).

[F3]

The operator norm is 0 on a zero-dimensional domain; on a nonzero finite-dimensional domain, ∥T∥=max⁡∥s∥=1∥Ts∥ (The operator norm is zero on the zero domain and otherwise is max_{||v||=1} ||Tv||).

[F4]

Compatible products satisfy ∥AB∥≤∥A∥∥B∥ (The operator norm is submultiplicative and satisfies ||T^*T|| = ||T||^2).

[F5]

A wire permutation is unitary and therefore preserves vector norms (Finite wire permutations are unitary basis permutations).

Proof

technique · direct

Given: The spaces, map and register above.

1.1givenF1F2F3algebra

Write the specified orthonormal bases as f0,…,fa−1 for S and e0,…,ed−1 for R; a,d≥1. By [F1], fk⊗ej form an orthonormal basis of S⊗R. Expand v=∑k<a,j<dckjfk⊗ej and set vj=∑k<ackjfk. Grouping this finite sum gives v=∑j<dvj⊗ej, while orthonormality gives ∥v∥2=∑j<d∥vj∥2. By [F2], (T⊗IR)v=∑j<dTvj⊗ej. Hence [F3] gives ∥(T⊗IR)v∥2=∑j<d∥Tvj∥2≤∥T∥2∑j<d∥vj∥2=∥T∥2∥v∥2, so ∥T⊗IR∥≤∥T∥.

2.1givenF1F2F3step 1.1choosealgebra

Choose a unit vector s∈S attaining the maximum in [F3], and choose a unit vector e∈R. The product inner product gives ∥s⊗e∥=1, and [F2] gives ∥(T⊗IR)(s⊗e)∥=∥Ts∥=∥T∥. Thus ∥T⊗IR∥≥∥T∥, proving the first equality.

3.1givenF3F4F5algebra∎

If the tensor register is zero-dimensional, both A and PAP−1 have operator norm 0 by [F3], proving the conjugation equality. Otherwise [F5] shows that P and P−1 preserve norms, so each has operator norm 1 by [F3]. Submultiplicativity [F4] gives ∥PAP−1∥≤∥A∥. Applying the same inequality to A=P−1(PAP−1)P gives the reverse inequality. Therefore ∥PAP−1∥=∥A∥ in every case.

LemmaStatement: AI-adaptedProof: AI-adaptedjudge pass (gpt-6-luna)Open item page →

A SWAP Is Three CNOTs

Statement

On two ordered qubit wires, let S be the wire-swap permutation ∣a,b⟩↦∣b,a⟩. Let C12 be the CNOT with wire 1 controlling wire 2, so C12∣a,b⟩=∣a,b⊕a⟩, and define the reverse orientation by C21∣a,b⟩=∣a⊕b,b⟩, extending both actions linearly; here ⊕ is addition modulo two. The operator identity

S=C12C21C12

holds, where products act right to left. Therefore the swap of two wires has an exact three-CNOT implementation with no ancillas.

Facts & Assumptions

Given: Two ordered qubit factors with computational basis ∣a,b⟩, a,b∈{0,1}.

[F1]

The first-to-second CNOT has action C12∣a,b⟩=∣a,b⊕a⟩ (CNOT and Control-Target Order).

[F2]

The swap wire permutation sends ∣a,b⟩ to ∣b,a⟩ (Ordered tensor registers, their inner product, and wire permutations).

[F3]

The four computational basis vectors form a basis of the two-qubit register (The product basis is orthonormal and tensor dimensions multiply).

Proof

technique · direct finite verification

Given: The basis actions in [F1]–[F3] and the explicit reverse CNOT action in the Statement.

1.1givenF1F3algebra

Both CNOT maps are involutions: applying either twice uses x⊕x=0 and returns every basis vector to itself, so their linear extensions permute the orthonormal basis [F3] and are exact unitary gates. Now for any a,b∈{0,1}, apply the three maps from right to left: C12∣a,b⟩=∣a,b⊕a⟩, then C21 sends this to ∣a⊕(b⊕a),b⊕a⟩=∣b,b⊕a⟩, and the final C12 sends it to ∣b,(b⊕a)⊕b⟩=∣b,a⟩. The last equalities use a⊕a=b⊕b=0.

2.1F2F3step 1.1algebra∎

This is exactly the action of S in [F2] on every vector of the basis [F3]. Two linear maps agreeing on a basis agree on every vector, so S=C12C21C12. The displayed product contains three CNOTs on the same two wires and uses no ancillary register.

DefinitionDefinition: Literature-sourcedProof: Not applicableOpen item page →

QFT ideal and finite-set gate-cost models

Definition

The ideal binary-QFT gate-count model treats each Hadamard H and each exact controlled phase CPs as one elementary gate, for integer s≥2, where

H=2−1/2(111−1),CPs=diag⁡(1,1,1,e2πi/2s).

A named SWAP, the wire permutation from Ordered tensor registers, their inner product, and wire permutations, counts as one two-qubit gate. If the implementation expands each SWAP into three exact CNOT gates of CNOT and Control-Target Order, count those three CNOTs in place of that SWAP. These conventions refine the one-qubit alphabet, controlled-phase rotation and elementary circuit-resource interfaces of Exact one-qubit gates and rotations, Controlled Phase Rotation and Finite circuit resource accounting.

The finite-set synthesis model keeps ideal gate count separate from compiled gate count. A one- or two-qubit target block is assigned a projective operator-error tolerance δ>0; a scalar phase returned by the compiler is retained as metadata for the whole standalone circuit. Each CNOT expanded from a SWAP is exact in this model. Any compiled-count theorem must state the fixed-arity decomposition, finite alphabet, inverse-closure, density, exact-arithmetic and compiler-threshold hypotheses it uses. In particular, it makes no claim about classical bit-time for computing an arbitrary target-angle description. This is a cost convention; correctness and compiler resource bounds are separate theorems.

The adjoint CPs†=diag⁡(1,1,1,e−2πi/2s) also counts as one ideal gate when it occurs in an inverse circuit.

AlgorithmAlgorithm: Literature-sourcedProof: Not applicableOpen item page →

Exact binary QFT circuit

Definition

Input: an n-qubit register with ordered wires qn−1,…,q0, n≥0. The input integer is encoded by x=∑j=0n−1xj2j in the computational basis, as specified by Big-endian encoding of ordered bit strings.

Output: the following finite gate list, defining a unitary by the circuit semantics of Denotational semantics of a finite layered circuit on the ordered-register syntax of Finite circuit syntax and ordered wire labels, and using no ancillas.

  1. For j=n−1,n−2,…,0, complete the following block before proceeding to the next j: apply H to target qj; then, for i=0,1,…,j−1 in that order, apply CPj−i+1 to the pair (qi,qj), with qi as control and qj as target. Here CPs is the ideal controlled phase defined in QFT ideal and finite-set gate-cost models.
  2. After completing every block in the descending j loop, for j=0,1,…,⌊n/2⌋−1, swap qj with qn−1−j.

The chronological order is exactly the order listed. If n=0, all loops are empty and the output is the empty circuit, i.e. the identity on the one-dimensional register.

TheoremStatement: Literature-sourcedProof: AI-adaptedjudge pass (gpt-6-luna)Open item page →

Exact binary QFT circuit correctness

Statement

For every n≥0, the exact binary circuit of Exact binary QFT circuit implements Positive-sign cyclic quantum Fourier transform at N=2n: it maps each computational basis vector ∣x⟩, 0≤x<2n, to

2−n/2∑y=02n−1e2πixy/2n∣y⟩,

with the declared output register order. Hence its denotation is QFT⁡2n on every state. Reversing the gate list and replacing every gate by its adjoint gives the negative-sign inverse QFT with the same ideal gate count.

Facts & Assumptions

Given: An integer n≥0, an n-wire ordered computational register, and the exact circuit of Exact binary QFT circuit.

[F1]

On a basis input x=∑ixi2i, the QFT output factors as R0⊗⋯⊗Rn−1 in the ordered output wires; before the final reversal it is Rn−1⊗⋯⊗R0 (Binary factorization of QFT basis output).

[F2]

H=2−1/2(111−1) and CPs=diag⁡(1,1,1,e2πi/2s) in control-first basis order; the ideal model also counts CPs†=diag⁡(1,1,1,e−2πi/2s) as one gate (QFT ideal and finite-set gate-cost models).

[F3]

Ordered tensor factors retain the displayed wire order, and the final wire permutation reverses the corresponding product-basis factors (Ordered tensor registers, their inner product, and wire permutations).

[F4]

A ket denotes its vector and standard coordinate kets are the corresponding coordinate vectors (Dirac Notation Conversion).

[F5]

Inverse access to a chronological unitary list reverses the order and replaces each gate by its adjoint (Inverse Unitary Access).

[F6]

A unitary on a specified ordered tuple of wires has a unique unitary global embedding that acts as that unitary on those wires and as the identity on the others (A local gate has a unique global wire embedding).

[L1]

The positive-sign QFT is the inverse of the negative-sign unitary DFT, so its inverse uses the negative-sign convention (Positive-sign cyclic quantum Fourier transform).

[A1]

Denotational semantics of a finite layered circuit identifies the chronological gate list with the right-to-left product of its embedded gate operators.

Proof

technique · direct

Given: The basis input and circuit above.

1.1givenF1F2F3F4F6A1algebra

If n=0, the exact algorithm has no gates, so [A1] gives the identity on the one-dimensional register; by [F1], QFT⁡1 is also the identity. Thus the claimed basis action holds in this case. Now suppose n≥1 and fix a basis input ∣xn−1⋯x0⟩. In the descending loop, before the step targeting qj, every lower wire qi with i<j is still in its original basis state ∣xi⟩: earlier gates targeted only higher wires, and the lower wires occur only as controls, which the diagonal controlled-phase matrix in [F2] leaves unchanged. The local embedding action [F6] therefore leaves those control bits unchanged. The Hadamard on qj contributes relative phase (−1)xj=e2πixj/2, while the controlled phases from lower controls contribute e2πi∑i<jxi2−(j−i+1). Thus target qj has state Rj. The state before the final swaps is Rn−1⊗⋯⊗R0. The tensor order and coordinate-ket convention are [F3] and [F4]; interpreting this finite gate trace as the circuit's operator product requires [A1].

2.1givenF1F3A1step 1.1algebra

For n≥1, the final swaps reverse those ordered factors by [F3], producing R0⊗⋯⊗Rn−1; [F1] identifies this with the positive-sign Fourier output on ∣x⟩. Together with the n=0 case established in step 1.1, the circuit agrees with QFT⁡2n on every basis vector.

3.1givenF2F4F5L1A1step 2.1∎

Both the circuit denotation and QFT⁡2n are linear operators by [A1], so equality on the standard basis [F4] implies equality on every finite linear combination of basis vectors. Reversing the gate sequence and taking adjoints is its inverse by [F5]; the reverse list has the same number of gates, and each adjoint is still a Hadamard, controlled phase of opposite angle, or SWAP. The adjoint controlled phases have unit ideal cost by [F2], so the inverse QFT has the same ideal gate count and uses the negative-sign convention by [L1].

TheoremStatement: Literature-sourcedProof: AI-adaptedjudge pass (gpt-6-luna)Open item page →

Exact binary QFT ideal gate count

Statement

For n≥0, the exact circuit uses n Hadamards, n(n−1)/2 controlled phase rotations, ⌊n/2⌋ SWAP gates, no ancillas, and

n+n(n−1)2+⌊n/2⌋=O(n2)

ideal gates in the model of QFT ideal and finite-set gate-cost models. If every SWAP is expanded into three exact CNOTs, the circuit instead has 3⌊n/2⌋ CNOTs in place of the SWAPs.

Facts & Assumptions

Given: An integer n≥0, the exact circuit of Exact binary QFT circuit, and the ideal gate model of QFT ideal and finite-set gate-cost models.

[F1]

The exact circuit applies one H on each wire, one controlled phase for each pair 0≤i<j<n, then ⌊n/2⌋ reversal swaps (Exact binary QFT circuit).

[F2]

Each H, controlled phase and named SWAP counts as one ideal gate; an expanded SWAP uses three CNOTs (QFT ideal and finite-set gate-cost models).

[F3]

The two-wire SWAP equals the exact three-CNOT sequence (A SWAP Is Three CNOTs).

Proof

technique · direct

Given: The circuit and gate-count convention above.

1.1F1algebra

The loop has one Hadamard for each of the n wires. Its controlled phases are indexed by pairs (i,j) with 0≤i<j<n; summing the j possible lower controls for each target gives ∑j=0n−1j=n(n−1)/2. The final reversal consists of exactly one swap for each pair (j,n−1−j) with j<⌊n/2⌋, hence ⌊n/2⌋ swaps.

2.1givenF2F3step 1.1algebra∎

By [F2], the ideal count is the displayed sum and there are no other gates or ancillas. For n≥1, the sum is at most n+n(n−1)/2+n/2≤3n2/2, so it is O(n2); at n=0 all counts vanish. Replacing each counted SWAP by the exact identity [F3] gives exactly 3⌊n/2⌋ CNOTs.

AlgorithmAlgorithm: Literature-sourcedProof: Not applicablejudge pass (gpt-6-luna)Open item page →

Truncated binary QFT

Definition

Input: an n-qubit ordered register as in Exact binary QFT circuit and an integer cutoff m≥1.

Output: run the exact binary QFT circuit except omit every controlled phase CPs with denominator index s>m. Retain every Hadamard and every final reversal SWAP. The resulting gate list is finite and unitary for every n≥0,m≥1 under Denotational semantics of a finite layered circuit. If m≥n, no controlled phase is omitted and the circuit is exactly the full circuit. The ideal gate-count convention is QFT ideal and finite-set gate-cost models.

TheoremStatement: Literature-sourcedProof: AI-adaptedjudge pass (gpt-6-luna)Open item page →

Operator-norm error of QFT truncation

Statement

Let n≥1, N=2n, and let m≥1 be an integer. For 1≤m<n,

∥QFT⁡2n−QFT⁡2n(m)∥≤∑s=m+1n(n−s+1)2π2s≤2πn 2−m.

For m≥n, the truncated circuit is exact and the error is zero. In particular, for 0<ε<1, the cutoff m=min⁡{n,⌈log⁡2(2πn/ε)⌉} gives operator-norm error at most ε.

Facts & Assumptions

Given: The exact and truncated circuits on a nonzero 2n-dimensional register, with n≥1, and an integer cutoff m≥1.

[F1]

The exact and truncated gate lists agree except that each controlled phase with denominator index s>m is replaced by the identity (Exact binary QFT circuit, Truncated binary QFT).

[F2]

The ideal controlled phase is diag⁡(1,1,1,e2πi/2s) (QFT ideal and finite-set gate-cost models).

[F3]

For a nonzero finite-dimensional domain, the operator norm is the maximum over unit vectors (The operator norm is zero on the zero domain and otherwise is max_{||v||=1} ||Tv||).

[F4]

Compatible products satisfy ∥ST∥≤∥S∥ ∥T∥ (The operator norm is submultiplicative and satisfies ||T^*T|| = ||T||^2).

[F6]

The vector norm induced by an inner product satisfies ∥u+v∥≤∥u∥+∥v∥ (The inner-product norm is definite, homogeneous, and satisfies the triangle inequality).

[F7]
[F8]

∣sin⁡u−sin⁡v∣≤∣u−v∣ for real u,v (Sine and cosine are 1-Lipschitz on R).

[F10]

cos⁡(2u)=1−2sin⁡2u (Double-angle and quadratic power-reduction identities).

[F11]

The exact circuit denotes QFT⁡2n (Exact binary QFT circuit correctness).

[F12]

A wire permutation of an ordered tensor register is unitary (Finite wire permutations are unitary basis permutations).

[F13]

Adding spectator factors or moving the selected wires preserves the operator norm of a local gate (Operator Norm Is Unchanged by Spectator Registers).

[F14]

A tensor map acts on elementary product vectors by applying its factor maps (Tensor products of finitely many linear maps).

[F15]

The two-qubit computational basis is orthonormal (The product basis is orthonormal and tensor dimensions multiply).

[F16]

Coordinates in a finite orthonormal basis satisfy Parseval and Bessel bounds (Bessel's inequality for a finite orthonormal list and Parseval's identity for an orthonormal basis).

[F17]

A unitary gate on distinct ordered wires has a unique unitary global embedding acting by the local gate on those wires and by the identity on the others (A local gate has a unique global wire embedding).

[A1]

Denotational semantics of a finite layered circuit identifies the chronological gate list with the right-to-left product of its embedded gate operators.

Proof

technique · direct

Given: The circuits and hypotheses above.

1.1F7F8F9F10algebra

For real t, [F7] and [F10] give ∣1−eit∣2=(1−cos⁡t)2+sin⁡2t=2(1−cos⁡t)=4sin⁡2(t/2). By [F8]–[F9], ∣sin⁡(t/2)∣=∣sin⁡(t/2)−sin⁡0∣≤∣t∣/2, hence ∣1−eit∣≤∣t∣.

2.1F2F3F13F15F16step 1.1algebra

For an omitted gate at level s, set ts=2π/2s and Ds=CPs−I on its two-qubit target. By [F2], Ds has only one nonzero diagonal entry, eits−1, in the orthonormal basis [F15]. For any unit vector, Bessel's inequality [F16] bounds its ∣11⟩ coordinate in modulus by 1, so ∥Dsv∥≤∣eits−1∣; equality is attained at v=∣11⟩. Thus ∥Ds∥=∣eits−1∣≤2π/2s by step 1.1, and embedding it on the full register preserves this norm by [F13].

3.1A1F2F3F4F5F6F7F11F12F14F17step 2.1algebra

By [A1], let G1,…,GK be the embedded operators in chronological order, so the exact circuit product is GK⋯G1 and the truncated product replaces omitted Gr by G~r=I. The local embedding action is [F17]. By [F11], the exact product is QFT⁡2n. Their difference telescopes as ∑r=1KGK⋯Gr+1(Gr−G~r)G~r−1⋯G~1. Each H is unitary by direct multiplication of its matrix in [F2]; each CPs is unitary because it is diagonal with unit-modulus entries by [F2,F7]; each SWAP is unitary by [F12], and each omitted gate is replaced by I. A local unitary U tensored with I has inverse U−1⊗I by [F14], and conjugating by the unitary wire permutation preserves unitarity. Thus every outside product is unitary and has norm 1 by [F3,F5]. For any operators X,Y, [F6] and the definition [F3] give ∥X+Y∥≤∥X∥+∥Y∥; submultiplicativity [F4] therefore bounds the telescoping sum by the sum of the omitted-gate norms from step 2.1.

4.1F1step 2.1step 3.1algebra

At level s, the pairs 0≤i<j<n satisfying j−i+1=s have i=0,…,n−s, so there are n−s+1 such gates. Summing step 2.1 over the omitted levels gives the first bound. Since n−s+1≤n and ∑s=m+1n2−s≤2−m, this is at most 2πn2−m.

5.1F1step 4.1algebra∎

If m≥n, no gate is omitted by [F1], so the error is zero. Otherwise the displayed sum bound applies. For m=⌈log⁡2(2πn/ε)⌉<n, 2m≥2πn/ε, hence 2πn2−m≤ε; taking m=min⁡{n,⌈log⁡2(2πn/ε)⌉} selects either this case or m=n.

Remarks

No axiom of choice is used. The key local proof obligation is the telescoping operator-norm estimate: the cited QFT treatments motivate the cutoff but do not supply this complete operator-norm argument. The sine/cosine suppliers are published and read; the QFT circuit suppliers remain in the assigned cross-pair dependency set.

TheoremStatement: Literature-sourcedProof: AI-adaptedjudge pass (gpt-6-luna)Open item page →

Truncated QFT ideal gate count

Statement

For n≥1 and integer m≥1, put m~=min⁡{m,n}. The truncated binary QFT uses n Hadamards, ∑s=2m~(n−s+1) controlled phases, ⌊n/2⌋ SWAP gates and no ancillas. Its ideal gate count is therefore

n+∑s=2m~(n−s+1)+⌊n/2⌋=O(nm~+n).

For fixed c>0, if n≥2, n−c≤ε<1, and m=min⁡{n,⌈log⁡2(2πn/ε)⌉}, then m~=Oc(log⁡n) and this count is Oc(nlog⁡n) ideal gates. Expanding the reversal replaces each SWAP by three exact CNOTs; no finite-set synthesis count is asserted here.

Facts & Assumptions

Given: The truncated circuit with n≥1 and integer cutoff m≥1.

[F1]

The truncated circuit retains every Hadamard, every controlled phase with 2≤s≤m, every final reversal SWAP, and no ancillas (Truncated binary QFT).

[F2]

Each retained Hadamard, controlled phase and SWAP has ideal cost one; a SWAP may instead be expanded to three exact CNOTs (QFT ideal and finite-set gate-cost models).

[F3]

Each two-wire SWAP equals the exact three-CNOT sequence (A SWAP Is Three CNOTs).

[F4]

For 0<ε<1, choosing m=min⁡{n,⌈log⁡2(2πn/ε)⌉} gives the stated truncation error at most ε (Operator-norm error of QFT truncation).

Proof

technique · direct

Given: The circuit and counting convention above.

1.1F1algebra

For each target qj, the exact circuit has j controlled phases. A retained denominator level s corresponds to pairs with j−i+1=s, namely i=0,…,n−s, and so has n−s+1 gates. The cutoff retains precisely s=2,…,m~. If m≥n, then m~=n and every phase is retained.

2.1F1F2F3F4step 1.1algebra∎

There are n target wires, ⌊n/2⌋ final swaps, and no other gates or ancillas by [F1]. Summing their costs by [F2] gives the formula. Since ∑s=2m~(n−s+1)≤n(m~−1) and ⌊n/2⌋≤n/2, the total is at most nm~+n/2, hence O(nm~+n). Under the cutoff in [F4] and ε≥n−c, m≤⌈log⁡2(2πnc+1)⌉=Oc(log⁡n), so m~=Oc(log⁡n). The CNOT expansion is exact by [F3] and changes only the final reversal term; it does not compile any rotation.

TheoremStatement: Literature-sourcedProof: AI-adaptedOpen item page →

Finite universal-gate compilation cost for the truncated QFT

Statement

Each retained Hadamard or complete controlled-phase block has an exact no-ancilla decomposition with at most four one-qubit U(2) gates and two CNOTs, uniformly in its angle. Fix an integer c≥1 bounding both counts for the chosen decompositions; c=4 always suffices. Assume QC12's fixed inverse-closed dense one-qubit alphabet G⊂SU(2), its exact-real compiler, and a fixed rational 0<κ≤η0<64−2 within the certified compiler range.

Let n≥1, rational 0<η<1, and put

m=min⁡{n,⌈log⁡2(4πn/η)⌉},L=n+∑s=2min⁡(m,n)(n−s+1),δ=min⁡{η/(2cL),κ}.

Compile each truncated-circuit block using that exact decomposition, compile each resulting one-qubit special-unitary factor to operator-norm error at most δ by QC12, and keep every phase scalar as metadata for the entire standalone circuit. Expand final SWAPs into exact CNOTs. Then the compiled unitary C satisfies

dpr(C,QFT⁡2n)≤η,

so every unit-input computational-basis output law differs from that of QFT⁡2n by total variation at most η. Its finite-set gate count is

O ⁣(nm log⁡3.97(2nm/η)).

This is a gate-count claim under the stated exact-real compiler interface; it gives no classical bit-time bound for generating arbitrary target-angle descriptions and makes no outer-controlled-QFT compilation claim.

Facts & Assumptions

Given: n≥1, rational 0<η<1, the exact fixed-arity decompositions, QC12's SU(2) compiler hypotheses, and a computational-basis measurement of the compiled standalone circuit.

[F1]

The truncated circuit retains n Hadamards, the controlled phases with 2≤s≤m, and the final reversal swaps (Truncated binary QFT).

[F2]

Its operator-norm error from the exact QFT is at most 2πn2−m when m<n, and zero when m=n (Operator-norm error of QFT truncation).

[F3]

The gate-cost model counts exact CNOTs and keeps compiler scalar phases for the whole standalone circuit (QFT ideal and finite-set gate-cost models).

[F4]

Projective operator distance at most ζ bounds each unit-input computational-basis output-law distance by ζ (Projective operator closeness bounds output distributions).

[F7]

The QC12 compiler takes a target S∈SU(2) and rational 0<δ≤η0, using exact-real arithmetic (Solovay–Kitaev Unitary Compiler for SU(2)).

[F8]

For 0<δ≤η0<64−2, the compiler returns a word with operator-norm error at most δ and length O(log⁡3.97(1/δ)) (Solovay–Kitaev Error and Resource Bound).

[F9]

G is a fixed inverse-closed dense finite subset of SU(2) (Inverse-Closed Dense SU(2) Gate Set).

[F10]

The determinant of a finite-dimensional unitary has modulus one (Orthogonal and unitary operators form groups, and their determinants have modulus one).

[F13]

Adding spectator factors or moving target wires preserves the operator norm of a local gate (Operator Norm Is Unchanged by Spectator Registers).

[F14]

Tensor maps act linearly on each factor; in particular (λW)⊗I=λ(W⊗I) (Tensor products of finitely many linear maps).

[F15]

Each final SWAP has an exact three-CNOT implementation (A SWAP Is Three CNOTs).

[F16]

A local unitary on a specified ordered tuple of wires has a unique unitary global embedding acting by that gate on those wires and by the identity on the others (A local gate has a unique global wire embedding).

[A1]

Exact Controlled One-Qubit Unitary with Two CNOTs supplies the exact decomposition of a controlled U(2) into two CNOTs and the four one-qubit gates displayed in its proof. In Controlled Phase Rotation, each complete controlled phase is C(Pθ) for the unitary Pθ=diag⁡(1,eiθ). A Hadamard is itself one one-qubit gate.

[A2]

Finite circuit resource accounting counts declared gate occurrences and includes every workspace wire in width; the decompositions in [A1] use the two data wires only.

[A3]

Denotational semantics of a finite layered circuit assigns a chronological gate list its right-to-left product, using the unique embedding of each local gate.

[A4]

A Controlled Global Phase Becomes a Relative Control Phase proves that a scalar phase on a controlled block becomes a relative control phase; its inspected draft statement and full proof supply the outer-control caveat.

Proof

technique · direct

Given: The parameters, circuit and compiler and exact decomposition interfaces above.

1.1givenF2algebra

If m<n, then 2m≥4πn/η, so [F2] gives truncation error at most η/2. If m=n, the truncated circuit is exact by [F2]. Thus in either case the ideal truncated unitary is within η/2 of the exact QFT.

1.2givenF1F3F15A2algebra

There are L retained one- or two-qubit blocks. For m≥1, each summand in L is at most n, hence L≤n+n(m−1)=nm. The final reversal uses ⌊n/2⌋ swaps, or 3⌊n/2⌋=O(n) exact CNOTs by [F15] and the resource convention [A2].

1.3givenF7F8F9F10F11F12F13F14algebra

For any factor U∈U(2), [F10] gives ∣det⁡U∣=1. Choose λ∈C with λ2=det⁡U by [F11]. Then [F12] gives ∣λ∣2=∣det⁡U∣=1, so ∣λ∣=1. The matrix S=λ−1U is unitary and has determinant 1, hence S∈SU(2). By [F7]–[F9] and 0<δ≤κ≤η0, compile S to a word W with ∥S−W∥≤δ and O(log⁡3.97(1/δ)) gates. Thus ∥U−λW∥≤δ. The local error lifts to the full register with the same operator norm by [F13]. By [F14], the embedded scalar λ remains one scalar on the entire standalone circuit.

2.1givenA1step 1.2algebra

Apply [A1] to each retained block: use one gate for a Hadamard and, for C(Pθ), the three target gates A,B,C and one control phase gate from the controlled-unitary proof, with its two exact CNOTs. The phase gate is retained, so this is the complete controlled phase. These lists prove the uniform bound with c=4, independently of the angle. For any chosen lists bounded by c as in the statement, the total number K of one-qubit factors obeys K≤cL, and at most cL CNOTs occur. Keep the Hadamards as one-gate lists, so K≥n≥1. No ancilla or unproved QSD optimization is used.

3.1givenA3F3F5F6F16step 2.1step 1.3algebra

By the circuit denotation interface [A3], compose the compiled factors in chronological order, leaving every decomposition CNOT exact. The global embeddings act on their specified wires by [F16]. The exact-minus-compiled product telescopes with one local difference per one-qubit factor. Every surrounding factor is unitary and has norm one by [F6]; [F5] bounds the norm of the sum by the sum of local errors, at most Kδ≤cLδ≤η/2. The product of the K scalars from step 1.3 is one scalar for the whole standalone circuit.

4.1givenF4F5step 1.1step 3.1algebra

Let C be the compiled circuit and let λ be the total scalar from step 3.1. The triangle inequality, step 1.1 and step 3.1 give ∥QFT⁡2n−λC∥≤η. By the max-over-unit-vectors definition in [F5], operator-norm homogeneity gives ∥C−λ‾QFT⁡2n∥=∥λ‾(QFT⁡2n−λC)∥=∥QFT⁡2n−λC∥≤η; the first vectors differ by the scalar −1, and ∣λ∣=1. Choosing λ‾ in the defining infimum proves dpr(C,QFT⁡2n)≤η. Applying [F4] gives the asserted total-variation bound for every unit input.

4.2givenF4A4step 3.1

The scalar in step 3.1 is harmless for this standalone output law because the conclusion uses projective distance and [F4]. It cannot be silently discarded if this entire compiled block is placed under outer control, by [A4]; no outer-controlled compilation claim is made.

5.1givenA2F8F15step 1.2step 2.1algebra∎

By [F8], the K≤cL compiled one-qubit factors use O(cLlog⁡3.97(1/δ)) gates. The decomposition CNOTs contribute at most cL and the final SWAP expansion contributes 3⌊n/2⌋ exact CNOTs by [A2,F15]. Since L≤nm and 1/δ=max⁡{2cL/η,1/κ} with fixed c,κ, log⁡(1/δ)=O(log⁡(2nm/η)). Therefore the total is O(nmlog⁡3.97(2nm/η)). No step bounds the classical bit-time for target-angle descriptions.

Remarks

No axiom of choice is needed once the finite exact factor lists are supplied: the scalar roots and finite compiler outputs are selected for the finitely many explicit gates. The uniform fixed-arity factor count follows from the explicit controlled-unitary construction in step 2.1; the compiler assumptions remain those stated above.

5 · Examples, counterexamples and false statements

None yet.

Sources