Let Quantum Neural Networks Choose Their Own Frequencies

Ben Jaderberg, Antonio A. Gentile, Youssef Achari Berrada, Elvira Shishenina, Vincent E. Elfving · DOI

TL;DR

Quantum machine learning models are mathematically equivalent to Fourier series, but their frequencies are usually fixed by the hardware's initial setup. This paper introduces Trainable-Frequency (TF) quantum models, allowing the network to learn the optimal frequencies for a given task. This small architectural change significantly boosts performance in complex problems like fluid dynamics with only a marginal increase in computational cost.

What Problem Does This Paper Address?

In Variational Quantum Machine Learning, we typically use Parameterized Quantum Circuits (PQCs) to represent functions. A key insight from recent years is that these circuits act as partial Fourier series: the data-encoding layer determines the frequencies available to the model, while the variational layers (the "ansatz") tune the coefficients of those frequencies.

The problem is that in standard "Fixed-Frequency" (FF) models, the frequencies are determined by the eigenvalues of a fixed "generator" Hamiltonian. Usually, these are simple integers (1, 2, 3...). While these models are theoretically "universal approximators" if you make them large enough, real-world data—like the complex oscillations in fluid flow—often doesn't fit neatly into an integer-based grid. To compensate, a fixed model needs a massive number of qubits or layers, which is impractical for today's noisy, near-term quantum computers.

Methods

The authors propose Trainable-Frequency Feature Maps (TFFMs). Instead of using a static generator Hamiltonian to encode data, they introduce a set of trainable parameters ($\theta_F$) directly into the generator.

  • The Mechanism: By making the generator's eigenvalues trainable, the model can shift its internal "spectral modes" to match the natural frequencies of the target dataset.
  • Optimization: These new parameters are optimized alongside the standard ansatz parameters using gradient-based methods (like the Adam optimizer).
  • Hardware Compatibility: Crucially, the authors show that the gradients for these frequency parameters can be calculated using the Parameter-Shift Rule (PSR), meaning this approach can be implemented on existing quantum hardware without needing complex new subroutines.
  • Application Framework: They apply this to Differentiable Quantum Circuits (DQC), a quantum version of physics-informed neural networks used to solve partial differential equations (PDEs).

Datasets

The researchers evaluated their approach using three distinct types of data:

  1. Synthetic Cosine Series: Simple 1D functions with non-integer frequencies (e.g., $\{1, 1.2, 3\}$) to prove that fixed-frequency models fail when data doesn't align with their pre-set grid.
  2. Spectral Richness Benchmarks: Seven datasets with varying numbers of equally spaced frequencies to test how well the model adapts to different levels of complexity.
  3. Navier-Stokes Equations: A high-resolution simulation of 2D fluid flow (wake flow) behind a circular cylinder at a Reynolds number of 100. This is a classic, challenging benchmark for scientific computing.

Key Insights and Ideas

  • Pitch vs. Volume: If a standard quantum model is like a piano where you can only change how hard you hit the keys (coefficients), a TF model is like a violin where you can also slide your finger to change the pitch (frequencies).
  • Efficiency over Universality: While fixed models are "universal" in the limit of infinite size, TF models are much more expressive at small scales. They can represent non-orthogonal basis functions, which are often a much more efficient way to describe real-world physical systems.
  • Low Overhead: In their fluid dynamics experiment, adding trainable frequencies only increased the number of required circuit evaluations by 7%, yet it yielded a massive jump in accuracy.
  • Default Choice: The authors argue that since TF models can always "fall back" to acting like fixed models (by setting parameters to 1), they should perhaps become the sensible default for variational quantum algorithms.

Key Results

  • Frequency Learning: In the synthetic tests, the TF model successfully learned non-regularly spaced frequencies that the FF model simply could not represent, regardless of how many layers were added to the ansatz.
  • Fluid Dynamics Accuracy: When solving the Navier-Stokes equations, the TF model significantly outperformed the FF model across all variables (velocity $u, v$ and pressure $p$).
  • For vertical velocity ($v$), the Mean Absolute Error (MAERM) dropped from ~103% in the fixed model to ~30% in the trainable model.
  • Qualitative Superiority: Visualizations of the pressure fields showed that the TF model correctly captured complex features like "negative-pressure bubbles," whereas the fixed model only managed to capture the broad, blurry background.

Limitations and Future Work

  • Initialization: The authors initialized their frequency parameters to 1. Future work could explore more sophisticated initialization strategies to avoid local minima in the loss landscape.
  • Generator Complexity: This study used a simple sum of Pauli operators. Exploring more complex, perhaps non-commuting, generator architectures could further increase expressivity.
  • Barren Plateaus: While the authors used techniques to mitigate vanishing gradients, the impact of trainable frequencies on the "flatness" of the optimization landscape (barren plateaus) warrants deeper theoretical study.
  • Hardware Noise: The results are based on numerical simulations. Testing how these trainable frequencies interact with real-world quantum noise and decoherence is a necessary next step.

Summary updated

BibTeX
@inproceedings{jaderberg2024let,
  author = {Ben Jaderberg and Antonio A. Gentile and Youssef Achari Berrada and Elvira Shishenina and Vincent E. Elfving},
  title = {{Let Quantum Neural Networks Choose Their Own Frequencies}},
  booktitle = {Physical},
  year = {2024},
  doi = {10.1103/physreva.109.042421},
}
Figure