Research
Quantum MeanFlow: single-shot generative sampling on NISQ hardware
Overview Research area: Quantum machine learning, specifically quantum generative models and quantum flow matching implemented on noisy intermediate-scale quantum (NISQ) hardware. Technical level: Int

- arXiv
- 2609.02186
- Published
- 2026-09-02
- Authors
- Ashish Joshi, Eshaan Mistry, Takahiko Koyama
AI summary
Overview
Research area: Quantum machine learning, specifically quantum generative models and quantum flow matching implemented on noisy intermediate-scale quantum (NISQ) hardware.
Technical level: Intermediate. The paper assumes familiarity with generative modeling, ordinary differential equations, and basic parameterized quantum circuits.
Scope: The paper introduces Quantum MeanFlow (QMF), a quantum analogue of the classical MeanFlow formulation, and benchmarks it against multi-step quantum flow matching (QFM) for generating MNIST digit images in simulation and on IBM quantum processors.
What This Paper Is About
Quantum flow matching generates data by learning a velocity field that transports noise into data, but inference requires numerically integrating an ordinary differential equation over many time steps. On a quantum computer, each step must be submitted sequentially because the output of one step becomes the input to the next, which is costly given the high input/output cost of quantum hardware. The paper asks whether learning an average velocity over a time interval, as in classical MeanFlow, can enable a quantum model to generate an image in a single circuit evaluation without sacrificing too much sample quality.
Key Contributions
-
Introduces Quantum MeanFlow (QMF): The first application of the classical MeanFlow formulation to quantum flow matching for classical image generation. Instead of learning an instantaneous velocity field at each time step, QMF trains a parameterized quantum circuit to learn the average velocity over a time interval, enabling single-step sampling.
-
Designs a NISQ-compatible quantum ansatz: The QMF circuit uses 11 qubits: 5 data qubits, one qubit for the interval start time (r), one for the end time (t), and 4 class-label qubits. The QFM circuit is identical except that it omits the (r) qubit and learns the instantaneous velocity. The trainable block has (L=24) layers in a linear-chain topology, with 10 CNOTs per layer for QMF (240 two-qubit gates) and 9 CNOTs per layer for QFM (216 two-qubit gates).
-
Benchmarks QMF against QFM on MNIST: Both models use the same classical autoencoder and classifier scaffolding, so most differences can be attributed to the QMF formulation rather than architecture changes. Images are downsampled to (16\times16), encoded into a 32-dimensional latent vector, and generated conditionally by digit class.
-
Demonstrates inference on IBM quantum hardware: The trained models are executed on IBM Heron r2
ibm_pittsburghand Heron r3ibm_bostonmachines. Best-of-(N) rejection sampling with (N=8) recovers much of the accuracy lost to device noise without modifying the circuit.
Main Findings
-
Simulator accuracy: With statevector simulation, QFM using 60 time steps and the Heun integrator generates the correct digit for a given class with accuracy 0.85, while single-step QMF achieves 0.63. Under best-of-(N) sampling with (N=8), both models saturate to accuracy 1.0.
-
Image quality: Single-sample FID is 10.62 for QFM and 28.26 for QMF, compared with pre-training FIDs of 125.6 and 150.3 respectively. The FID floor using classifier features for real images is 1.89, and each FID calculation uses 2000 samples. QMF therefore trades image quality for single-step sampling.
-
Hardware correlation: The Pearson correlation between hardware output and ideal values is 0.57 on
ibm_bostonand 0.26 onibm_pittsburghfor QFM, and 0.23 and 0.10 for QMF. The lower values on the Heron r2 machine are attributed to higher gate errors. -
Hardware accuracy and rejection sampling: On the QPU, single-sample accuracy falls to 0.30 for QFM and 0.20 for QMF. Best-of-(N) sampling with (N=8) raises these to 0.80 for QFM and 0.60 for QMF, close to the single-sample simulator accuracy.
-
Shot-count behavior: At low shot counts, QMF has better single-step FID than QFM for both Euler and Heun integrators. At 2048 shots, the Heun integrator begins to perform better, but Heun uses two circuit evaluations per time step. QMF consistently outperforms single-step QFM with the Euler integrator, which uses one circuit evaluation per time step. For accuracy across 5 seeds and 100 samples, QFM Euler and QMF agree within error bars, while QFM Heun generally performs better.
-
Multi-step robustness: Increasing the number of time steps improves quality and accuracy even at very low shot counts. For QFM with the Heun integrator, FID at 256 shots falls from 91.2 at one step to 16.1 at ten steps. At moderately high shot counts, 5 and 10 time steps have nearly the same FID of approximately 10.5. The QMF model also improves with multiple steps but does not reach the accuracy or FID of QFM.
-
Cost comparison: Five-step Heun sampling at 256 shots, totaling (5\times2\times256=2560) shots, gives similar quality and accuracy to single-step Heun sampling at 8192 shots, totaling (2\times8192=16384) shots. The authors frame this as robustness to shot noise rather than a hardware cost reduction, because each additional step adds a sequential circuit submission with fixed overhead.
-
Capacity gap: QMF's multi-step performance exceeding its single-step performance suggests that the average velocity was not learned exactly. The authors attribute this to the limited capacity of the quantum circuit executable on NISQ hardware.
Methodology in Plain English
The researchers start with the MNIST handwritten digit dataset, which has 60,000 training and 10,000 test images. The original (28\times28) images are reduced to (16\times16) using bicubic anti-aliased interpolation. A classical autoencoder, a multilayer perceptron with layers (256\to256\to128\to64\to32) and a mirrored decoder, compresses each flattened 256-dimensional image into a 32-dimensional latent vector. It has approximately (2.2\times10^{5}) parameters and is trained for 60 epochs with AdamW at a learning rate of (2\times10^{-3}), weight decay (10^{-5}), and cosine annealing. A separate three-layer classifier (256\to256\to128\to10) reaches 98.2% test accuracy and is used to measure generated-sample accuracy and to perform best-of-(N) selection. The classical machinery is frozen during quantum training and sampling.
The quantum circuit learns the velocity field in this latent space. Continuous latent values are angle-encoded into five data qubits through a trainable linear map, while the four class-label qubits use basis encoding so that each digit corresponds to an orthogonal computational basis state. Time is encoded as (R_Y(\pi t)) and, for QMF, (R_Y(\pi r)). The circuit has 24 layers of single-qubit rotations and nearest-neighbor CNOT chains. Its output is a 30-dimensional vector of single-qubit and pairwise Pauli expectation values in the (Z) and (X) bases, mapped to a 32-dimensional latent vector by a trainable classical readout and scaled by a trainable scalar. The magnitude of the latent vector is carried classically, while the quantum circuit supplies the velocity direction.
Both models are trained in the PennyLane default.qubit statevector simulator using AdamW with a learning rate of (3\times10^{-3}), weight decay (10^{-5}), cosine annealing, gradient-norm clipping at 1.0, and 30 epochs. QFM minimizes the standard flow-matching loss against the target velocity (\varepsilon-x). QMF minimizes the MeanFlow identity loss, which includes a stop-gradient target involving the total time derivative of the learned average velocity. The authors simplify the original MeanFlow training by drawing (r) and (t) as the minimum and maximum of two uniform samples and by using an unweighted squared error instead of adaptive weighting.
For inference, QFM integrates the learned instantaneous velocity from noise to data using Euler or Heun steps. QMF draws noise (z_1) and produces (z_0=z_1-u_\theta(z_1,r=0,t=1,c)) in one step. On hardware, each measurement basis requires a separate job, so QMF needs two jobs per image, while QFM needs two jobs per Euler step and four jobs per Heun step. The authors used 4096 shots per measurement basis and, for QFM on hardware, only 5 time steps with the Euler integrator to limit cost. They also report that zero-noise extrapolation provided no gain at this circuit depth.
Why This Matters
This work shows that changing the generative formulation itself, rather than relying only on better hardware or error mitigation, can make quantum generative models more practical on near-term devices. By replacing many sequential circuit evaluations with a single evaluation per measurement basis, QMF addresses a major bottleneck in NISQ inference: the cost and latency of repeated quantum input/output. The result is relevant to anyone evaluating whether quantum circuits can serve as useful generative models before fault-tolerant hardware arrives.
Potential applications:
- Rapid previewing: Generating quick candidate samples when latency matters more than per-sample fidelity.
- Large-scale candidate generation: Producing many samples for downstream classical filtering or selection.
- Latency-constrained quantum workflows: Reducing sequential circuit submissions where each job incurs queue and readout overhead.
- Shot-budget-constrained NISQ deployments: Using one circuit evaluation with a larger shot budget instead of distributing shots across many sequential circuits.
Industry relevance: The paper is directly relevant to cloud quantum computing providers and teams building quantum machine learning pipelines on IBM hardware. It also provides a practical benchmark for deciding when single-step quantum generation is preferable to multi-step integration under realistic device noise and job overhead.
Future Directions
- More expressive quantum circuits: The authors suggest greater depth, richer entanglement, and additional data or time re-uploads to improve QMF's average-velocity learning, while keeping circuits executable on NISQ hardware.
- More complex datasets: MNIST appears to be an easy target where QFM saturates at 10 integration steps; testing larger and more complex datasets is an open direction.
- Better hardware fidelity: Higher-fidelity devices and deeper reliable circuits would enable higher-quality samples from both QFM and QMF.
- Closing the single-step versus multi-step gap: Understanding and reducing the performance gap between QMF single-step sampling and multi-step sampling remains an open modeling and circuit-design question.
Target Audience
This paper benefits quantum machine learning researchers, generative modeling researchers interested in flow matching and diffusion alternatives, NISQ experimentalists evaluating real-hardware inference, and graduate students working at the intersection of quantum computing and generative AI. It is also useful for industry teams assessing the practical cost and quality tradeoffs of quantum generative models on current cloud-accessible hardware.
Authors’ abstract
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.