Source-linked AI summary

Quantum MeanFlow: single-shot generative sampling on NISQ hardware

Ashish Joshi, Eshaan Mistry, Takahiko Koyama

arXiv:2609.02186v1quant-phcs.LG

TL;DR

NISQ quantum flow matching requires costly sequential circuit evaluations during inference. The paper introduces Quantum MeanFlow, which learns interval-average velocities for single-step sampling, and benchmarks it against QFM on MNIST. QMF enables one-evaluation generation and outperforms single-step QFM, while best-of-N sampling recovers accuracy under device noise.

  • Problem

    NISQ quantum flow matching requires sequential multi-step sampling, and quantum input/output costs increase with the number of circuit evaluations.

  • Method

    Quantum MeanFlow uses a parameterized quantum circuit to learn average velocity fields for single-step sampling, with classical preprocessing and MNIST benchmarking against QFM.

  • Results

    QMF is a viable single-step generator and performs better than QFM for single-step sampling, especially at lower shot counts; best-of-N sampling reaches accuracy 1.0 with N = 8 in simulation.

  • Takeaways & Limitations

    QMF reduces quantum circuit evaluations per generated sample and is better suited to current NISQ hardware constraints.

  • Takeaways & Limitations

    QMF is harder to learn than QFM, and its performance increasing with additional time steps indicates that it did not learn the average velocity exactly.

Abstract

from arXiv · show

Quantum generative models offer a promising framework for exploring whether quantum computation can enhance generative machine learning. Flow matching is a generative method in which samples are generated by transporting a simple, known distribution to the target data distribution with a learned velocity field. Its quantum counterpart, known as quantum flow matching (QFM), was introduced recently, and, like its classical counterpart, requires integrating an ordinary differential equation over many time steps during inference. As each step requires the output from the previous step, the circuit submission is sequential and a drawback on quantum computers as they have high input/output costs. To alleviate this problem, we introduce Quantum MeanFlow (QMF), the quantum analogue of the MeanFlow formulation, which allows single-step sample generation. While the QFM learns an instantaneous velocity field at each time step, QMF learns the average velocity over a time interval. We use a parameterized quantum circuit to learn these velocity fields and benchmark the two methods on the MNIST dataset. We show that while single-step QMF has lower image quality compared to multi-step QFM, it performs better than the single-step QFM sampling at every shot count. Both of our models are executed on IBM quantum computers and best-of-N rejection sampling recovers most of the accuracy lost to device noise without modifying the circuit. This is especially advantageous for QMF which has only one circuit evaluation per image. Here, We establish QMF as a viable method for single-step quantum generative sampling, saving on quantum circuit evaluations per generated sample.

1 Introduction

Quantum generative modeling explores whether quantum computation can benefit generative learning, but current NISQ hardware makes sequential circuit sampling costly. This work introduces QMF, a single-step quantum generative approach benchmarked against QFM on MNIST.

  • Flow matching generates data by learning a probability flow between noise and data distributions with an ordinary differential equation.
  • Quantum machine learning investigates whether quantum computation can provide benefits for computationally costly machine-learning methods.
  • NISQ quantum models face high error rates and expensive input/output, making sequential multi-step sampling costly.
  • QMF is introduced as the first quantum MeanFlow model for classical image generation, trained and evaluated against QFM on MNIST.
  • QMF performs single-step sampling with one circuit evaluation per generated image, avoiding QFM's sequential circuit evaluations.
  • At lower shot counts, multi-step sampling in both models can alleviate sampling noise, and the results establish single-step QMF as viable for NISQ hardware.

2 Background

Flow matching learns an instantaneous velocity field and integrates it over multiple steps, whereas MeanFlow learns an average velocity over an interval to enable a single jump. The quantum implementation uses a parameterized circuit and classical preprocessing to learn these fields for MNIST generation.

  • Classical flow matching: Flow matching transports a known reference distribution to the data distribution by learning a time-dependent velocity field.
  • Classical flow matching: Inference solves the learned ordinary differential equation in reverse from noise to data, using the current output as the next step's input.
  • Classical flow matching: Independent data-noise pairs can imply different velocities at the same point, producing curved trajectories that require several small integration steps.
  • Classical MeanFlow: MeanFlow replaces instantaneous velocity with average velocity over an interval, making single-step sampling possible.
  • Classical MeanFlow: The exact displacement relation allows generation to draw z1 from N(0, I) and produce z0 with one learned average-velocity evaluation.
  • Classical MeanFlow: The MeanFlow loss is obtained by differentiating the displacement relation, with stop-gradient used to prevent differentiation through the bracketed expression.
  • Quantum implementation: The quantum models use a parameterized quantum circuit to learn velocity fields, with a classical autoencoder supplying latent inputs.

3 Quantum MeanFlow (QMF)

