WorksPhysics and Astronomy
Normalizing Flows for Classical Simulation of Quantum Circuits in Phase Space
Abstract
We present a novel framework to learn a representation of quantum circuits based on the phase space formulation of many-body systems. Given that -qubit states can be represented as probability distributions on a smooth -dimensional manifold, we show how unitary gates can be parameterized as normalizing flows between these distributions, opening a new avenue for quantum circuit simulation using generative models. We evaluate our method on three common families of quantum circuits, and show that its accuracy exceeds that of current state-of-the-art neural network methods for large system sizes.
Introduction
The problem of classical simulation of quantum many-body systems is pertinent to both the existence of quantum advantage, and to inference and control of quantum hardware [1, 2]. Naive methods for classical simulation of quantum systems include exact state-vector methods and Feynman-style path integral schemes [3, 4, 5], which are simple to implement yet have an algorithmic complexity that grows exponentially in the size of the system. Other techniques exploit the structure in certain classes of quantum circuits, such as Clifford-ness [6] or low tree-rank [7, 8], which lead to efficient classical algorithms but are not applicable to other circuits. For condensed matter systems in D or D, tensor network approaches comprise the vast majority of state-of-the-art algorithms [9, 10], under the assumption that the amount of entanglement in the system is bounded by the area of any bipartition. Recently, a new class of algorithms called Pauli propagation [11, 12] has also been shown to approximately simulate quantum circuits in low magic or noisy settings.
Machine-learning techniques have also been applied to the simulation of quantum systems. Neural quantum states (NQS) and its variations [13, 14, 15, 16, 17] offer compact representations and were shown to be able to evolve nontrivial many-body states. More recently, generative models have been used to learn representations of quantum states in the probabilistic formulation of quantum dynamics [18, 19, 20]. However, the accuracy of all of these methods typically degrades with system size and evolution time.
In this paper, we present a novel method to learn the output state of a quantum circuit based on the phase space formalism of many-body qubit systems [21]. Each intermediate state is represented as a probability distribution, and unitary gates are represented as normalizing flow transformations that map from one distribution to the next. Unlike previous methods, ours is based on a continuous input space rather than a discrete domain [13, 14, 15, 18], which avoids having to use continuous relaxations or hand-crafted embeddings. In addition, our architecture is naturally composable due to the sequential nature of normalizing flows, mirroring the structure of the quantum circuit. This is in contrast with previous methods which retrain a fixed architecture variationally after each gate [16, 17, 18]. We demonstrate our method on three common families of quantum circuits, and show that the classical fidelity of our model exceeds that of two neural network baselines [14, 18] as the size and depth of the circuit grows.
Methods
In this section we describe our framework to learn a representation of the states in a given quantum circuit. We give a brief overview of the phase space of multi-qubit systems before describing how quantum circuits can be modeled using normalizing flows.
Phase space representation
In the phase-space formalism, -qubit states are represented by probability distributions over the manifold , and unitary maps between states are given by a convolution with an integral kernel (or Feynman-like propagators). Although many different phase space representations exist [21], the clear choice here is the function due to its positivity, and thus its interpretation as a probability distribution. For an -qubit state , the function of is given by
where is shorthand for specifying a point on , and the spin coherent states are defined as [22, 23, 24]
One can show that the function is a valid probability distribution over under the usual spherical measure [21]. Examples of functions for some selected states are shown in App. A, see also [21].
Now suppose we have a unitary operator . Since is linear, there exists some transition kernel [21] such that, for any two states , with , we have
so that unitary maps in the Hilbert space correspond to convolution with the integral kernels . Explicitly, given , the kernel has the form
Importantly, if only acts on a small subset of qubits, the integral (3) need only be performed over the coordinates with (since the non-support qubits can be integrated out analytically), so the integral can be computed efficiently in this case. Examples of transition kernels for some common unitaries are shown in App. B.
Quantum circuits as normalizing flows
A quantum circuit is specified by an initial state along with an ordered collection of gates . The state after the -th gate is given by
From the previous section, each intermediate state can be represented as a probability distribution over via Eq. (1), and mapping between states and is accomplished by substituting the corresponding gate into Eq. (3). However, may in general contain negative values, which renders the naive efficient sampling scheme from the distribution given inapplicable [20, 25]. Our solution is therefore to represent the function of as a normalizing flow using the function of as the initial distribution. More specifically, suppose that is a flow transformation corresponding to . Then our goal is to find such that the function of is well-approximated:
with the right-hand-side being the usual change-of-variables formula for the probability density [26]. This process is composable: to approximate the function for a state , we can pushforward the function for the initial state through each of the flows in order.
We emphasize that the function is a distribution over an -dimensional manifold, and thus the normalizing flows can be implemented efficiently. The problem of the exponential growth of the Hilbert space is now a problem of model expressivity [13, 14].
The initial state is usually some fiducial state, which can be taken to be . This has the simple product function given by (see also App. § 7):
where, importantly, sampling and computing likelihoods are both efficient and exact. We parameterize each flow with trainable parameters , and train to minimize the KL divergence between the functions obtained via the transition kernel (3) and the ones given by the trainable flows:
where is the model’s approximation of , and . Assuming each gate acts on a small number of qubits, the KL divergences can be estimated efficiently using Monte Carlo sampling; the -th term requires samples from the th function, which can be obtained efficiently due to the composability of normalizing flows. Thus training uses only the learned functions, and the exact functions are used only to evaluate the trained model.
In practice, we pre-train each of the flows sequentially from to for better stability in the early stages of training, and then fine-tune all flows jointly on Eq. (8). Our framework is illustrated in Figure 1.

