betaFeedback

WorksPhysics and Astronomy

Uniform Quantum Fourier Transforms from Fast Integer Multiplication

Abstract

We construct a polynomial-time uniform family of unitary circuits for the qq-qubit quantum Fourier transform (QFT). For fixed or inverse-polynomial error and every fixed δ>0\delta>0, the circuits use Oδ(q(log⁡log⁡q)1/2+δ)O_\delta(q(\log\log q)^{1/2+\delta}) elementary Clifford and TT gates in total, including the gates needed to prepare and uncompute auxiliary registers. We obtain this bound by implementing OpenAI’s November 2026 integer multiplication algorithm as a uniform Boolean circuit and reusing a single phase-gradient register for the product phases and leaf rotations in the QFT recursion of Kayal, Mittal, Paraashar, and Saurabh. We also resolve their uniformity question by giving a deterministic classical algorithm that computes the rotation angle in their exact circuit to additive error 2−d2^{-d} in time polynomial in qq and dd. Finally, with intermediate measurements and unit-cost exact dyadic phase gates, we combine one product phase with a semiclassical Fourier measurement to implement the exact QFT using O(M(q)+q)O(M(q)+q) gates and measurements on every branch, where M(q)M(q) is the Boolean circuit size for multiplying two qq-bit integers.

Introduction

The quantum Fourier transform (QFT) is a basic building block of various quantum algorithms. At fixed or inverse-polynomial error, we reduce the total Clifford+TT gate count for the qq-qubit QFT to o(qlog⁡log⁡q)o(q\log\log q).

On Z/2qZ\mathbb{Z}/2^q\mathbb{Z}, the QFT FqF_q acts on each computational basis state ∣x⟩|x\rangle, 0≤x<2q0\le x<2^q, by the rule

Fq∣x⟩=2−q/2∑y=02q−1e2πixy/2q∣y⟩.F_q|x\rangle=2^{-q/2}\sum_{y=0}^{2^q-1}e^{2\pi ixy/2^q}|y\rangle.

The amplitude of ∣y⟩|y\rangle has magnitude 2−q/22^{-q/2} and phase angle 2πxy/2q2\pi xy/2^q. Cleve and Watrous used this dependence on xyxy to implement all phases between two qubit blocks with a single multiplication [1]. Ahokas, Cleve, and Hales observed that at finite accuracy it suffices to multiply the leading bits of the two blocks [2]. Kayal, Mittal, Paraashar, and Saurabh combined this truncation with exact Fourier decoding, counting each exact dyadic phase rotation as one gate [3].

At fixed or inverse-polynomial error, this recursion multiplies integers of only O(log⁡q)O(\log q) bits. Using OpenAI’s multiplier for these short products, we obtain the following bound on the total number of elementary Clifford+TT gates.

Theorem 1 (Total Clifford+TT gate count of the QFT). For every fixed δ>0\delta>0, OpenAI’s integer multiplication algorithm [4] yields a polynomial-time uniform family of unitary Clifford+TT circuits for the quantum Fourier transform FqF_q on Z/2qZ\mathbb{Z}/2^q\mathbb{Z}. For any fixed 0<ϵ<10<\epsilon<1, or for ϵ=q−c\epsilon=q^{-c} with any fixed c>0c>0, the circuit approximates FqF_q to within error ϵ\epsilon using

Oδ(q(log⁡log⁡q)1/2+δ)(1)O_{\delta}\left(q(\log\log q)^{1/2+\delta}\right) \tag*{(1)}

elementary one- and two-qubit gates in total, including all gates required to prepare and uncompute auxiliary registers.

With an O(nlog⁡n)O(n \log n) multiplier [5], the same construction gives an upper bound of O(qlog⁡log⁡q)O(q \log\log q) total gates. For 0<δ<1/20 < \delta< 1/2, Theorem 1 improves this bound by a factor of (log⁡log⁡q)1/2−δ(\log\log q)^{1/2-\delta}. 1

Section 2 implements the QFT recursion of Kayal et al. over Clifford+TT with the same asymptotic gate count. We compute the leaf rotation angles by direct enumeration and reuse one phase-gradient register across the tree. Each mm-bit product phase then costs O(M(m)+m)O(M(m)+m) gates for a Boolean multiplier of size M(m)M(m). Section 3 counts the bounded-fan-in Boolean gates for the normalized Walsh transforms and fixed-point arithmetic in OpenAI’s multiplier, implementing its fixed permutations as wiring. Substituting the resulting uniform multiplier of size M(m)=Oδ(m(log⁡m)1/2+δ)M(m)=O_\delta(m(\log m)^{1/2+\delta}) into the bound of Section 2 proves Theorem 1. Section 4 resolves the uniformity question of Kayal et al. [3 Section 5] by computing the rotation angle in their exact circuit to error 2−d2^{-d} in deterministic time polynomial in qq and dd. With intermediate measurements and unit-cost exact dyadic phases, Section 5 implements the exact QFT using one product phase, a semiclassical Fourier measurement, and a conditional shift, for O(M(q)+q)O(M(q)+q) operations per branch.

Notation and circuit model. All logarithms are base two. Our elementary gates are HH, SS, TT, CNOT, and their inverses, acting on arbitrary wires. Both Toffoli and SWAP admit constant-size decompositions over this gate set. For a circuit CC acting on qq input qubits and aa auxiliary qubits, we measure error by the operator norm of the difference of the corresponding isometries:

sup⁡∥ψ∥=1∥C(∣ψ⟩∣0a⟩)−(Fq∣ψ⟩)∣0a⟩∥≤ϵ.(2)\sup_{\lVert\psi\rVert=1}\lVert C(|\psi\rangle|0^a\rangle)-(F_q|\psi\rangle)|0^a\rangle\rVert\le\epsilon. \tag*{(2)}

By tensoring with the identity, this guarantee extends automatically to inputs entangled with an arbitrary reference system. Given a target error ϵ\epsilon, we set d=⌈log⁡(1/ϵ)⌉d=\lceil\log(1/\epsilon)\rceil. A circuit family is polynomial-time uniform if a single deterministic classical algorithm outputs the circuit description on input (1q,1d)(1^q,1^d) in time polynomial in qq and dd. In the accuracy regimes of Theorem 1 we have d=O(log⁡q)d=O(\log q), and the asymptotic bounds hold for any fixed ϵ\epsilon or fixed exponent cc.

