Computing Library › Quantum Ml
Quantum Ml

Encoding and Fourier Expressivity

A quantum model built by repeated data encoding computes a Fourier series in the input, so the encoding gates decide exactly which functions it can represent.

Quantum models as Fourier series

A clean and general result says that a quantum model which encodes a scalar input x through repeated rotation gates outputs a truncated Fourier series in x: f(x) = sum_omega c_omega exp(i omega x), where the accessible frequencies omega are fixed by the encoding and the coefficients c_omega are set by the trainable gates and the measurement. This turns an abstract circuit into a concrete, interpretable function class.

Encoding sets the frequencies

Kronos motion — which application

The available frequency spectrum comes entirely from the data-encoding gates: their generators' eigenvalues determine the frequencies, and repeating the encoding, as in data re-uploading, adds higher harmonics. With L encoding repetitions using simple Pauli rotations, the model can represent integer frequencies up to L. If the target function has frequency content beyond that, the model cannot fit it no matter how the trainable gates are set.

Trainable gates set the coefficients

Given the fixed frequency support, the variational layers and the measured observable control the Fourier coefficients c_omega. This is a clarifying division of labor: the encoding chooses the basis functions, the trainable part chooses their weights. It also explains why encoding is a modeling decision, not a preprocessing step, as stressed in the encoding overview.

python
# Fit a target with a re-uploading model, then inspect its spectrum
# The model f(x) = sum_omega c_omega exp(i omega x) has |omega| <= L.
# If target has a frequency above L, residual error is irreducible.
for L in [1, 2, 4, 8]:
    err = train_and_eval(reupload_layers=L, target=target_fn)
    print(L, err)   # error drops as L reaches the target's top frequency

Why this matters for design

The Fourier picture gives a principled way to size a model: estimate the frequency content of the task and choose enough encoding repetitions to cover it, but no more, since extra depth invites noise and barren plateaus. It also warns against over-claiming: a shallow encoding is a low-pass filter, and no amount of trainable-gate tuning recovers frequencies the encoding never provided.