Algorithms

QFT

Quantum Fourier Transform — the quantum analog of the discrete Fourier transform, exponentially faster.

The Quantum Fourier Transform (QFT) is the quantum analog of the Discrete Fourier Transform (DFT). It maps a quantum state with amplitudes into the frequency domain with exponential speedup: QFT on n qubits requires O(n²) gates, while the classical FFT requires O(n·2ⁿ) operations — an exponential advantage. QFT is a subroutine in many important quantum algorithms: it is the core of Shor's factoring algorithm and quantum phase estimation, which underlies many quantum chemistry and optimization algorithms. The QFT produces entangled output states, so its result cannot be read out directly — it is most useful as an intermediate computation step. HLQuantum includes a built-in QFT implementation via hlq.algorithms.qft().