liveBook · Manning

Fourier basis

As explained in Building Quantum Software with Python

A Fourier basis state is a normalized quantum state whose amplitudes form a geometric sequence associated with a particular frequency index.

A Fourier basis is a frequency-shaped vector used to compare a discrete signal with sinusoidal patterns. Each component follows a geometric sequence, and the discrete Fourier transform uses inner products with these bases to obtain frequency magnitudes and phases. section 7.3.1

For a quantum state of dimension N, the basis state indexed by l has amplitudes 1/sqrt(N) times cis(2πkl/N). Equal magnitudes normalize the state; l determines its frequency. section 7.3.2

Listing 7.3 Computing the Fourier basis for a given N and l
def fourier_basis(N, l):
    return [1/sqrt(N) * cis(k*l*2*pi/N) for k in range(N)]

Use the Python function to generate the normalized Fourier basis for any dimension N and frequency index l. section 7.3.2

The basis supports a reusable transform pattern:

  • Generate each basis vector for the required frequency index. section 7.3.1
  • Compute an inner product between the input amplitudes and each basis to obtain transform entries. section 7.3.1 section 7.3.2
  • Use conjugate bases for the QFT and the corresponding positive-angle convention for the IQFT. section 7.3.2

Recovering frequency 13

Applying the IQFT to the four-qubit Fourier basis F13 reveals the binary digits of its frequency from right to left. Hadamard gates and controlled phase rotations recover 1101, then qubit swaps produce computational basis state 13. section 7.4.1

How Building Quantum Software with Python covers it

How deep it goes
Defines normalized amplitudes, implements basis generation and classical transforms, then traces IQFT gate steps for frequency recovery.
Examples
Uses N=4 basis vectors, sampled sinusoidal signals, Python inner products, and the four-qubit state F13.
What it assumes
Assumes complex-number rotations and inner products while building the Fourier-state and transform procedures explicitly.
What you can do after
Apply it via Python to construct Fourier states, simulate QFT or IQFT projections, and identify encoded periodic frequencies.
How it connects
Relates Fourier bases to the discrete Fourier transform, fast Fourier transform, QFT, IQFT, inner products, phase rotations, and computational basis states.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Building Quantum Software with Python. The section links point to the parts of the book it draws on.