From multiplication circuits to total gate count

The QFT circuit couples two blocks of qubits by computing the product of their integer labels, applying a phase determined by the product, and reversing the multiplication. Let M(n)M(n) count the Boolean gates used by the multiplier to compute the full 2n2n-bit product of two unsigned nn-bit integers. Each Boolean gate reads at most a fixed number of bits, independent of nn (bounded fan-in). The standard reversible simulation [3 Section 2] wires each gate’s output to a fresh bit using O(1)O(1) NOT, CNOT, and Toffoli gates. The exact Clifford+TT decomposition of Toffoli [9, Eq. (1)] thus gives a constant Clifford+TT cost per Boolean gate. We can therefore bound the quantum gate count in terms of M(n)M(n) before choosing a particular multiplier in Section 3.

Proposition 2. Suppose there is a polynomial-time uniform Boolean multiplier of size M(n)=O(n(log⁡n)α)M(n)=O(n(\log n)^\alpha) for some fixed α>0\alpha>0. Then at fixed or inverse-polynomial error, FqF_q admits a polynomial-time uniform unitary Clifford+TT circuit of total size O(q(log⁡log⁡q)α)O(q(\log\log q)^\alpha).

The QFT construction of Kayal et al.

We review the approximate QFT circuit of Kayal et al. [3 Sections 3 and 4] because our implementation needs two features of their construction. Their decoder specifies the rotation angle that we compute in Section 2.2 and the precision it requires. Their recursion bounds the size and number of the products whose Clifford+TT gate cost we analyze in Section 2.3.

The Cleve–Watrous recursion [1] splits a register into two nearly equal blocks of rr and ss qubits. Between the two recursive transforms it applies the phase e2πi(u/2r)(v/2s)e^{2\pi i(u/2^r)(v/2^s)}, where uu labels the untouched block and vv the transformed block. Following Ahokas, Cleve, and Hales [2], Kayal et al. retain only the ℓ\ell leading bits of each operand whenever r+s>2ℓr+s>2\ell. Each fraction changes by less than 2−ℓ2^{-\ell}, so the operator-norm error at that split is at most 4π2−ℓ4\pi2^{-\ell}. In general, a product phase on two operands of at most mm bits has the form

∣u,v⟩↦e2πiuv/2b∣u,v⟩,1≤b≤2m.(3)\lvert u,v\rangle\mapsto e^{2\pi iuv/2^b}\lvert u,v\rangle,\qquad1\le b\le2m. \tag*{(3)}

In the model of Kayal et al., each dyadic phase P(2πa/2b)=diag⁡(1,e2πia/2b)P(2\pi a/2^b)=\operatorname{diag}(1,e^{2\pi ia/2^b}) costs one gate. Computing uvuv, applying phases to its bb lowest bits, and uncomputing the product then costs O(M(m)+m)O(M(m)+m) gates [3 Lemma 2.1].

For our target error we take ℓ=⌈log⁡q⌉+d+9\ell=\lceil\log q\rceil+d+9. The recursion stops at blocks of width m≤2ℓm\le2\ell, called leaves. For m<64m<64 the elementary exact QFT in the dyadic gate set suffices. At larger leaves Kayal et al. implement an exact FmF_m by amplifying an approximate Fourier decoder to certainty and reversing the resulting clean circuit for Fm†F_m^\dagger [3 Lemma 3.1]. This costs O(m(log⁡m)α)O(m(\log m)^\alpha) gates when the decoder’s extra rotation is counted at unit cost. If q>2ℓq>2\ell, each leaf has width at least ℓ\ell, so there are O(q/ℓ)O(q/\ell) leaves and O(q/ℓ)O(q/\ell) splits. Summing the leaf circuits and the products on ℓ\ell-bit operands gives

O(qℓ(M(ℓ)+ℓ(log⁡ℓ)α))=O(q(log⁡ℓ)α).(4)O\left(\frac{q}{\ell}\left(M(\ell)+\ell(\log\ell)^\alpha\right)\right)=O\left(q(\log\ell)^\alpha\right). \tag*{(4)}

Tracking wire labels through the recursion leaves one final permutation of cost O(q)O(q). If q≤2ℓq\le2\ell, the circuit consists of a single leaf.

To see which angle the leaf decoder needs, let ∣ϕx⟩=Fm∣x⟩\lvert\phi_x\rangle=F_m\lvert x\rangle. For its approximate inverse W†W^\dagger, we choose WW to be the same balanced recursion on mm qubits with k=⌈log⁡m⌉+5k=\lceil\log m\rceil+5 leading bits per operand and exact Cleve–Watrous transforms on blocks of width at most 2k2k. The split errors sum to ∥W−Fm∥≤4πm2−k≤1/2\lVert W-F_m\rVert\le4\pi m2^{-k}\le1/2.

The decoder keeps ∣ϕx⟩\lvert\phi_x\rangle for checking the answer. On a second copy it shifts the Fourier label to x−rx-r, applies W†W^\dagger, and adds rr to the candidate answer, using a uniform superposition of shifts rr modulo 2m2^m. Averaging over the shifts gives the same success probability pmp_m for every input label. A flag qubit prepared in B(θm)∣0⟩=cos⁡θm∣0⟩+sin⁡θm∣1⟩B(\theta_m)\lvert0\rangle=\cos\theta_m\lvert0\rangle+\sin\theta_m\lvert1\rangle sets the probability of marking a correct answer with flag 1 to pmsin⁡2θm=1/4p_m\sin^2\theta_m=1/4. One step of amplitude amplification then recovers xx with certainty [3 Lemmas 2.4 and 3.1]. Thus

pm=2−m∑x∣⟨x∣W†Fm∣x⟩∣2,θm=arcsin⁡12pm,34≤pm≤1.(5)p_m=2^{-m}\sum_x\left|\langle x|W^\dagger F_m|x\rangle\right|^2,\qquad\theta_m=\arcsin\frac{1}{2\sqrt{p_m}},\qquad\frac{3}{4}\le p_m\le1. \tag*{(5)}

