Cancellation occurs when different complex numbers in an exponential sum have directions that reduce the absolute value of their sum. For example, the orthogonality of roots of unity makes for every integer , despite all terms having absolute value one.
Discrete Fourier transform Created 2026-09-24 Updated 2026-10-18
The discrete Fourier transform turns a finite list of samples into the weights of its discrete Fourier modes. The goal is to reveal a simple oscillatory recipe hidden in complicated-looking data, while retaining enough information to reconstruct every sample exactly. In signal processing, those weights identify sampled frequencies and wave phases; in numerical analysis, they simplify circular convolution and the discrete sine transform Poisson solver.
Start with eight real samples, indexed by :
Writing , the actual list is
The discrete Fourier transform recovers the recipe as
The constant contributes ; the cosine contributes ; the half-sized sine contributes and . All other coefficients vanish exactly. The imaginary coefficients carry the sine's wave phase, which a plot of absolute values alone would hide.
Figure 1.
Eight samples become a constant, a cosine pair, and a sine pair in the discrete Fourier transform
. Details.
Precisely, for a positive integer and a vector , the forward discrete Fourier transform and inverse discrete Fourier transform used here are
Thus the forward exponent has a minus sign and no scale factor; the inverse exponent has a plus sign and the factor . The coefficients in the reconstruction are , rather than . In the example, , the pair reconstructs the cosine, and the pair reconstructs the half-sized sine. These conventions agree with the scaled Fourier coefficients in MIT's authored notes.[ref]
The proof idea is orthogonality of roots of unity: for integers ,
Distinct discrete Fourier modes cancel in this finite geometric series. Substituting the forward formula into the inverse discrete Fourier transform leaves only the desired sample. The same orthogonality makes the normalized discrete Fourier modes an orthonormal basis and gives the discrete Parseval identity, in the present convention,
For the eight-sample example, direct squaring gives , while , so . This identity preserves the squared L2 norm after accounting for normalization. The existing discrete Parseval identity instead scales the forward discrete Fourier transform by , producing a unitary matrix and equal squared L2 norms without the factor .
For real input, discrete Fourier conjugate symmetry pairs positive and negative frequencies. The label is a residue modulo : when represents the same discrete Fourier mode as , since . It therefore represents negative frequency cycles per sample. If samples are seconds apart, the corresponding signed frequency is cycles per second. Similarly, index represents , while index is its own negative modulo .
The discrete Fourier transform is an invertible map between two finite vectors. The continuous Fourier transform instead describes a function on the real line by an integral over a continuous frequency variable. A finite list of samples does not determine the full continuous frequency spectrum: aliasing of discrete Fourier modes already supplies distinct waveforms with identical observations. Applying the inverse formula at arbitrary integer indices gives the periodic extension of a finite sequence, repeating the recorded block every samples. This is a property of that representation, rather than evidence that the physical signal repeats beyond the recording. Laurent Demanet's MIT notes place the discrete Fourier transform alongside the continuous Fourier transform and Fourier series to explain the role of sampling and repetition.[ref]
The beauty is that a change of basis exposes cancellation and structure without losing data. Direct evaluation needs sums of terms; a Fast Fourier transform computes the same discrete Fourier transform with far less work. Computational speed and the mathematical meaning of the coefficients are separate questions.
For the phase gate , apply powers to a uniform quantum superposition on qubits. Binary positional weights multiply the phases into on basis vector . The inverse quantum Fourier transform returns exactly, by orthogonality of roots of unity. Preparing the powers by repeated applications uses copies of ; this does not claim a number of gate calls polynomial in . If is odd, its powers generate the entire set of dyadic phase gates because has a modular inverse modulo .
For the specified positive-exponent discrete Fourier transform, the inverse discrete Fourier transforms have negative exponents:
Every sum runs over , . Indeed, orthogonality of roots of unity gives
so substituting the forward discrete Fourier transform into either proposed inverse recovers the original operator. Taking Hermitian conjugates supplies the inverse formulas for the creation operators.
Multiplying the inverse discrete Fourier transforms gives the local number operator combination
This local expression includes off-diagonal momentum terms. Only after summing over sites does orthogonality of roots of unity give
In a physical fixed- state the first boxed operator acts as at every site, by the local spin constraint in the Schwinger boson representation.
Let be a unitary operator and suppose initially that the target is an eigenstate with , . Use control qubits, so . Hadamard gates prepare the uniform superposition . For each binary control position , apply the controlled unitary gate . The resulting state is
Apply the inverse quantum Fourier transform, with convention , and measure the control. The exact amplitude and probability are
For an exactly representable phase , orthogonality of roots of unity makes the outcome certain. Otherwise the finite geometric series gives
The estimate is , with phases interpreted modulo one.
To prove an error bound, choose a nearest label to on the circular grid and put in the interval . For , concavity of sine on gives , while . Therefore the nearest-integer success bound for quantum phase estimation is
Here . At an exact grid point the probability is one. If two nearest labels tie, either one separately has the displayed lower bound.
For high confidence one can prove a stronger quantum phase estimation tail bound. Let be the centered distance between and , chosen with . The denominator estimate implies away from the exact-phase case. A label at circular integer distance from has , and there are at most two labels at each such distance. For , summing the tails gives
On the complementary event the circular phase error is at most . Thus, for desired bits of accuracy, take with and to obtain
Taking makes the right side at most . This adds only control qubits. Efficient QFT is not by itself a guarantee of efficient controlled powers of an arbitrary : implementing them by repeated oracle calls uses calls. The modular-arithmetic application has efficient powers, as follows.
Assume and , and let be the multiplicative order of modulo . Define the unitary operator on , and extend it as the identity on unused computational-basis labels of the binary register. Coprimality makes multiplication a permutation, so this extension really is unitary. The orbit of consists of the distinct states . Its modular multiplication eigenstates are
The last relation follows by shifting the index cyclically; orthogonality follows from the finite Fourier sum. We do not need to know to prepare one of these eigenstates: the readily prepared target obeys
Running quantum phase estimation on this state produces the mixture of the eigenphase distributions, each with weight , because the target eigenstates are orthogonal. Thus it samples a uniformly random phase label and estimates with the bounds just proved. Equivalently the state before the inverse QFT is , which is obtained by quantum modular exponentiation directly.
The controlled power multiplies by , whose constant is computed by repeated squaring. Under the assumed efficient modular exponentiation, these controlled multiplications and the QFT use a number of gates polynomial in the register lengths. Taking requires only phase qubits. The nearest-label event has probability at least and yields an estimate within of . Since , continued-fraction recovery in quantum order finding then identifies the reduced fraction . The denominator is , not necessarily : when and are coprime it is the desired order, and when they are not it is only a divisor. One may test candidate denominators using modular exponentiation and repeat with fresh samples; denominators from successful samples can also be combined by a least common multiple. The probability of a nearest-label sample with coprime to is at least . These qualifications explain exactly what the phase estimate yields without falsely assuming that the unknown order or an eigenstate was available at the start.
A suitable large sieve statement is the following. If are separated modulo one by at least and is supported on consecutive integers, then
The sharper classical constant also suffices, but is unnecessary for the requested bound. This is the exponential-sum large sieve.
Put , , and . By the orthogonality of roots of unity,
At most of these residue counts are nonzero. The Cauchy-Schwarz inequality gives , and the frequency contributes exactly . Thus, if ,
If for some prime, is empty and the result is immediate.
All fractions , , , are distinct reduced fractions. Their circular spacing is at least , because two distinct fractions of these denominators differ modulo one by at least . Apply the large sieve with and , and sum the preceding lower bounds:
For and a positive sieve denominator, division proves
When the denominator is zero this asserts no restriction; that degenerate case is interpreted as a vacuous bound.
For the least-nonresidue application, first establish the positive density of power-smooth integers. Fix , with an integer , and let tend to infinity. Choose ordered primes, with repetitions allowed, in the interval
Their product satisfies . Every number has , so is -smooth. By partial summation of the Prime number theorem, or the Mertens theorem for reciprocal primes,
The number of ordered representations is at least
because for .
This representation count must not be confused with a count of distinct integers. A number at most has at most prime factors in that interval, counted with multiplicity. There are therefore only a bounded number, depending on , of ordered -tuples which can occur as divisors of it; the cofactor is then fixed. Dividing by this bounded multiplicity proves
for a fixed and all sufficiently large .
Now work on a dyadic prime interval and let be the primes there with . Take and , so . Let be the -smooth integers at most . The density lemma gives for an absolute .
For each , every prime factor of a member of is at most and is smaller than . Hence it is a nonzero quadratic residue modulo . Multiplicativity of the Legendre symbol makes every member of a nonzero quadratic residue modulo . It therefore avoids all quadratic-nonresidue classes. In the sieve inequality set at exceptional primes and zero at every other prime up to . For odd , , so
Thus each dyadic interval has at most exceptional primes. The finitely many small intervals can be absorbed into this absolute bound. Summing the intervals up to proves the large-sieve logarithmic exceptional-prime bound for least quadratic nonresidues:
The least nonresidue is normally defined for odd primes; any convention at the prime two changes the count by at most one.
The Von Mangoldt function is supported on prime powers:
Write . A convenient form of the Siegel–Walfisz theorem is: for every fixed , uniformly for and ,
The implied constant can be ineffective because of possible Siegel zeros; the modulus bound is logarithmic, not an unrestricted uniformity assertion.
Apply this to modulus five and separate the reduced residue classes:
The last sum is : only powers of five can contribute in the zero residue class. By the orthogonality of roots of unity,
since two is coprime to five and the sum including vanishes. As , the Siegel–Walfisz theorem yields
The sum is complex-valued, but the displayed error controls its absolute difference from the real main term.
The inverse quantum Fourier transform in the original PDF has matrix elements multiplying . The converted TeX incorrectly repeats in the bra; using the actual PDF operator,
If , every summand of the inner sum is one, so it equals . If , let . Then and , and the finite geometric series gives . This is orthogonality of roots of unity. Hence
A quantum measurement in the computational basis consequently returns the integer with probability one.
For coefficients supported on an interval of length , write and . The variance form of the large sieve states
The constant is absolute. One may take the explicit right side , by orthogonality of roots of unity and the exponential-sum large sieve proved in Question 2.
Take , , and the indicator function of the -smooth numbers up to . Applying the given smooth-number density with parameter gives
with a harmless adjustment of the constant for integer endpoints. If an odd prime has least quadratic nonresidue , then : a quadratic nonresidue always occurs among . Every prime factor of every selected smooth number is thus a nonzero quadratic residue modulo . By the multiplicativity of the Legendre symbol, every selected number is a nonzero quadratic residue modulo .
There are nonzero quadratic nonresidue classes, and on all of them. Their contribution to the variance is at least
If denotes the number of exceptional primes, the variance form of the large sieve, with , yields . Consequently
This is the bounded exceptional primes for least quadratic nonresidues argument. Using an interval of length is what matches the term; an interval of length would not give a bounded exceptional set.
A sufficient absolute constant is . The proof is a density increment argument for a cap set over the finite field .
First work in , write , and let be the indicator function of a cap set of subset density . All expectations below are uniform. In characteristic three, a solution of having two equal entries has all three equal. Consequently the normalized linear configuration count is
Set and use Fourier analysis on a finite abelian group with
The orthogonality of roots of unity and the Parseval identity on a finite group give
If , then for a cap set and
Thus some nonzero finite abelian Fourier coefficient has magnitude at least .
For this , let be the subset density of on the affine subspace , for . These three affine subspaces have equal cardinality, and
Among three directions separated by , one makes an angle at most with any given complex number. Hence . Restricting to that hyperplane gives the hyperplane density increment for cap sets
Translate the affine subspace to its underlying vector space. This preserves the cap set property: translating a triple by changes its sum by . The same argument can therefore be iterated.
For completeness, the density increment iteration gives an explicit uniform bound. If , the hypothesis is impossible. Suppose and a cap set has . For every integer , its remaining dimension is at least , and its current subset density is at least . Thus
The last inequality holds at and remains true as increases: the successive ratio of is for . At each step, as long as the subset density remains at most one,
After steps this would imply
a contradiction. The endpoint already contradicts the cap set property in positive dimension. This proves the claimed existence of three distinct points and the Meshulam bound for cap sets.
Let . Using the convention
the discrete Fourier transform of the supplied sequence follows from the binomial theorem:
The orthogonality of roots of unity gives
Since both lie between zero and , it follows that
For coefficients supported on an interval of consecutive integers, set and . Then
The orthogonality of roots of unity gives . The distinct fractions have circular spacing at least ; now apply the exponential-sum large sieve.