Skip to main content

12.8 Quantum Fourier transform

Source: Ideas from Computational Physics (Landau, Páez, Bordeianu), §12.8. Original wording — no textbook Qiskit listing dumps. Continues 12.7b. Labs: 12.8b.

Chapter 9’s DFT maps a length-NN signal yky_k to coefficients YnY_n with powers of ZN=e−2πi/NZ_N=e^{-2\pi i/N}. The quantum Fourier transform does the same job on an N=2nN=2^n-dimensional Hilbert space. Pick the QFT definition and the QFT4\mathrm{QFT}_4 matrix among lookalikes.

(Qiskit / CS indexing from 00; no extra 2π\sqrt{2\pi} factors.) Basis labels: ∣0⟩=∣00⟩|0\rangle=|00\rangle, ∣1⟩=∣01⟩|1\rangle=|01\rangle, ∣2⟩=∣10⟩|2\rangle=|10\rangle, ∣3⟩=∣11⟩|3\rangle=|11\rangle.

Gate factorization (2 qubits)​

With Hadamard HH and phase P(θ)=diag(1,eiθ)P(\theta)=\mathrm{diag}(1,e^{i\theta}), and Z≡Z4=−iZ\equiv Z_4=-i,

QFT4∣00⟩=H∣0⟩⊗H∣0⟩,QFT4∣01⟩=H∣1⟩⊗P(π/2)H∣0⟩,QFT4∣10⟩=H∣0⟩⊗H∣1⟩,QFT4∣11⟩=H∣1⟩⊗P(π/2)H∣1⟩.\begin{align*} \mathrm{QFT}_4|00\rangle&=H|0\rangle\otimes H|0\rangle,\\ \mathrm{QFT}_4|01\rangle&=H|1\rangle\otimes P(\pi/2)H|0\rangle,\\ \mathrm{QFT}_4|10\rangle&=H|0\rangle\otimes H|1\rangle,\\ \mathrm{QFT}_4|11\rangle&=H|1\rangle\otimes P(\pi/2)H|1\rangle. \end{align*}

Compactly (then SWAP the two output lines to match textbook wire order):

QFT4∣q1q0⟩  =^  H∣q0⟩⊗Pq0(π/2) H∣q1⟩(+ SWAP).\mathrm{QFT}_4|q_1 q_0\rangle \;\widehat=\; H|q_0\rangle\otimes P^{q_0}(\pi/2)\,H|q_1\rangle \quad\text{(+ SWAP)}.

Figure 12.9 — QFT₄ circuit.

Lab: wire QFT₄​

Connect q-reg → H / controlled-P → H → SWAP → out (schema-style).

Sampling exercise (idea)​

Take four samples of y(t)=3cos⁡(ωt)+2cos⁡(3ωt)y(t)=3\cos(\omega t)+2\cos(3\omega t), apply QFT4\mathrm{QFT}_4, read frequency bins, and check that the inverse (or direct sum of components) rebuilds yy. Labs lock Z4=−iZ_4=-i and the (0,0)(0,0) entry 1/21/2.

nn-qubit QFT​

With nn qubits, N=2nN=2^n components live in an NN-D Hilbert space (tensor-product basis). The circuit generalizes: layered Hadamards and controlled phase rotations Rk=P(2π/2k)R_k=P(2\pi/2^k), then bit-reversal SWAPs — still O(n2)O(n^2) gates vs classical O(Nlog⁡N)O(N\log N) on explicitly stored vectors.

Takeaway​

Classical DFTQFT
ZNnkZ_N^{nk} on arrayssame phases on amplitudes
O(Nlog⁡N)O(N\log N) FFTO(n2)O(n^2) gates, N=2nN=2^n
QFT₄HH, controlled-P(π/2)P(\pi/2), SWAP
Quiz

QFT

1 / 3

Z₄ = e^{−iπ/2} equals…

Pick an answer to see if you are right.

Next: 12.8b QFT labs.