Figure 1. Our proposed framework for learning the output state of a quantum circuit. In the unitary picture (top half), the state of a quantum circuit is represented by the state vectors , and maps from one state to the next are given by unitary operators . In the phase-space picture (bottom half), the state of a quantum circuit is represented by its function, and maps from one state to the next are induced by flow transformations of phase space, which we parameterize by . Here, the distributions are shown over for illustrative purposes, but in reality are over .
Related work
Normalizing flows have also been applied to quantum systems directly. Closest to our work is Q-Flow [27], which likewise represents the Husimi function with a normalizing flow, but for open continuous-variable systems: the phase space is , and the flow is evolved in continuous time under the PDE that the Lindblad dynamics induces for . Flows have also been used as neural quantum states for continuous-variable many-body systems [28], and flow matching on spin Wigner functions has been used to learn distributions over multi-qubit states [29]. Our setting differs in three ways. First, we treat qubits, whose phase space is the compact manifold . Second, the dynamics is a sequence of discrete gates, whose phase-space action is a convolution rather than a differential operator. Third, instead of re-fitting or evolving a single flow, we assign one flow per gate and compose them.
Experiments
To evaluate our framework, we train normalizing flow models for three families of quantum circuits: 1D cluster state preparation, GHZ state preparation, and ground state preparation of a 1D transverse-field Ising model (TFIM) at the critical point. These are the same families of circuits that were used for evaluation in [18].
For our normalizing flow architecture, we use a continuous normalizing flow [30, 31] over the manifold for each unitary operator, using a simple multi-layer perceptron (MLP) to parameterize the vector field. We train on the loss function in equation (8) with the Adam optimizer [32] with learning rate 0.001 until convergence.
Nothing in our method uses the Clifford structure of the GHZ and cluster circuits. They were chosen because exact functions are available at large , and to allow direct comparison with [18]. In contrast, the VQE circuit contains arbitrary-angle rotations and is not Clifford.
We evaluate the trained model by computing the classical fidelity between the function of the true state and the final predicted distribution :
since it is efficient to estimate for large system sizes (whereas computing the quantum fidelity is intractable). We compare against the results in [18], which uses a transformer architecture to learn the IC-POVM probability vector of a state instead of the function, and evaluates it using the discrete version of the classical fidelity (9). We pull the metrics directly from [18]. For the 1D cluster state and GHZ state, we also benchmark against neural quantum states (NQS) [14], which uses the TDVP algorithm to find optimal parameters that solve the dynamics. In this case, we run the training routine from scratch, using an MLP to parameterize the real and imaginary parts of the wavefunction and the stochastic reconfiguration algorithm for TDVP time-stepping.
The results are shown in Figure 2 and Figure 3. At the largest sizes, our model reaches at for the cluster state, compared with 0.91 (IC-POVM) and 0.84 (NQS) at , and for the GHZ state, compared with 0.95 (IC-POVM) and 0.96 (NQS). For the VQE circuit, we see that the fidelity decreases roughly linearly by per gate, reaching 0.985 compared with 0.965 for the transformer.