The lower bound follows because the component of W†∣ϕx⟩W^\dagger\lvert\phi_x\rangle orthogonal to ∣x⟩\lvert x\rangle has norm at most 1/21/2. The circuit copies the recovered xx to a clean register and reverses the decoder. A product phase controlled by xx erases the phases of the retained Fourier state, and Hadamards return it to ∣0m⟩\lvert0^m\rangle. Swapping the registers completes Fm†F_m^\dagger. If WW uses G(m)G(m) gates and a(m)a(m) auxiliary qubits, the full circuit uses O(G(m)+M(m)+m)O(G(m)+M(m)+m) gates and O(a(m)+M(m)+m)O(a(m)+M(m)+m) auxiliary qubits [3 Lemma 3.1].

Kayal et al. show how accurately the angle in (5) must be specified [3 Lemma 4.1 and Section 4.2]. With J=SHJ=SH, the identity JP(2θ)J†=eiθB(θ)JP(2\theta)J^\dagger=e^{i\theta}B(\theta) lets them replace each flag rotation by JP(φm)J†JP(\varphi_m)J^\dagger, where φm=2πam/2ℓ\varphi_m=2\pi a_m/2^\ell and ∣φm−2θm∣≤2π2−ℓ\lvert\varphi_m-2\theta_m\rvert\le2\pi2^{-\ell}. The scalar phases cancel between the decoder and its inverse. There are at most six rotations or adjoints per leaf, so rounding changes the full leaf unitary, including its workspace, by at most 12π2−ℓ12\pi2^{-\ell} in operator norm. This bound permits workspace reuse across leaves. Summing over at most qq leaves and at most qq splits gives a total error on clean inputs of at most 16πq2−ℓ<2−d/216\pi q2^{-\ell}<2^{-d}/2, leaving room for the phase-gradient preparation in § 2.3.

Computing the leaf rotation angles

We compute the integer ama_m for each leaf width that requires a flag rotation by directly evaluating the average in (5). At fixed or inverse-polynomial error, m≤2ℓ=O(log⁡q)m \le2\ell= O(\log q), so we can enumerate all pairs of mm-bit labels x,yx,y in time polynomial in qq.

For a given pair x,yx,y, let φW(x,y)\varphi_W(x,y) be the phase angle of ⟨y∣W∣x⟩\langle y|W|x\rangle. We compute it by adding the retained product phases at the splits to the exact Fourier phases on the terminal blocks of WW. Each split uses the input bits of the untouched block and the output bits of the transformed block. Since each matrix entry has magnitude 2−m/22^{-m/2}, the overlap for a fixed xx is

⟨x∣W†Fm∣x⟩=2−m∑y=02m−1exp⁡(i(2πxy/2m−φW(x,y))).\langle x|W^\dagger F_m|x\rangle= 2^{-m}\sum_{y=0}^{2^m-1}\exp\left(i\left(2\pi xy/2^m-\varphi_W(x,y)\right)\right).

We square the magnitude of each overlap and average over xx to obtain pmp_m. Evaluating the unit complex numbers to absolute error 2−h−O(1)2^{-h-O(1)} and accumulating the sums with O(m+h)O(m+h) bits of precision gives pmp_m to error 2−h2^{-h} in 2O(m)poly⁡(m,h)2^{O(m)}\operatorname{poly}(m,h) bit operations.

The function p↦arcsin⁡(1/(2p))p\mapsto\arcsin(1/(2\sqrt{p})) has bounded derivative on [3/4,1][3/4,1]. With h=ℓ+O(1)h=\ell+O(1), we can therefore compute θm/π\theta_m/\pi to within 2−ℓ−22^{-\ell-2}. We round this approximation to the nearest multiple am/2ℓa_m/2^\ell, adding at most 2−ℓ−12^{-\ell-1} to the error. The resulting integer ama_m meets the precision requirement of § 2.1 and specifies the phase gate P(2πam/2ℓ)P(2\pi a_m/2^\ell) and its inverse in the circuit description.

Implementing the recursive QFT over Clifford+TT

We show that the approximate QFT of Kayal et al. [3] retains its asymptotic gate count when implemented as a unitary Clifford+TT circuit. We use one phase-gradient register throughout the recursion, both for the product phases and for the leaf rotations computed in § 2.2. Nam, Su, and Maslov used such a register repeatedly in their approximate QFT [6 Section II]. At a node with short operands we add only to the corresponding high bits of the register, keeping the phase within the gate budget for that multiplication. For B≥1B\ge1, write the BB-qubit phase-gradient state as

∣γB⟩=2−B/2∑y=02B−1e−2πiy/2B∣y⟩.(6)|\gamma_B\rangle=2^{-B/2}\sum_{y=0}^{2^B-1}e^{-2\pi i y/2^B}|y\rangle. \tag*{(6)}

Lemma 2.1 (Phase-gradient implementation). For 1≤b≤B1\le b\le B, the state ∣γB⟩|\gamma_B\rangle implements a product phase (3) on mm-bit operands using O(M(m)+m)O(M(m)+m) elementary Clifford+TT gates, or a phase P(2πa/2b)P(2\pi a/2^b) using O(b)O(b) such gates. Each use preserves the ideal state. If its preparation has vector error at most η\eta up to a global phase, reusing the register throughout the circuit and reversing its preparation at the end adds at most 2η2\eta to the error on clean inputs.

Proof. Adding zz modulo 2b2^b to ∣γb⟩|\gamma_b\rangle gives the phase e2πiz/2be^{2\pi iz/2^b} by phase kickback [10 Section 7]. Writing y=2B−bh+ry=2^{B-b}h+r in (6) shows that the high bb qubits of ∣γB⟩|\gamma_B\rangle are in state ∣γb⟩|\gamma_b\rangle and factor from the rest [11 Section IV.C]. Compute uvuv reversibly, add its bb low bits to the register, and uncompute uvuv. The multiplier and its inverse cost O(M(m)+m)O(M(m)+m) gates. The ripple-carry adder of Cuccaro et al. [12] costs O(b)O(b), with b≤2mb\le2m. A single-qubit phase uses the same adder with a constant aa controlled by the data qubit.

Let VV be the dyadic circuit and AA its implementation with the gradient register. Since each addition restores its scratch qubits, A(∣ψ⟩∣γB⟩)=(V∣ψ⟩)∣γB⟩A(|\psi\rangle|\gamma_B\rangle)=(V|\psi\rangle)|\gamma_B\rangle for any joint state of the data and original workspace, also in the presence of a reference system. After aligning global phases, substituting the prepared state on the two sides changes each side by at most η\eta, by unitarity. The triangle inequality gives 2η2\eta for the entire circuit, and reversing the preparation preserves this bound. □\square

