Table of Contents
Fetching ...

The effect of data encoding on the expressive power of variational quantum machine learning models

Maria Schuld, Ryan Sweke, Johannes Jakob Meyer

TL;DR

This paper shows that variational quantum circuit models can be viewed as partial Fourier series in the input, with the available frequencies entirely determined by the eigenvalues of the data-encoding Hamiltonians and the coefficients controlled by the trainable circuit. By analyzing single Pauli-rotation encodings and their repetitions, the authors quantify how the frequency spectrum—and thus the expressivity—grows, and they prove an asymptotic universality result under a universal Hamiltonian-family assumption. The practical implications connect encoding choices and potential pre-processing strategies to the achievable function classes, offering guidelines for when quantum models may be most expressive, particularly for time-series and periodic tasks. Overall, the work provides a spectral lens for designing and understanding quantum machine learning models, linking encoding, universality, and generalization considerations.

Abstract

Quantum computers can be used for supervised learning by treating parametrised quantum circuits as models that map data inputs to predictions. While a lot of work has been done to investigate practical implications of this approach, many important theoretical properties of these models remain unknown. Here we investigate how the strategy with which data is encoded into the model influences the expressive power of parametrised quantum circuits as function approximators. We show that one can naturally write a quantum model as a partial Fourier series in the data, where the accessible frequencies are determined by the nature of the data encoding gates in the circuit. By repeating simple data encoding gates multiple times, quantum models can access increasingly rich frequency spectra. We show that there exist quantum models which can realise all possible sets of Fourier coefficients, and therefore, if the accessible frequency spectrum is asymptotically rich enough, such models are universal function approximators.

The effect of data encoding on the expressive power of variational quantum machine learning models

TL;DR

This paper shows that variational quantum circuit models can be viewed as partial Fourier series in the input, with the available frequencies entirely determined by the eigenvalues of the data-encoding Hamiltonians and the coefficients controlled by the trainable circuit. By analyzing single Pauli-rotation encodings and their repetitions, the authors quantify how the frequency spectrum—and thus the expressivity—grows, and they prove an asymptotic universality result under a universal Hamiltonian-family assumption. The practical implications connect encoding choices and potential pre-processing strategies to the achievable function classes, offering guidelines for when quantum models may be most expressive, particularly for time-series and periodic tasks. Overall, the work provides a spectral lens for designing and understanding quantum machine learning models, linking encoding, universality, and generalization considerations.

Abstract

Quantum computers can be used for supervised learning by treating parametrised quantum circuits as models that map data inputs to predictions. While a lot of work has been done to investigate practical implications of this approach, many important theoretical properties of these models remain unknown. Here we investigate how the strategy with which data is encoded into the model influences the expressive power of parametrised quantum circuits as function approximators. We show that one can naturally write a quantum model as a partial Fourier series in the data, where the accessible frequencies are determined by the nature of the data encoding gates in the circuit. By repeating simple data encoding gates multiple times, quantum models can access increasingly rich frequency spectra. We show that there exist quantum models which can realise all possible sets of Fourier coefficients, and therefore, if the accessible frequency spectrum is asymptotically rich enough, such models are universal function approximators.

Paper Structure

This paper contains 14 sections, 2 theorems, 56 equations, 6 figures, 1 table.

Key Result

Theorem 1

Let $\{H_m\}$ be a universal Hamiltonian family, and $\{f_m\}$ the associated quantum model family, defined via Eq. eq:indexed_model. For all functions $g \in L_2([0,2\pi]^N)$, and for all $\epsilon > 0$, there exists some $m'\in \mathbb{N}$, some state $|\Gamma\rangle \in \mathbb{C}^{d^{m'}}$, and

