Skip to content

Fast Fourier Transform

The fast Fourier transform is an algorithm for computing discrete Fourier transforms efficiently. In numerical quantum mechanics, FFTs are used to move between position and momentum grids, compute spectral derivatives, apply kinetic-energy phases, analyze wave packets, and implement split-operator time evolution.

The FFT is not a new Fourier convention. It is a fast way to compute a finite transform. The physics still depends on the chosen grid, normalization, sign convention, and mapping between array indices and physical momenta.

For NN complex samples ψj\psi_j, one common computational convention is

ψ^m=∑j=0N−1ψje−2πijm/N,m=0,…,N−1,\widehat\psi_m = \sum_{j=0}^{N-1} \psi_j e^{-2\pi i jm/N}, \qquad m=0,\dots,N-1,

with inverse

ψj=1N∑m=0N−1ψ^me2πijm/N.\psi_j = \frac{1}{N} \sum_{m=0}^{N-1} \widehat\psi_m e^{2\pi i jm/N}.

Many libraries use this convention or a close variant. Some put the factor 1/N1/N on the forward transform, and some use a unitary factor 1/N1/\sqrt N in both directions. Always check the convention before interpreting amplitudes physically.

The continuous position-momentum convention used elsewhere is reviewed in Fourier Transform Conventions.

Quantum Fourier Transform applies a unitary discrete transform to amplitudes of a quantum register; unlike this classical FFT, it does not accept and return an explicitly readable array of all NN coefficients. The shared matrix does not make the two input-output contracts interchangeable.

A direct discrete Fourier transform computes NN output numbers, each as a sum over NN inputs, so it costs order N2N^2 operations.

The FFT exploits the periodic structure of the roots of unity. For many values of NN, especially powers of two or products of small primes, the transform can be decomposed into smaller transforms. This reduces the cost to order

Nlog⁡N.N\log N.

That difference is decisive for wave packets, spectral methods, and multidimensional grids. The FFT is why Fourier-grid methods can apply kinetic energy in momentum space without forming a dense derivative matrix.

Take a periodic interval of length LL with

xj=x0+jΔx,Δx=LN,j=0,…,N−1.x_j = x_0+j\Delta x, \qquad \Delta x = \frac{L}{N}, \qquad j=0,\dots,N-1.

Do not include both endpoints x0x_0 and x0+Lx_0+L as distinct grid points. A periodic grid identifies them.

The corresponding wave numbers are spaced by

Δk=2πL.\Delta k = \frac{2\pi}{L}.

For the DFT ordering above, the physical wave number associated with index mm is commonly read as