We now apply the lemma to the recursion of § 2.1. At an outer split, the two retained operands have ℓ\ell bits each and the phase denominator is 22ℓ2^{2\ell}. Inside an mm-qubit leaf, the shifts, checks, and uncomputation in the decoder use reversible Boolean logic, Hadamards, and product phases on operands of at most mm bits [3 Section 3]. Within WW and W†W^\dagger, expanding the exact Cleve–Watrous transforms [1] gives product phases at the widths of the corresponding splits. Thus every such denominator has exponent at most 2m≤4ℓ2m \le4\ell. In the elementary QFT at m<64m < 64, each controlled phase has denominator at most 2m2^m and uses a constant addition conditioned on both data bits. The remaining phases are the rounded flag rotations and their inverses, with denominator 2ℓ2^\ell. A register of width B=4ℓ+2B = 4\ell+ 2 therefore suffices for the whole tree. We keep this register and the adder scratch separate from the decoder workspace, so each reflection tests exactly the qubits prescribed by the decoder.

For a product on tt-bit operands, Lemma 2.1 charges O(M(t)+t)O(M(t) + t) gates at that node, regardless of BB. This is the cost already counted in (4). Hadamards and elementary reversible Boolean gates have constant Clifford+TT cost, and a zero test uses linearly many such gates in its register width. A leaf also uses at most six rounded flag rotations [3 Section 4.2], each costing O(ℓ)O(\ell) gates. For q>2ℓq > 2\ell there are O(q/ℓ)O(q/\ell) leaves, so these rotations add only O(q)O(q) gates. For q≤2ℓq \le2\ell the single leaf costs O(q(log⁡q)α+ℓ)O(q(\log q)^\alpha+ \ell). In both cases the ideal gradient state gives a gate count of O(q(log⁡ℓ)α)O(q(\log\ell)^\alpha) in the accuracy regimes of Proposition 2.

We prepare the gradient register once and reverse its preparation after the last use. Its jj-th most significant qubit is P(−2π/2j)H∣0⟩P(-2\pi/2^j)H|0\rangle. Set η=2−d/4\eta= 2^{-d/4} and synthesize each of these BB single-qubit operations to accuracy η/B\eta/B up to a global phase. Their matrix entries are computable to ss bits in time polynomial in B+sB+s. The finite-precision Solovay–Kitaev theorem [13 Theorem 4.3] thus gives a deterministic synthesis over HH, SS, TT and their inverses. The tensor product has vector error at most η\eta, and preparation and uncomputation together cost O(Bpolylog⁡(B/η))O(B\operatorname{polylog}(B/\eta)) gates.

At fixed or inverse-polynomial error, d=O(log⁡q)d = O(\log q) and B=O(log⁡q)B = O(\log q), so this one-time cost is poly⁡(log⁡q)=o(q)\operatorname{poly}(\log q) = o(q). Adding the 2η2\eta preparation bound to the truncation and rounding errors of Section 2.1 gives 2η+16πq2−ℓ≤2−d≤ϵ2\eta+ 16\pi q2^{-\ell} \le2^{-d} \le\epsilon. Since log⁡ℓ=log⁡log⁡q+O(1)\log\ell= \log\log q + O(1), the total Clifford+TT gate count is O(q(log⁡log⁡q)α)O(q(\log\log q)^\alpha). The uniform multiplier, the angle computation in Section 2.2, and the deterministic synthesis above generate the circuit in polynomial time in these regimes. Theorem 4 supplies a single angle algorithm for unrestricted inputs (1q,1d)(1^q,1^d). This proves Proposition 2.

Boolean circuits from fast integer multiplication

We verify that OpenAI’s multiplier satisfies the hypothesis of Proposition 2, so that we can use it in our Clifford+TT implementation of the QFT construction of Kayal et al. [3]. OpenAI proves a time bound of T(n)=Oδ(n(log⁡n)1/2+δ)T(n) = O_\delta(n(\log n)^{1/2+\delta}) on a multipate Turing machine [4 Theorem 5.1]. The general simulation of Fürer and Fischer [14] gives a Boolean circuit of size O(T(n)log⁡T(n))O(T(n)\log T(n)), adding a factor of log⁡n\log n to this upper bound. To retain the exponent 1/2+δ1/2+\delta in a polynomial-time uniform bounded-fan-in circuit, we use the multiplier’s fixed record permutations as wiring and count the Boolean gates for its word operations.

Proposition 3. For every fixed δ>0\delta> 0, the integer multiplication algorithm of [4] yields a polynomial-time uniform bounded-fan-in Boolean circuit of size Oδ(n(log⁡n)1/2+δ)O_\delta(n(\log n)^{1/2+\delta}) for the full product of two nn-bit integers.

Proof. We use the array layout of OpenAI’s algorithm to count word operations and its precision bounds to count Boolean gates per operation. The algorithm forms the convolution of the input digit arrays using two forward transforms, pointwise multiplication, and one inverse transform [4 Section 5]. It uses N=2kN = 2^k records with k=Θ(log⁡n)k = \Theta(\log n) and Nk=Θ(n)N_k = \Theta(n). Each transform has O(log⁡(2k+k))O(\log(2^k + k)) layers. A layer permutes the records, multiplies each record by a fixed coefficient, or applies a normalized Walsh transform on s=O(k/log⁡k)s = O(k/\log k) selected address bits [4 Lemma 5.2].

Boolean gate count. Choose rational parameters 1/2<ρ<11/2 < \rho< 1 and η>0\eta> 0 with ρ+η<1/2+δ\rho+ \eta< 1/2 + \delta. At the precision prescribed in [4 Lemma 4.1 and Section 5.4], each fixed-point word has Oρ(k)O_{\rho}(k) bits. For fixed nn, the record permutations are just wiring, and the circuit generator can precompute the fixed coefficients. Addition and rounding cost Oρ(k)O_{\rho}(k) gates per word. A fixed-arity Toom–Cook multiplier uses Oρ,η(k1+η)O_{\rho,\eta}(k^{1+\eta}) gates per word product [16 Section 1.3.3]. Indeed, for arity rr with log⁡r(2r−1)<1+η\log_r(2r-1) < 1+\eta, the 2r−12r-1 recursive products have width k/r+Or(1)k/r + O_r(1), and evaluation, interpolation, and division by fixed constants cost Or(k)O_r(k) gates. A complex product takes a constant number of these word operations.