(a) 1D cluster state preparation

(b) GHZ state preparation
Figure 2. Classical fidelity between the exact representation of the final state and the output distribution of the normalizing flow model, as a function of the total number of qubits. For comparison, we show the fidelities obtained in [14] and [18].
Figure 3. Classical fidelity between the exact representation of each intermediate state and the learned distribution of the normalizing flow model, as a function of the gate number for a 10-qubit VQE circuit for TFIM ground state preparation. For comparison, we show the fidelities obtained in [18].
Discussion and limitations
Computational cost. Each gate has its own flow, so the number of parameters grows linearly with the number of gates . Training gate requires evaluating at new points, which means inverting the preceding flows, so the total training cost grows as . In contrast, the baseline neural methods retrain a fixed-size model after each gate, so their total training cost grows as . As a result, Figure 2 and Figure 3 compare accuracy at a given system size and are not compute-matched.
Negativity. The model is necessary in the first place because the transition kernels generally contain negative values. Despite this, convolution with the kernel can be computed efficiently assuming that only has support on a small number of qubits (say 2), since the unsupported coordinates can be integrated out analytically. On the other hand, simulating the whole circuit as a single unitary gate would require integrating over all coordinates. Thus the sign problem manifests as approximation error of the learned model, which compounds exponentially with the circuit depth (see Figure 3).
State dependence. For a single-qubit gate acting on qubit , the function transforms exactly via the rotation that induces on the -th Bloch sphere. Hence is an exact flow that is independent of the input, including for non-Clifford gates such as . For entangling gates however, no such flow exists in general. Each learned is therefore an approximate transport map from to its convolution with . For a different input state , the transport map does not carry over and would need to be retrained.
Conclusion and outlook
In this contribution, we introduced a novel framework to learn the output state of a quantum circuit based on normalizing flows in the phase space representation, and showed numerically that the method is able to scale well to large system sizes.
Natural next benchmarks are Trotterized dynamics of local Hamiltonians, in regimes that challenge tensor networks and Pauli propagation, as well as noisy and open-system evolution [33]. Since local observables can be estimated from flow samples, the composed flow could also serve as a variational ansatz: one would optimize the gate parameters of a circuit using energies estimated through the flows.
Acknowledgements
The authors acknowledge support from Quside Technologies SL for providing GPU resources used in the experiments.
EJ acknowledges support from the predoctoral program AGAUR-FI ajuts (2025 FI-1 00298) Joan Oró, which is backed by the Secretariat of Universities and Research of the Department of Research and Universities of the Generalitat of Catalonia, as well as the European Social Plus Fund.
TH acknowledges support from the Government of Spain (Severo Ochoa CEX2019-000910-S, Quantum in Spain, FUNQIP and European Union NextGenerationEU PRTR-C17.I1), the European Union (PASQuanS2.1, 101113690 and Quantera Veriqtas), Fundació Cellex, Fundació Mir-Puig, Generalitat de Catalunya (CERCA program), the ERC AdG CERQUTE and the AXA Chair in Quantum Information Science.
Q Functions of Selected States
Recall that the function is defined as
where , and the coherent state is given by
In Table 1 we show the functions for the eigenstates of the single-qubit Pauli operators, the four 2-qubit Bell states, and the 3-qubit GHZ and W states.
| # qubits | State | function |
| 1 | ||
| 1 | ||
| 1 | ||
| 1 | ||
| 1 | ||
| 1 | ||
| 2 | ||
| 2 | ||
| 2 | ||
| 2 | ||
| 3 | ||
| 3 |
Table 1. functions for selected states
Transition Kernels of Selected Unitaries
Recall that the transition kernel of a unitary is defined as
for all states , such that . In Table 2 we show the kernels for the Pauli , , and gates, as well as an arbitrary rotation and the two-qubit controlled gate. Altogether these operators form a universal set of gates.
| Unitary | Kernel |
Table 2. Transition kernels for common unitary operations
For brevity, we define
References
- [1]Hsin-Yuan Huang, Soonwon Choi, Jarrod R. McClean, and John Preskill. Vast world of quantum advantage. Phys. Rev. X, 16:030501, 2026.DOI
- [2]Michael A Nielsen and Isaac L Chuang. Quantum computation and quantum information. Cambridge university press, 2010.
- [3]Mark D Penney, Dax Enshan Koh, and Robert W Spekkens. Quantum circuit dynamics via path integrals: Is there a classical action for discrete-time paths? New Journal of Physics, 19(7):073006, 2017.DOI
- [4]Christopher M Dawson, Henry L Haselgrove, Andrew P Hines, Duncan Mortimer, Michael A Nielsen, and Tobias J Osborne. Quantum computing and polynomial equations over the finite field z_2. arXiv preprint quant-ph/0408129, 2004.DOI
- [5]B Rudiak-Gould. The sum-over-histories formulation of quantum computing; 2006. arXiv Preprint arXiv: Quant-Ph/0607151.
- [6]Daniel Gottesman. The heisenberg representation of quantum computers. arXiv preprint quant-ph/9807006, 1998.arxiv.org/abs/quant-ph/9807006
- [7]Igor L Markov and Yaoyun Shi. Simulating quantum computation by contracting tensor networks. SIAM Journal on Computing, 38(3):963–981, 2008.DOI
- [8]Nadav Yoran. Efficiently contractable quantum circuits cannot produce much entanglement. arXiv preprint arXiv:0802.1156, 2008.arxiv.org/abs/0802.1156
- [9]Guifré Vidal. Efficient classical simulation of slightly entangled quantum computations. Physical review letters, 91(14):147902, 2003.DOI
- [10]Guifré Vidal. Class of quantum many-body states that can be efficiently simulated. Physical review letters, 101(11):110501, 2008.pubmed.ncbi.nlm.nih.gov/18851269
- [11]Manuel S. Rudolph, Tyson Jones, Yanting Teng, Armando Angrisani, and Zoë Holmes. Pauli propagation: A computational framework for simulating quantum systems. PRX Quantum, 7:032001, 2026.DOI
- [12]Manuel S Rudolph, Enrico Fontana, Zoë Holmes, and Lukasz Cincio. Classical surrogate simulation of quantum systems with lowesa. arXiv preprint arXiv:2308.09109, 2023.arxiv.org/abs/2308.09109
- [13]Juan Carrasquilla, Giacomo Torlai, Roger G Melko, and Leandro Aolita. Reconstructing quantum states with generative models. Nature Machine Intelligence, 1(3):155–161, 2019.DOI
- [14]Giuseppe Carleo and Matthias Troyer. Solving the quantum many-body problem with artificial neural networks. Science, 355(6325):602–606, 2017.DOI
- [15]Or Sharir, Yoav Levine, Noam Wies, Giuseppe Carleo, and Amnon Shashua. Deep autoregressive models for the efficient variational simulation of many-body quantum systems. Physical review letters, 124(2):020503, 2020.DOI
- [16]Kaelan Donatella, Zakari Denis, Alexandre Le Boité, and Cristiano Ciuti. Dynamics with autoregressive neural quantum states: Application to critical quench dynamics. Physical Review A, 108(2):022210, 2023.DOI
- [17]Irene López Gutiérrez and Christian B Mendl. Real time evolution with neural-network quantum states. Quantum, 6:627, 2022.
- [18]Juan Carrasquilla, Di Luo, Felipe Pérez, Ashley Milsted, Bryan K Clark, Maksims Volkovs, and Leandro Aolita. Probabilistic simulation of quantum circuits using a deep-learning architecture. Physical Review A, 104(3):032610, 2021.
- [19]EO Kiktenko, AO Malyshev, AS Mastiukova, VI Man’ko, AK Fedorov, and D Chruściński. Probability representation of quantum dynamics using pseudostochastic maps. Physical Review A, 101(5):052320, 2020.DOI
- [20]John van de Wetering. Quantum theory is a quasi-stochastic process theory. Electronic Proceedings in Theoretical Computer Science, 266:179–196, February 2018.
- [21]Timothy Heightman, Edward Jiang, Ruth Mora-Soto, Maciej Lewenstein, and Marcin Płodzień. Quantum machine learning in multi-qubit phase-space part i: Foundations. arXiv preprint arXiv:2507.12117, 2025.arxiv.org/abs/2507.12117
- [22]Askold M Perelomov. Coherent states for arbitrary lie group. Communications in Mathematical Physics, 26(3):222–236, 1972.DOI
- [23]J Michael Radcliffe. Some properties of coherent spin states. Journal of Physics A: General Physics, 4(3):313–323, 1971.DOI
- [24]Wei-Min Zhang, Robert Gilmore, et al. Coherent states: Theory and some applications. Reviews of Modern Physics, 62(4):867, 1990.DOI
- [25]D Chruściński, VI Man’ko, Giuseppe Marmo, and Franco Ventriglia. On pseudo-stochastic matrices and pseudo-positive maps. Physica Scripta, 90(11):115202, 2015.DOI
- [26]Danilo Rezende and Shakir Mohamed. Variational inference with normalizing flows. In International conference on machine learning, pages 1530–1538. PMLR, 2015.arxiv.org/abs/1505.05770
- [27]Owen M. Dugan, Peter Y. Lu, Rumen Dangovski, Di Luo, and Marin Soljačić. Q-flow: Generative modeling for differential equations of open quantum dynamics with normalizing flows. In ICML, volume 202 of PMLR, pages 8879–8901, 2023.arxiv.org/abs/2302.12235
- [28]Scott Lawrence, Arlee Shelby, and Yukari Yamauchi. Quantum states from normalizing flows. arXiv:2406.02451, 2024.arxiv.org/abs/2406.02451
- [29]Jaehoon Hahm, Tak Hur, Joonseok Lee, and Daniel K. Park. Generative modeling of quantum distribution with functional flow matching. In QTML (extended abstract), 2024. arXiv:2607.00301.
- [30]Will Grathwohl, Ricky TQ Chen, Jesse Bettencourt, Ilya Sutskever, and David Duvenaud. Ffjord: Free-form continuous dynamics for scalable reversible generative models. arXiv preprint arXiv:1810.01367, 2018.arxiv.org/abs/1810.01367
- [31]Luca Falorsi. Continuous normalizing flows on manifolds. arXiv preprint arXiv:2104.14959, 2021.arxiv.org/abs/2104.14959
- [32]Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.arxiv.org/abs/1412.6980
- [33]Goran Lindblad. On the generators of quantum dynamical semigroups. Communications in mathematical physics, 48(2):119–130, 1976.DOI