km=2πL{m,0≤m<N/2,N/2,m=N/2 for even N,m−N,N/2<m<N.k_m = \frac{2\pi}{L} \begin{cases} m, & 0\le m\lt N/2,\\ N/2, & m=N/2\ \text{for even }N,\\ m-N, & N/2\lt m\lt N. \end{cases}

The m=N/2m=N/2 Nyquist mode for even NN needs convention care. Many libraries store it as a single real-frequency boundary mode for real-input transforms. For complex quantum wavefunctions, keep the full complex convention explicit.

Momentum values are

pm=ℏkm.p_m = \hbar k_m.

This is the finite periodic-box version of the position-momentum Fourier relation.

Suppose ψj≈ψ(xj)\psi_j\approx\psi(x_j) and the continuum state is normalized by

∫0L∣ψ(x)∣2 dx=1.\int_0^L \lvert\psi(x)\rvert^2\,dx = 1.

The grid norm is

∑j=0N−1∣ψj∣2Δx≈1.\sum_{j=0}^{N-1} \lvert\psi_j\rvert^2 \Delta x \approx 1.

If the periodic basis functions are L−1/2eikmxL^{-1/2}e^{ik_mx}, then the Fourier-series coefficient is approximated by

cm≈ΔxL∑j=0N−1ψje−ikmxj.c_m \approx \frac{\Delta x}{\sqrt L} \sum_{j=0}^{N-1} \psi_j e^{-ik_mx_j}.

With the computational DFT, this is a scaled version of ψ^m\widehat\psi_m. The scale matters: raw FFT output is not automatically a normalized momentum-space wavefunction.

Discrete Parseval consistency should give

∑m∣cm∣2≈∑j∣ψj∣2Δx.\sum_m \lvert c_m\rvert^2 \approx \sum_j \lvert\psi_j\rvert^2\Delta x.

If this check fails, the likely causes are a missing factor of Δx\Delta x, a misplaced factor of NN, or a sign convention mismatch.

On a periodic grid, differentiation is simple in Fourier space. If

ψ(x)≈∑mcmeikmx,\psi(x) \approx \sum_m c_m e^{ik_mx},

then

dψdx≈∑mikmcmeikmx,\frac{d\psi}{dx} \approx \sum_m ik_m c_m e^{ik_mx},

and

d2ψdx2≈∑m(−km2)cmeikmx.\frac{d^2\psi}{dx^2} \approx \sum_m (-k_m^2)c_m e^{ik_mx}.

Thus the kinetic-energy operator for a free particle is diagonal in the Fourier grid:

Tm=ℏ2km22mphys.T_m = \frac{\hbar^2k_m^2}{2m_{\mathrm{phys}}}.

This is the computational version of the momentum-space simplification described in Momentum Representation and Spectral Methods.

For a Hamiltonian

H=T(p)+V(x),H = T(p)+V(x),

the potential is diagonal in position space and the kinetic energy is diagonal in momentum space. A standard second-order split step is

ψ(t+Δt)≈e−iVΔt/(2ℏ)F−1e−iTΔt/ℏFe−iVΔt/(2ℏ)ψ(t).\psi(t+\Delta t) \approx e^{-iV\Delta t/(2\hbar)} \mathcal F^{-1} e^{-iT\Delta t/\hbar} \mathcal F e^{-iV\Delta t/(2\hbar)} \psi(t).

Here F\mathcal F denotes the discrete Fourier transform with the chosen normalization. The two FFTs move the state to momentum space and back.

This formula is powerful because it avoids forming dense matrices. Its accuracy still depends on time-step size, operator noncommutativity, grid resolution, and boundary periodicity. The time-step issues are introduced in Time-Stepping Methods.

The DFT represents periodic data. A wave packet leaving the right edge of the interval reappears at the left edge unless the physical model, boundary treatment, or domain size prevents it.

This wraparound is not a small numerical detail. It is the boundary condition of the Fourier grid. For free-particle wave packets, choose a domain large enough that the packet does not hit the boundary during the simulated time, or use a method designed for open boundaries.

Endpoint mismatch also matters. If a nonperiodic function is placed on a Fourier grid, the periodic extension has a jump or kink. Fourier coefficients then decay slowly, spectral derivatives become contaminated, and Gibbs oscillations may appear.

Products in position space become convolutions in Fourier space. Multiplying V(x)ψ(x)V(x)\psi(x) can create modes beyond the represented cutoff. Those modes can fold back into the resolved band as aliasing.

Aliasing is especially visible in nonlinear equations, but it also appears in linear quantum mechanics when the potential is rough or under-resolved. Diagnostics include increasing NN, smoothing only with physical justification, comparing with finite differences, and monitoring high-frequency Fourier coefficients.

Before trusting an FFT-based quantum calculation, record:

  • the physical interval length LL and grid spacing Δx\Delta x;
  • whether endpoints are repeated;
  • the DFT sign and normalization convention;
  • the ordering of positive, negative, and Nyquist modes;
  • the mapping pm=ℏkmp_m=\hbar k_m;
  • the discrete norm check used in position and momentum space;
  • whether the wavefunction remains negligible near periodic boundaries;
  • the treatment of aliasing and high-frequency modes;
  • the time-step and split-operator error checks.

These details determine the physical meaning of the array.

  • Treating raw FFT output as a continuum momentum wavefunction without scaling.
  • Repeating both endpoints on a periodic grid.
  • Forgetting that FFT frequencies wrap from positive to negative values.
  • Mixing library DFT signs with the physics Fourier convention.
  • Ignoring the Nyquist mode for even NN.
  • Applying Fourier differentiation to a nonperiodic function without checking endpoint mismatch.
  • Letting a wave packet wrap around the periodic box and interpreting it as physical recurrence.
  • Assuming split-operator error is only a Fourier-grid issue rather than also a time-step issue.
  • Confusing wave number kk with physical momentum p=ℏkp=\hbar k.
  • J. W. Cooley and J. W. Tukey, “An algorithm for the machine calculation of complex Fourier series”, Mathematics of Computation 19, 297-301, 1965.
  • M. Frigo and S. G. Johnson, “The design and implementation of FFTW3”, Proceedings of the IEEE 93, 216-231, 2005.
  • L. N. Trefethen, Spectral Methods in MATLAB, SIAM, 2000.
  • J. P. Boyd, Chebyshev and Fourier Spectral Methods, 2nd ed., Dover, 2001.
  • J. M. Thijssen, Computational Physics, 2nd ed., Cambridge University Press, 2007.
  • D. J. Tannor, Introduction to Quantum Mechanics: A Time-Dependent Perspective, University Science Books, 2007.
  1. For a periodic interval of length LL with NN grid points, derive the wave-number spacing Δk\Delta k.
Solution

Periodic modes satisfy

eik(x+L)=eikx.e^{ik(x+L)} = e^{ikx}.

Thus eikL=1e^{ikL}=1, so kL=2πnkL=2\pi n for integer nn. Adjacent allowed wave numbers differ by

Δk=2πL.\Delta k = \frac{2\pi}{L}.
  1. Explain why the endpoint x0+Lx_0+L should not be stored as an additional point on a periodic FFT grid.
Solution

On a periodic interval, x0x_0 and x0+Lx_0+L represent the same physical point. Storing both duplicates one point, breaks the uniform NN-point periodic sampling assumed by the DFT, and changes the implied spacing and normalization.

  1. A computational DFT uses no normalization on the forward transform and 1/N1/N on the inverse. Why must a physical Fourier coefficient include factors involving Δx\Delta x or LL?
Solution

The continuum coefficient is an integral against a normalized basis function. A grid approximation to the integral contains a quadrature factor Δx\Delta x, and the periodic basis contributes 1/L1/\sqrt L. The raw DFT sum is only the unweighted finite sum, so it must be scaled before it has the physical units and normalization of a Fourier coefficient.

  1. Why is the kinetic-energy step diagonal in the Fourier representation for a free particle?
Solution

Fourier modes satisfy

d2dx2eikx=−k2eikx.\frac{d^2}{dx^2}e^{ikx} = -k^2e^{ikx}.

Since the free-particle kinetic energy is −ℏ2(2mphys)−1d2/dx2-\hbar^2(2m_{\mathrm{phys}})^{-1}d^2/dx^2, each Fourier mode is multiplied by

ℏ2k22mphys.\frac{\hbar^2k^2}{2m_{\mathrm{phys}}}.

Therefore the kinetic operator is diagonal in the Fourier basis.