It remains to count the word operations in a Walsh layer. OpenAI’s normalized Walsh recursion uses fixed integers AA, WW, σ\sigma satisfying σ/W<Aρ\sigma/W < A^\rho [15 Proposition 5.2 and Eq. (5.3)]. On a batch of WW rows with a=2Aja = 2A^j active bits per row (j≥1j \ge1), it makes σ\sigma calls of width a/Aa/A. Each call processes 1/W1/W of the parent records, and the remaining work consists of permutations and a fixed number of arithmetic operations per record [4 Lemma 4.1]. Thus the Boolean gate cost C(a)C(a) per record satisfies

C(2)=O(k1+η),C(a)≤O(k1+η)+(σ/W)C(a/A).C(2) = O(k^{1+\eta}), \qquad C(a) \le O(k^{1+\eta}) + (\sigma/W)C(a/A).

Since σ/(WAρ)<1\sigma/(WA^\rho) < 1, this gives C(a)=O(k1+ηaρ)C(a) = O(k^{1+\eta}a^\rho). For arbitrary ss, the same construction handles an odd bit with one butterfly layer and partitions the other bits into widths 2Aj2A^j using the base-AA digits of ⌊s/2⌋\lfloor s/2\rfloor. At most A−1A-1 blocks have any given width, so their ρ\rho-th powers sum to O((1+s)ρ)O((1+s)^\rho). Padding the batches at most doubles the record count [4 Lemma 4.1], so the entire layer costs O(Nk1+η(1+s)ρ)O(Nk^{1+\eta}(1+s)^\rho) gates.

Exact output and uniformity. Our word circuits implement the same fixed-point operations, with the same coefficients and rounding rules, as the tape algorithm. OpenAI’s error bound of less than 1/21/2 for each valid convolution coefficient therefore applies to our circuit [4 Section 5.4]. Rounding recovers every integer coefficient exactly. Propagating the O(k)O(k)-bit carries then gives the full 2n2n-bit product in O(Nk)O(Nk) additional gates.

Summing over the three transforms and the pointwise arithmetic gives

O(Nk1+ρ+ηlog⁡(2+k))=Oδ(n(log⁡n)1/2+δ).O(Nk^{1+\rho+\eta}\log(2+k)) = O_{\delta}\bigl(n(\log n)^{1/2+\delta}\bigr).

where Nk=Θ(n)Nk = \Theta(n) and the strict inequality ρ+η<1/2+δ\rho+ \eta< 1/2 + \delta absorbs the factor log⁡(2+k)\log(2+k). A direct multiplier covers bounded input lengths. For fixed ρ\rho, the Walsh recursion is effective, and the permutations and coefficients at the required precision are computable from nn in polynomial time [4 Lemmas 4.1 and 5.2]. On input 1n1^n, the generator can therefore enumerate the records and emit their word circuits in polynomial time. □\square

Substituting α=1/2+δ\alpha= 1/2 + \delta into Proposition 2 gives the total Clifford+TT gate bound of Theorem 1.

Uniformity of the exact and dyadic circuits

The QFT construction of Kayal et al. uses a rotation B(θq)B(\theta_q) whose angle depends on the register width qq. Without an efficient classical algorithm for computing this angle, they could not establish that their circuit families are uniform [3]. Assuming a polynomial-time uniform multiplier, they ask whether θq\theta_q can be computed classically to additive error 2−d2^{-d} in time polynomial in qq and dd [3 Section 5]. In this section we give a deterministic algorithm with this running time. It computes the mean success probability pqp_q of the approximate Fourier decoder by dynamic programming and then obtains θq\theta_q from (5).

§ 2.2 computes this average for an mm-qubit leaf by enumerating all 22m2^{2m} pairs of input and output labels. At fixed or inverse-polynomial error, each leaf of the approximate qq-qubit QFT has m=O(log⁡q)m = O(\log q), so the enumeration takes polynomial time in qq. For the rotation in the exact qq-qubit circuit, the same method would enumerate 22q2^{2q} pairs even at fixed precision.

Theorem 4. For the balanced truncated Fourier transform WW of § 2.1 on qq bits, the quantities pqp_q and θq\theta_q in (5) can be computed to additive error 2−d2^{-d} in deterministic time polynomial in qq and dd.

For a fixed input, we can sum over the output bits exactly to express the squared overlap in (5) as a product of qq cosine-squared factors. Our dynamic program averages that product over the input bits. At each position the phase retained by WW depends only on the last 2k=O(log⁡q)2k = O(\log q) input bits. The exact Fourier phase also depends on earlier bits through a single binary fraction whose contribution halves with each new bit. This decay lets us approximate the average over the remaining bits, for each suffix, by a polynomial of degree O(q+d)O(q+d) in that fraction. Working backwards from the last bit, we combine the two possible continuations for each suffix and update only O(q2)O(q^2) polynomials per position.

Proof. Number the input bits x1,…,xqx_1,\ldots,x_q from least to most significant, and assign output bit yjy_j the weight 2q−j2^{q-j}. Setting z0=0z_0=0 and zj=(zj−1+xj)/2z_j=(z_{j-1}+x_j)/2, we have

⟨y∣Fq∣x⟩=2−q/2exp⁡(2πi∑j=1qyjzj).\langle y|F_q|x\rangle= 2^{-q/2}\exp\left(2\pi i\sum_{j=1}^{q} y_j z_j\right).

For the truncated transform WW, each zj=∑i≤j2−(j−i+1)xiz_j=\sum_{i\leq j}2^{-(j-i+1)}x_i is replaced by the sum aja_j of the retained terms. Indeed, writing x=u+2rvx=u+2^r v and y=b+2say=b+2^s a at a split into r+sr+s bits gives xy/2r+s≡ua/2r+vb/2s+ub/2r+s(mod1)xy/2^{r+s}\equiv ua/2^r+vb/2^s+ub/2^{r+s}\pmod1, where the first two terms belong to the children and the last couples the untouched input with the transformed child’s output. Retaining the kk leading bits of uu and bb deletes precisely the omitted bilinear terms: at a split after bit hh, the surviving cross-terms involve inputs h−k+1,…,hh-k+1,\ldots,h and outputs h+1,…,h+kh+1,\ldots,h+k. Since exact leaves have width at most 2k2k, each aja_j depends only on jj and the suffix of w=2kw=2k input bits ending at xjx_j, with its dyadic value determined by the split tree. Summing over the independent output bits gives

