Quantum Fourier Transform

The quantum version of the discrete Fourier transform, a key subroutine in many quantum algorithms.


The Quantum Fourier Transform (QFT) is a linear transformation on quantum states that’s central to algorithms like Shor’s and quantum phase estimation.

Definition

The QFT maps computational basis states as:

where for qubits.

Matrix Form

For 2 qubits ():

Why It’s Important

Classical FFT: O(N log N)

The Fast Fourier Transform revolutionized signal processing.

Quantum QFT: O(n²) = O(log² N)

Exponentially faster! This speedup is key to Shor’s algorithm.

The Circuit

The QFT has a remarkably simple circuit using only Hadamards and controlled rotations:

|x₀⟩ ──H──R₂──R₃──...──Rₙ──────────────────
          │   │       │
|x₁⟩ ─────●───┼───...─┼────H──R₂──...──Rₙ₋₁──
              │       │        │       │
|x₂⟩ ─────────●───...─┼────────●───...─┼──────
                      │                │
...                   ...              ...
                      │                │
|xₙ⟩ ─────────────────●────────────────●──H──

Plus SWAP gates at the end to reverse bit order.

Gates used:

  • Hadamard:
  • Controlled rotation:

Inverse QFT

The inverse is simply the conjugate transpose:

Same circuit but with negative rotation angles, run in reverse.

Applications

AlgorithmHow QFT is Used
Shor’s AlgorithmExtract period from superposition
Phase EstimationConvert phase to binary representation
Quantum countingCount solutions via phase estimation
HHL AlgorithmPart of eigenvalue processing

Important Caveat

The QFT is fast, but there’s a catch:

  • Input: Requires preparing the input state (often expensive)
  • Output: Result is in amplitudes (can’t read them all directly)

The QFT is useful when it’s part of a larger algorithm that handles input/output appropriately.

Approximate QFT

For practical purposes, very small rotations ( for large ) can be omitted:

This reduces circuit depth with minimal accuracy loss.


See also: Shor’s Algorithm, Quantum Phase Estimation, Quantum Algorithm