Wavefunction Flows: Efficient Quantum Simulation of Continuous Flow Models

David Layden, Ryan Sweke, Vojtech Havlicek, Anirban Chowdhury, Kirill Neklyudov

TL;DR

State-of-the-art generative AI—like continuous flow and diffusion models—turns out to be mathematically cousins with the Schrödinger equation, the beating heart of quantum mechanics. By mapping a classically trained flow model onto a quantum computer, we can generate a quantum state encoding the entire learned probability distribution rather than just drawing single, isolated samples. This unlocks quantum interference for inference, offering a provable, near-quadratic speedup in sample efficiency for downstream tasks like Monte Carlo estimation.

What Problem Does This Paper Address?

For years, Quantum Machine Learning (QML) has suffered from an identity crisis. While quantum computers excel at simulating quantum physics, shoehorning modern ML into them usually hits massive roadblocks: loading huge classical datasets into quantum states is notoriously hard, and training quantum neural networks is plagued by vanishing gradients and a lack of straightforward backpropagation. Consequently, there has been very little overlap between modern, heavy-hitting ML techniques and the things quantum computers actually do well.

Meanwhile, in classical ML, continuous flow models (and their cousins, diffusion models) have revolutionized generative modeling. They work by learning a "velocity field" that pushes simple Gaussian noise along an ordinary differential equation (ODE) until it morphs into a complex data distribution. However, using these models for scientific downstream tasks—like estimating free energy in molecules—requires Monte Carlo estimation, which suffers from slow convergence because you have to generate individual samples one by one.

The authors ask: Can we bridge modern generative AI and quantum simulation to bypass QML's training bottlenecks and speed up classical inference?

Methods

The authors leave training entirely to classical computers and bring in the quantum computer only at inference time.

Figure 1: Flow models currently follow the blue steps. We introduce the red steps as an alterna- tive, by proving that a trained flow (or diffusion) model defines a Schrödinger equation that can be efficiently simulated on a quantum computer. The resulting quantum state encodes the learned distri- bution qT ≈qdata, but can be probed and manip- ulated through unitary operations, which can be advantageous for potential downstream tasks.

In a classical flow model, as data points flow along the learned ODE, their underlying probability density $q_t(x)$ evolves according to the continuity equation. The authors show that if you take the square root of this density, $\Psi_t(x) = \sqrt{q_t(x)}$, it behaves like a quantum wavefunction! Specifically, it obeys a Schrödinger equation driven by a custom "continuity Hamiltonian." Simulating this equation prepares a qsample—a coherent quantum state whose amplitudes encode the target probability distribution.

Figure 2: Relationships between the equations in Section 3, with quantum operators (denoted with hats) defined in Table 1.

Because most quantum computers are digital and this Schrödinger equation is continuous (and has an unusual form), the authors focus on conservative velocity fields—where the velocity is the gradient of a learned scalar potential, $v_t = \nabla V_t$. Here, the Hamiltonian neatly simplifies into a commutator of standard kinetic and potential energy operators: $i[\hat{K}, V_t(\hat{x})]$. To prove a digital quantum computer can actually run this, they discretize space onto a $d$-dimensional periodic grid using Fourier pseudo-spectral methods, and discretize time using a product formula that alternates between simple kinetic and potential unitary operations.

Datasets

Not discussed in the paper. Because current quantum hardware is too small and noisy—and classical simulation of quantum systems scales exponentially—this work is purely theoretical and relies on mathematical proofs rather than empirical benchmarks.

Key Insights and Ideas

  • No quantum data-loading or training: You train your neural network classically as usual. The quantum computer never touches the training dataset; it simply queries the learned potential function $V_t$ during simulation to guide a standard Gaussian quantum state into the target distribution.
  • Dynamics over ground states: Many quantum algorithms try to solve problems by finding the lowest-energy "ground state" of a system, which is generally intractable even for quantum computers. Framing flow models as time-evolving dynamics taps directly into the one thing quantum computers are guaranteed to do efficiently.
  • Inference meets interference: Simply measuring the final quantum state $\sqrt{q_T}$ just gives you one random classical sample—a very expensive way to do what an ODE solver already does. The magic happens before measurement: you can apply unitary operations to manipulate probability amplitudes via quantum interference, probing global properties of the distribution in ways stochastic classical operations never could.
  • Dodging the curse of dimensionality on grids: Normally, putting a $d$-dimensional space on a grid requires an exponential number of grid points. On a quantum computer, $n$ qubits naturally represent $2^n$ grid points simultaneously, allowing the algorithm to evaluate $V_t$ across the entire dense grid in parallel using $O(1)$ queries per step.

Key Results

The authors establish rigorous complexity bounds to prepare a discrete qsample of a $d$-dimensional distribution within a cube of side length $L$ up to an error $\epsilon$ over time $T$:

  • Qubit scaling: Spatial discretization error drops exponentially with qubit count, requiring only $n = O(d \log [Ld(T/\epsilon)^{1/s}])$ qubits (where $s$ is a smoothness parameter).
  • Timestep scaling: Time discretization requires $r = O(d^6 T^{2+2/s} / \epsilon^{1+2/s})$ timesteps—crucially, polynomial in all parameters, including dimension $d$. Each step requires $O(1)$ evaluations of the classical neural network.
  • Downstream speedup: For estimating the mean of a function over the learned continuous distribution, preparing these approximate discretized qsamples yields a near-quadratic reduction in sample complexity: achieving $O(1/m)$ error scaling using $\tilde{O}(m)$ qsamples, compared to the classical $O(1/\sqrt{m})$ rate from $m$ samples.

Limitations and Future Work

  • Hardware reality check: Running these simulations at meaningful scales requires fault-tolerant, error-corrected quantum computers, which do not exist yet.
  • Conservative flows only: The complexity proofs rely on conservative velocity fields ($v_t = \nabla V_t$). Extending the simulation algorithms to general, non-conservative flow models remains an open problem.
  • Sample complexity vs. wall-clock runtime: The proven near-quadratic advantage counts the number of (q)sample preparations, not total end-to-end runtime. Furthermore, a trained model gives classical algorithms white-box access to the network $V_t$ itself (not just black-box samples), so comparing full classical-vs-quantum runtimes and exploring other quantum downstream tasks are prime territory for future work.

Summary updated

BibTeX
@inproceedings{layden2026wavefunction,
  author = {David Layden and Ryan Sweke and Vojtech Havlicek 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