∣⟨x∣W†Fq∣x⟩∣2=∏j=1qcos⁡2(π(zj−aj)).(7)\lvert\langle x|W^\dagger F_q|x\rangle\rvert^2=\prod_{j=1}^{q}\cos^2\left(\pi(z_j-a_j)\right). \tag*{(7)}

After jj input bits, let uu denote the suffix of the last ww bits (initially padded with zeros). Upon appending a bit b∈{0,1}b\in\{0,1\}, write ubu_b for the updated suffix and tb=(z+b)/2t_b=(z+b)/2. Define fq≡1f_q\equiv1 and, for 0≤j<q0\leq j<q,

fj(u,z)=12∑b=01cos⁡2(π(tb−aj+1(ub)))fj+1(ub,tb).f_j(u,z)=\frac{1}{2}\sum_{b=0}^{1}\cos^2\left(\pi(t_b-a_{j+1}(u_b))\right)f_{j+1}(u_b,t_b).

Then pq=f0(0,0)p_q=f_0(0,0), and there are 2w=O(q2)2^w=O(q^2) suffixes at each stage. To handle the continuous variable zz, fix any future bit string: after hh additional steps, the argument of its cos⁡2\cos^2 factor has coefficient 2−h2^{-h} on zz (before multiplying by π\pi), so the factor is a sum of exponentials e2πiνze^{2\pi i\nu z} with frequencies ν∈{0,±2−h}\nu\in\{0,\pm2^{-h}\} whose coefficient magnitudes sum to 1. Multiplication adds frequencies, and averaging cannot increase the ℓ1\ell_1 norm of the coefficients. Hence every fj(u,⋅)f_j(u,\cdot) admits an exponential expansion with ∣ν∣≤∑h≥12−h=1|\nu|\leq\sum_{h\geq1}2^{-h}=1 and total coefficient magnitude at most 1.

Equip power series in zz with the ℓ1\ell_1 norm of their coefficients. The tail of the exact series for fjf_j beyond degree DD has norm at most τD=∑n>D(2π)n/n!\tau_D=\sum_{n>D}(2\pi)^n/n!. Whenever D+1≥4πeD+1\geq4\pi e, successive terms decay by at least a factor of 1/21/2, and n!≥(n/e)nn!\geq(n/e)^n yields

τD≤2(2πeD+1)D+1≤2−D.\tau_D\leq2\left(\frac{2\pi e}{D+1}\right)^{D+1}\leq2^{-D}.

In each dynamic-programming step, we substitute (z+b)/2(z+b)/2 into the stored degree-DD polynomial, multiply by the cos⁡2\cos^2 factor, and truncate to degree DD. Substitution has operator norm at most 1 in the coefficient ℓ1\ell_1 norm. The cos⁡2\cos^2 multiplier is a linear combination of 1,eπiz,e−πiz1,e^{\pi i z},e^{-\pi i z} with coefficient magnitudes 1/2,1/4,1/41/2,1/4,1/4, so its power series has norm at most C=(1+eπ)/2<16C=(1+e^\pi)/2<16. Letting EjE_j be the maximum over all suffixes uu of the ℓ1\ell_1 distance between the computed polynomial and the exact series fj(u,⋅)f_j(u,\cdot), and noting that truncation to degree DD has norm 1, we obtain

Eq=0,Ej≤CEj+1+τD+λ,E_q=0,\qquad E_j\le CE_{j+1}+\tau_D+\lambda,

where λ\lambda bounds the coefficient-norm rounding error per update. Choosing

s=d+4q+⌈log⁡q⌉+4,D=max⁡{35,s},λ=2−ss=d+4q+\lceil\log q\rceil+4,\qquad D=\max\{35,s\},\qquad\lambda=2^{-s}

gives Ej≤qCq(τD+λ)≤2−d−3E_j\le qC^q(\tau_D+\lambda)\le2^{-d-3} for all jj.

In binary arithmetic, the substitution matrix has exact entries 2−n(nh)bn−h2^{-n}\binom{n}{h}b^{n-h} representable in O(D)O(D) bits, and the degree-DD coefficients of the multiplier arise from (±πi)n/n!(\pm\pi i)^n/n! times a unit phase at a known dyadic multiple of π\pi, which can be evaluated to arbitrary precision in polynomial time via Taylor summation. Direct substitution and convolution use O((D+1)2)O((D+1)^2) multiply-adds per suffix. Because the exact series has norm at most e2πe^{2\pi} by its frequency bound, whenever Ej+1≤1E_{j+1}\le1 the input polynomial has norm at most e2π+1e^{2\pi}+1. Rounding each multiply-add and each multiplier coefficient to absolute error uu therefore incurs a local error of at most C0(D+1)2uC_0(D+1)^2u for an absolute constant C0C_0 (since each substitution rounding is amplified by at most CC, each convolution rounding enters once, and coefficient perturbations have total norm at most (D+1)u(D+1)u). Taking u≤λ/[C0(D+1)2]u\le\lambda/[C_0(D+1)^2] closes the induction from j=qj=q down to 0. The algorithm runs over qq stages with O(q2)O(q^2) suffixes per stage and O(D+s+log⁡(D+1))O(D+s+\log(D+1)) bits per working number. Evaluating at z=0z=0 yields pqp_q to within 2−d−32^{-d-3}. Projecting onto [3/4,1][3/4,1] preserves this accuracy, and since

∣ddparcsin⁡12p∣=12p4p−1≤23(34≤p≤1),\left|\frac{d}{dp}\arcsin\frac{1}{2\sqrt{p}}\right|=\frac{1}{2p\sqrt{4p-1}}\le\frac{\sqrt{2}}{3}\qquad\left(\frac{3}{4}\le p\le1\right),

evaluating the arcsine to absolute error 2−d−22^{-d-2} determines θq\theta_q to within 2−d2^{-d}.