Figures (6)

  • Figure 1: Illustration of the main result of this paper, shown for one-dimensional inputs $x \in \mathbb{R}$: quantum models consisting of layers of trainable circuit blocks $W=W(\boldsymbol \theta)$ and data encoding circuit blocks $S(x)$ can be written as a weighed sum $\sum_{\omega} c_{\omega} e^{i \omega x}$. The data encoding circuit determines the frequencies $\omega$, and the remainder of the circuit architecture determines the coefficients $c_{\omega}$. If the $\omega$ are integer-valued (or integer-valued multiples of a base frequency $\omega_0$), the sum becomes a partial Fourier series, which allows us to systematically study properties of the function class a given quantum model can learn.
  • Figure 2: The general quantum model considered in this paper includes qubit-based circuits where the encoding subroutine consists of a single-qubit gate $\mathcal{G}(x)$, which is often used in practice. The picture illustrates two special cases investigated in Section \ref{['Sec:expressivity']}: (a) shows a circuit where the scalar input feature $x$ is encoded by one single-qubit gate, which can be repeated $r = L>1$ times but always acts on the same qubit, and (b) repeats the encoding gate $r$ times in "parallel" using only one layer. Note that the trainable blocks $W$ (purple rectangles) represent arbitrary unitaries, which in practice would be implemented as a sequence of local gates (inset).
  • Figure 3: A parametrised quantum model is trained with data samples (white circles) to fit a target function $g(x) = \sum_{n=-1}^1 c_{n} e^{-nix}$ or $g'(x) = \sum_{n=-2}^2 c_{n} e^{-nix}$ with coefficients $c_0=0.1$, $c_1 = c_2 = 0.15 - 0.15i$. The variational circuit is of the form $f(x) = \left \langle 0 \right | U^{\dagger}(x) \sigma_z U(x) \left| 0 \right \rangle$ where $\left| 0 \right \rangle$ is a single qubit, and $U = W^{(2)} R_x(x) W^{(1)}$. The $W$ (round blue symbols) are implemented as general rotation gates parametrised by three learnable weights each, and $R_x$ (square blue symbols) is a single Pauli-X rotation. The left panels show the quantum model function $f(x)$ and target function $g(x), g'(x)$, while the right panels show the mean squared error between the data sampled from $g$ and $f$ during a typical training run. Feeding in the input $x$ as is (top row), the quantum model easily fits the target of degree $1$. Re-scaling the inputs $x \rightarrow 2x$ causes a frequency mismatch, and the model cannot learn the target any more (middle row). However, even with the correct scaling, the variational circuit cannot fit the target function of degree $2$ (bottom row). The experiments in this paper were all performed using the PennyLane software library bergholm2018pennylane.
  • Figure 4: Fitting a truncated Fourier series of degree $5$, $g(x) = \sum_{n=-5}^5 c_n e^{2 i n x}$ with $c_n = 0.05 - 0.05i$ for $n=1,\dots,5$ and $c_0=0$, using a quantum model that repeats the encoding $r =1, 3, 5$ times in sequence (left) and in parallel (right). Increasing $r$ allows for closer and closer fits until $r=5$ fits the data almost perfectly in both cases - illustrating that parallel and sequential repetitions of Pauli encodings extend the Fourier spectrum in the same manner. All models were trained with at most 200 steps of an Adam optimiser with learning rate $0.3$ and batch size $25$. For the "parallel" simulations, the $W$ are not arbitrary unitaries but implemented by a smaller ansatz of three layers of parametrised rotations as well as entangling CNOT gates, as per Ref. schuld2020circuit, which is depicted by the hollow rounded gate symbols. The quantum model still easily fitted the target function, which suggests that the results of this paper are of relevance for realistic quantum models.
  • Figure 5: Real and imaginary parts of the first six Fourier coefficients sampled from $100$ randomly initialised $L=1$ quantum models. The models share the same encoding strategy of parallel Pauli-X rotations (square symbols) but vary in the ansatz and number of layers for the trainable unitaries $W$. Circuit A uses an ansatz of trainable arbitrary single qubit rotations and layer-dependent entangling structure proposed in schuld2020circuit and already used in Fig. \ref{['fig:L1-5']}, while Circuit B uses trainable Pauli-X rotations with a simple entangling structure. The plots suggest that the "expressivity" of the trainable circuit block -- here represented by increasing the number of times $l$ an ansatz is repeated -- has little influence on the distribution of the Fourier coefficients, as opposed to the type of ansatz.
  • ...and 1 more figures

Theorems & Definitions (3)

  • Theorem
  • Theorem
  • proof