QMF and QFM use a shared autoencoder–quantum-circuit architecture for latent-space MNIST generation, differing in whether the circuit learns average or instantaneous velocity. QMF supports single-step sampling, while QFM integrates its velocity field over multiple steps.

  • Data processing: Both models use a classical autoencoder to map 16 × 16 images into latent vectors before quantum processing.The encoder maps 256-dimensional images to 32-dimensional latent vectors.
  • Quantum ansatz: QFM learns instantaneous velocity, whereas QMF learns average velocity over a time interval.
  • Quantum ansatz: The QMF circuit uses 11 qubits, including separate qubits for interval endpoints, while the otherwise identical QFM circuit omits the initial-time qubit.
  • Quantum ansatz: The hardware-efficient circuits use 24 linear-chain layers, with 240 two-qubit gates for QMF and 216 for QFM.The topology maps directly onto IBM Heron R3 devices without routing overhead.
  • Training and sampling: Both models are trained classically with a statevector simulator because training directly on real hardware remains infeasible at current error rates.
  • Training and sampling: QMF generates samples in one step from noise using its average velocity, whereas QFM integrates instantaneous velocity with a chosen numerical integrator.Statevector comparisons use 60 QFM time steps with Heun integration and one QMF step.

4 Results

The results compare QFM and QMF across simulator, quantum-hardware, and finite-shot settings. QMF enables single-step generation with lower image quality than multi-step QFM, but it outperforms single-step QFM with Euler integration across shot counts, while additional steps improve robustness to sampling noise.

  • 0.85 versus 0.63 accuracy: statevector QFM with 60 Heun steps outperforms single-step QMF before rejection sampling.With best-of-N sampling at N = 8, both models reach 1.0 accuracy.
  • 10.62 versus 28.26 FID: single-sample QFM produces higher-quality images than single-step QMF before BoN rejection sampling.The paper identifies QMF’s higher FID as the trade-off for single-step sampling.
  • Figure 4 compares simulator and quantum-hardware samples for five-step QFM with Euler integration and single-step QMF.Simulator samples appear in the top row and hardware samples in the bottom row for both methods.
  • For low shot counts, QMF has better single-step FID than QFM with either integrator, while QMF always outperforms QFM with Euler integration.At 2048 shots, QFM with Heun begins performing better; Heun uses two circuit evaluations per step.
  • QFM Euler and QMF have accuracy within error bars, whereas QFM Heun generally performs better across the evaluated shot counts.The accuracy comparison uses 5 seeds × 100 samples.
  • At 256 shots, QFM Heun FID falls from 91.2 at one step to 16.1 at ten steps, showing that more steps improve robustness to sampling noise.Increasing time steps improves performance for both QFM and QMF, although multi-step generation relaxes the single-step condition.

5 Discussion

The paper applies MeanFlow to quantum flow matching, using a parameterized quantum circuit to learn average velocity for single-step generation. QMF outperforms single-step QFM, while multi-step sampling improves both models but exposes a capacity-related performance gap.

  • Quantum MeanFlow: Quantum MeanFlow applies the MeanFlow formulation to quantum flow matching, replacing instantaneous velocity learning with average-velocity learning for single-step generation.A parameterized quantum circuit replaces the classical neural network used to learn the velocity field.
  • Single-step performance: QMF delivers better single-step sampling performance than QFM, especially at lower shot counts where QFM degrades sharply.The comparison uses MNIST and evaluates performance across shot counts.
  • Multi-step performance: Increasing the number of sampling steps improves QMF performance, indicating that its average velocity is not learned exactly.If the average velocity were exact, single-step and multi-step sampling would have equal performance.
  • Limitations: QMF’s average-velocity target is harder to learn because it is higher dimensional, self-referential, and requires generating the whole trajectory at once.The paper attributes the observed performance gap to the limited capacity of the quantum circuit.
  • Limitations: More expressive quantum circuits could improve QMF, but greater depth, richer entanglement, or additional re-uploading may exceed current hardware capabilities.The proposed improvements include greater depth, richer entanglement, and additional data or time re-uploads.

6 Conclusion

The paper introduces QMF as a quantum MeanFlow approach for single-step generation on quantum hardware. It provides a viable alternative to multi-step QFM by reducing sequential circuit evaluations, while device-noise-related accuracy loss can be mitigated through best-of-N rejection sampling.

  • Contribution: QMF is the first application of classical MeanFlow to quantum flow matching and enables single-step sampling by learning average velocity over a time interval.Both QMF and QFM are benchmarked on MNIST, with training in simulation and inference on real quantum hardware.
  • Hardware efficiency: QFM requires sequential multi-step sampling, whereas QMF needs only one circuit evaluation per image on a quantum processing unit.The reduced evaluation count addresses increased hardware costs from sequential input and output.
  • Noise mitigation: Best-of-N rejection sampling can mitigate accuracy loss caused by device noise without modifying the circuit.This provides a post-sampling method for recovering performance on quantum hardware.
  • Implication: The work argues that reformulating the generative process can improve quantum generative-model viability under near-term hardware constraints.The paper presents this as a path toward more practical and scalable quantum generative modeling as hardware improves.
Loading 2609.02186v1…