We remark that Mosca and Zalka evaluated the mean success probability of their Fourier decoder using power series and power sums [17 Section 4.1], and that an alternative polynomial-time algorithm for (5) can be obtained via matrix product operators (MPOs). Specifically, Chen and Lindsey [18 Theorem 4] approximate the unnormalized bit-reversed Fourier matrix with bond dimension K+1K+1 and maximum entrywise error (q−1)ΛKq−2EK(q-1)\Lambda_K^{q-2}E_K, where ΛK=O(log⁡(K+1))\Lambda_K=O(\log(K+1)) and EK≤(C1/K)KE_K\le(C_1/K)^K for an absolute constant C1C_1 and sufficiently large KK. Conjugating their cores for the positive Fourier sign and setting K=⌈C2(q+d+1)2⌉K=\lceil C_2(q+d+1)^2\rceil for a sufficiently large constant C2C_2 bounds the entrywise error by η=2−d−4\eta=2^{-d-4}. In the same bit order, the unnormalized WW admits an exact MPO of bond dimension 2w2^w, whose transitions append xjx_j to the suffix and emit e2πiyjaje^{2\pi i y_j a_j}. Writing N=2qN=2^q, F∘=NFqF^\circ=\sqrt{N}F_q, and W∘=NWW^\circ=\sqrt{N}W, we have

pq=N−3∑x,y,zFyx∘ Wyx∘‾ Fzx∘‾ Wzx∘.p_q=N^{-3}\sum_{x,y,z}F^\circ_{yx}\,\overline{W^\circ_{yx}}\,\overline{F^\circ_{zx}}\,W^\circ_{zx}.

Since each normalized column of FqF_q is perturbed by at most η\eta in Euclidean norm, the squared overlaps change by at most 2η+η22\eta+\eta^2. Contracting the four MPOs site by site keeps the bond dimension polynomial; each transfer matrix has polynomially many entries per row, each of magnitude poly⁡(q+d+2)\operatorname{poly}(q+d+2) (as each Fourier core entry is bounded by 1+ΛK1+\Lambda_K). Over qq sites, rounding errors amplify by at most (q+d+2)O(q)(q+d+2)^{O(q)}, so d+O(qlog⁡(q+d+2))d+O(q\log(q+d+2)) fractional bits suffice. Finally, the core entries are built from phases and Lagrange cardinal polynomials on a Chebyshev–Lobatto grid whose distinct nodes are separated by Ω(K−2)\Omega(K^{-2}), so each cardinal polynomial can be evaluated to the required precision with O(Klog⁡(K+1))O(K\log(K+1)) additional guard bits.

Corollary 5. Under the multiplication hypothesis of Proposition 2, the exact unitary circuit of Kayal et al. [3] has a polynomial-time uniform description and uses O(q(log⁡q)α)O(q(\log q)^\alpha) gates, counting dyadic phases and the exact rotation B(θq)B(\theta_q) at unit cost. For any 0<ϵ<10<\epsilon<1, their approximate circuit admits a uniform implementation over Hadamard, CNOT, and dyadic phases using O(q(log⁡L)α)O(q(\log L)^\alpha)

gates and O(L(log⁡L)α)O(L(\log L)^\alpha) auxiliary qubits, where L=log⁡(q/ϵ)L = \log(q/\epsilon). By Proposition 3, both bounds hold with α=1/2+δ\alpha= 1/2 + \delta.

Proof. By Theorem 4, the rotation B(θq)B(\theta_q) is specified by a polynomial-time classical routine evaluating θq\theta_q to arbitrary binary precision, and acts at unit cost in the exact model. The constant-error circuit WW uses O(q(log⁡log⁡q)α+1)O(q(\log\log q)^{\alpha+1}) gates: its O(q/k)O(q/k) leaves of width O(k)O(k) use the exact Cleve–Watrous recursion at cost O(k(log⁡k)α+1)O(k(\log k)^{\alpha+1}) each, while its truncated product phases cost O(M(k)+k)O(M(k)+k) each. Applying the leaf decoder of § 2.1 at width qq gives clean circuits for FqF_q and Fq†F_q^\dagger with O(M(q)+q)O(M(q)+q) gates beyond the constant number of calls to WW and W†W^\dagger. Since M(q)=O(q(log⁡q)α)M(q)=O(q(\log q)^\alpha) and (log⁡log⁡q)α+1=o((log⁡q)α)(\log\log q)^{\alpha+1}=o((\log q)^\alpha), the total is O(q(log⁡q)α)O(q(\log q)^\alpha) gates.

For the approximate circuit, we take ℓ\ell as in § 2 and compute each leaf angle via Theorem 4. The full-workspace error bound in § 2.1 allows sequential calls to reuse the workspace of a single leaf or multiplication. Together with (4), the bounds in that section establish the claim for q>2ℓq>2\ell. For q≤2ℓq\le2\ell, a single rounded leaf costs O(q(log⁡q)α)O(q(\log q)^\alpha) and satisfies both bounds. The classical generator runs in time polynomial in qq and dd.

Exact Fourier transformation with intermediate measurements

§ 4 computes the angle of the special rotation B(θq)B(\theta_q) in the exact QFT circuit of Kayal et al. [3]. With intermediate measurements and classical feedforward, we can bypass this rotation and implement FqF_q exactly using one product phase. We count each elementary gate and each binary measurement at unit cost. The gate set includes exact dyadic phases whose angles can be chosen in polynomial time from earlier measurement outcomes.

Proposition 6. A uniform Boolean multiplier of size M(q)M(q) yields a uniform exact adaptive circuit for FqF_q using O(M(q)+q)O(M(q)+q) quantum gates and measurements on every branch. In particular, the multiplier of Proposition 3 gives Oδ(q(log⁡q)1/2+δ)O_\delta(q(\log q)^{1/2+\delta}) operations in this model.

Proof. We use Hall’s one-dit teleportation identity [20 Fig. 1], representing each NN-dimensional system by qq qubits, where N=2qN=2^q. Write ω=e2πi/N\omega=e^{2\pi i/N} and let ∣ψ⟩=∑xax∣x⟩\lvert\psi\rangle=\sum_x a_x\lvert x\rangle be the input. Prepare a second register in the uniform superposition with qq Hadamards. A single product phase (3) between the registers then gives

1N∑x,yaxωxy∣x⟩∣y⟩=∑xax∣x⟩∣ϕx⟩,∣ϕx⟩=Fq∣x⟩.\frac{1}{\sqrt{N}}\sum_{x,y}a_x\omega^{xy}\lvert x\rangle\lvert y\rangle=\sum_x a_x\lvert x\rangle\lvert\phi_x\rangle,\qquad\lvert\phi_x\rangle=F_q\lvert x\rangle.

