Wavefunction Flows: Efficient Quantum Simulation of Continuous Flow Models

David Layden, Ryan Sweke, Vojtech Havlícek, Anirban Chowdhury, Kirill Neklyudov · DOI

Abstract

Preparing complex quantum states, or "qsamples," is a fundamental prerequisite for many quantum algorithms that offer speedups in statistical estimation and machine learning. This paper introduces "Wavefunction Flows," a framework that quantizes classical generative flow models to prepare these states. By establishing a formal mapping between the classical continuity equation and the Schrödinger equation through a specific "Continuity Hamiltonian," the authors demonstrate how velocity fields learned by classical neural networks can be used to evolve simple initial states into complex target distributions. We provide an overview of the mathematical mapping, the digital simulation via Fourier pseudospectral discretization, and the resulting quadratic speedups for mean estimation tasks.

1. Introduction

In both classical machine learning and quantum information science, the ability to represent and sample from high-dimensional probability distributions is a core challenge. Classical generative modeling has seen a revolution through flow-based models and diffusion processes, which transform simple distributions into complex ones by learning a time-dependent velocity field.

In the quantum domain, many algorithms require the preparation of qsamples—quantum states where the probability amplitudes correspond to the square roots of a target distribution's probabilities. While qsamples enable significant speedups in tasks like mean estimation and property testing, preparing them for arbitrary, complex distributions remains difficult. Existing quantum state preparation methods often suffer from the "slow mixing" problems characteristic of Markov Chain Monte Carlo (MCMC) or are restricted to specific distribution families. Wavefunction Flows bridge this gap by leveraging the success of classical generative AI to guide quantum state preparation.

2. The Continuity Hamiltonian

The core contribution of this work is the establishment of a mathematical bridge between classical probability flows and quantum dynamics. The authors show that the continuity equation, which describes the evolution of a probability density $\rho_t(x)$ under a velocity field $v_t(x)$:

$$\frac{\partial \rho_t}{\partial t} + \nabla \cdot (\rho_t v_t) = 0$$

is structurally identical to the evolution of the squared magnitude of a wavefunction $|\psi_t(x)|^2$ under the Schrödinger equation, provided the Hamiltonian is chosen correctly. They define the Continuity Hamiltonian as:

$$\hat{H}_t = \frac{1}{2} [\hat{p} \cdot v_t(\hat{x}) + v_t(\hat{x}) \cdot \hat{p}]$$

where $\hat{p}$ is the momentum operator and $v_t(\hat{x})$ is the velocity field. Unlike standard physical Hamiltonians where the phase and density are coupled (as seen in the Madelung equations), this specific construction "locks" the phase. This prevents the complex interference patterns typically associated with quantum fluid dynamics, ensuring the quantum state's density precisely follows the classical flow.

3. Digital Quantum Simulation

To implement this continuous evolution on a digital quantum computer, the authors utilize Fourier pseudospectral discretization (also known as Fourier collocation). This method maps continuous variables onto a discrete grid of qubits.

3.1 Conservative Fields and Trotterization

The simulation is particularly efficient when the velocity field is "conservative" (i.e., the flow is the gradient of a potential, $v_t = \nabla V_t$). In such cases, the Hamiltonian can be expressed as a commutator of kinetic and potential energy operators. This structure facilitates simulation using high-order product formulas (Trotterization), allowing the quantum computer to evolve the state through a series of standard gates.

3.2 Complexity and Scaling

The authors provide rigorous proofs for the efficiency of this approach:

  • Space Complexity: For a $d$-dimensional distribution, the number of qubits required scales as $O(d \log(1/\epsilon))$, where $\epsilon$ is the discretization error.
  • Time Complexity: The number of simulation timesteps scales polynomially with the dimension and the desired precision, assuming the velocity field satisfies mild regularity (smoothness) conditions.

4. Key Results and Applications

4.1 Quantum Mean Estimation

A primary application of Wavefunction Flows is the estimation of the mean of a function $\mathbb{E}_{x \sim p}[f(x)]$. By preparing the qsample using the Continuity Hamiltonian and subsequently applying quantum amplitude estimation, the authors prove a quadratic speedup in sample complexity compared to classical sampling. This speedup holds even when accounting for the errors introduced by spatial discretization and time-stepping.

4.2 Bypassing Thermalization

Unlike classical MCMC methods, which may take exponential time to reach a steady state in distributions with multiple local modes, Wavefunction Flows are purely dynamical. The algorithm rotates a simple initial state into the target state over a fixed time interval, effectively bypassing the "slow mixing" bottleneck that plagues many classical and quantum sampling routines.

5. Discussion and Limitations

While Wavefunction Flows offer a powerful new paradigm, their efficiency is tied to the quality of the classical generative model. If the learned velocity field is highly non-smooth or "jagged," the discretization requires a significantly higher number of qubits and timesteps to maintain accuracy. Furthermore, the algorithm assumes the existence of an efficient "oracle" to implement the potential $V_t(\hat{x})$ derived from the neural network.

Future work may explore "post-Trotter" simulation techniques, such as qubitization or quantum signal processing, to further optimize the gate counts. Additionally, the theoretical question of whether simulating these flows is a BQP-complete task remains an intriguing open problem, suggesting that Wavefunction Flows may represent one of the most potent applications of quantum simulation for classical data science.

Summary updated

BibTeX
@inproceedings{layden2026wavefunction,
  author = {David Layden and Ryan Sweke and Vojtech Havlícek and Anirban Chowdhury and Kirill Neklyudov},
  title = {{Wavefunction Flows: Efficient Quantum Simulation of Continuous Flow Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=EB9990twi7},
}
Figure