For each input label xx, this one operation supplies the phases for every output label yy. Computing xyxy, applying dyadic phases to its low qq bits, and uncomputing the product costs O(M(q)+q)O(M(q)+q) gates [3 Lemma 2.1].

To erase the input label while preserving the superposition, measure the first register in the Fourier basis using the semiclassical procedure of Griffiths and Niu [19]. For each bit, the earlier outcomes determine a single dyadic phase, followed by a Hadamard and a binary measurement. This uses O(q)O(q) single-qubit gates and qq measurements on every branch. For outcome jj, the overlap ⟨ϕj∣x⟩=N−1/2ω−jx\langle\phi_j\vert x\rangle=N^{-1/2}\omega^{-jx} leaves the second register in the unnormalized state N−1/2∑xaxω−jx∣ϕx⟩N^{-1/2}\sum_x a_x\omega^{-jx}\lvert\phi_x\rangle.

Subtracting jj modulo NN from the second register multiplies ∣ϕx⟩\lvert\phi_x\rangle by ωjx\omega^{jx} and cancels the measurement phase. The corrected branch operator is therefore N−1/2FqN^{-1/2}F_q, so every outcome gives the exact transform even for an input entangled with a reference. The subtraction of the known jj costs O(q)O(q) gates [12]. Preparation, measurement, and correction thus add only O(q)O(q) operations to the single product phase on each branch, giving the claimed O(M(q)+q)O(M(q)+q) total. The circuit is uniform because the multiplier has a polynomial-time generator and the measurement angles and correction are computable from the outcome bits in polynomial time.

Open questions. Can an exact unitary circuit over Hadamard, CNOT, and dyadic phases alone match the O(M(q)+q)O(M(q)+q) size bound of Proposition 6? At fixed accuracy, Theorem 1 leaves open whether the quantum Fourier transform admits polynomial-time uniform unitary Clifford+TT circuits of linear total size O(q)O(q).

Disclosure of AI usage

GPT-6.2 Astra carried out most of the calculations and developed most of the proofs in this paper. Zhou Kangyun proposed applying OpenAI’s new integer multiplication algorithm to the quantum Fourier transform and reviewed the manuscript for clarity and mathematical correctness.

References

  1. [1]R. Cleve and J. Watrous. Fast parallel circuits for the quantum Fourier transform. In Proc. 41st IEEE Symposium on Foundations of Computer Science, pages 526–536, 2000. arXiv:quant-ph/0006004.
  2. [2]G. Ahokas, R. Cleve, and I. Hales. The complexity of quantum Fourier transforms and integer multiplication. ERATO conference abstract, 2003. See G. Ahokas, Improved algorithms for approximate quantum Fourier transforms and sparse Hamiltonian simulations, M.Sc. thesis, University of Calgary, 2004, Section 3.1.
  3. [3]C. Kayal, R. Mittal, M. Paraashar, and N. Saurabh. Improved exact and approximate quantum Fourier transforms from multiplication, 2026. arXiv:2611.06341v1.arxiv.org/abs/2611.06341
  4. [4]OpenAI. The logarithmic exponent of integer multiplication on tapes. November 24, 2026.hub.valency.io/works/W_r5fdwsz9
  5. [5]D. Harvey and J. van der Hoeven. Integer multiplication in time O(n log n). Annals of Mathematics, 193:563–617, 2021. doi:10.4007/annals.2021.193.2.4.DOI
  6. [6]Y. Nam, Y. Su, and D. Maslov. Approximate quantum Fourier transform with O(n log n) T gates. npj Quantum Information, 6:26, 2020. arXiv:1803.04933.DOI
  7. [7]B. Park and D. Ahn. Reducing T-count and T-depth in approximate quantum Fourier transform circuits. Scientific Reports, 15:37199, 2025. doi:10.1038/s41598-025-21087-2.DOI
  8. [8]C. Zhu, Y.-A. Chen, Z. Liu, Z. Yu, Z. Shen, and X. Wang. Amortized stabilizer Rényi entropy of quantum dynamics, 2026. arXiv:2409.06659v2.arxiv.org/abs/2409.06659
  9. [10]R. Cleve, A. Ekert, C. Macchiavello, and M. Mosca. Quantum algorithms revisited. Proceedings of the Royal Society of London A, 454:339–354, 1998. arXiv:quant-ph/9708016.DOI
  10. [11]A. Wu, L. Lu, P. P. Ng, J. Yin, J. Leng, and M. Guo. Shared phase arithmetic for parallel quantum rotations, 2026. arXiv:2609.36574.arxiv.org/abs/2609.36574
  11. [12]S. A. Cuccaro, T. G. Draper, S. A. Kutin, and D. P. Moulton. A new quantum ripple-carry addition circuit, 2004. arXiv:quant-ph/0410184.DOI
  12. [13]D. van Melkebeek and T. Watson. Time-space efficient simulations of quantum computations. Theory of Computing, 8:1–51, 2012.
  13. [14]N. Pippenger and M. J. Fischer. Relations among complexity measures. Journal of the ACM, 26(2):361–381, 1979. doi:10.1145/322123.322138.DOI
  14. [15]OpenAI. The logarithmic exponent of finite Fourier transforms. November 24, 2026.
  15. [16]R. P. Brent and P. Zimmermann. Modern Computer Arithmetic. Cambridge University Press, 2010, Section 1.3.3.DOI
  16. [17]M. Mosca and C. Zalka. Exact quantum Fourier transforms and discrete logarithm algorithms, 2003. arXiv:quant-ph/0301093.DOI
  17. [18]J. Chen and M. Lindsey. Direct interpolative construction of the discrete Fourier transform as a matrix product operator, 2024. arXiv:2404.03182.DOI
  18. [19]R. B. Griffiths and C.-S. Niu. Semiclassical Fourier transform for quantum computation. Physical Review Letters, 76:3228–3231, 1996. arXiv:quant-ph/9511007.DOI
  19. [20]W. Hall. Cluster state quantum computation for many-level systems. Quantum Information and Computation, 7:184–208, 2007. arXiv:quant-ph/0512130.DOI

Paper details

vlnc:W_pnpfpcmh
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 2

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

OpenAI ChatGPT 6.2 astra

View statement
Looking for related papers…
Contents