WorksPhysics and Astronomy
High-Accuracy Neural-Network Quantum States via Randomized Real-Time Dynamics
Abstract
Neural-network quantum states (NQSs) exhibit a disparity in converging to the ground state during energy minimization: while the energy converges quadratically with the error in the variational wave function, other observables converge only linearly, which limits the accuracy of physical predictions. Here we show how to close this gap by introducing a new algorithm that improves the accuracy of NQSs. Our method, termed dynamical averaging, estimates expectation values by averaging over a state (or observable) evolved in real-time. Using insights from quantum information, we prove an up-to-quadratic suppression of error in arbitrary ground state observables, thus matching the fast convergence of the energy. Importantly, this improved accuracy requires neither further energy minimization nor increased model complexity, but rather exploits the effect of randomization on quantum states. We demonstrate dynamical averaging on non-integrable spin models, where it accelerates convergence and substantially reduces errors in observables.
Introduction
A contemporary line of work has leveraged machine learning to tackle quantum many-body problems [1]. This is epitomized by neural-network quantum states (NQSs) [2], a class of powerful variational ansätze that parameterize quantum states by neural networks. Supported by the rich expressivity of neural networks [3, 4], NQSs can accurately model complex quantum systems, including ground states, real-time dynamics, field theories, and quantum materials [5, 6, 7, 8, 9, 10]. As such, these methods hold broad applications in chemistry, condensed matter physics, and materials science [11, 12, 13, 14].
Despite their success, NQSs still incur a small, but non-negligible, systematic error in approximating a target state, which limits their ability to accurately estimate quantities of interest. For example, in approximating a ground state, this error can affect the accuracy of relevant observables like correlation functions, electron densities, and dipole moments [15, 16, 17]. In fact, the error suffered by an arbitrary ground state observable can be significantly larger than the error in the energy, creating a disparity that limits physical predictions [18, 19, 20].
Conventional wisdom in machine learning suggests that reducing this systematic error requires additional optimization or a more expressive model. Remarkably, neither is necessary for NQSs: in this work, we introduce dynamical averaging as a quantum-inspired algorithm that provably reduces systematic error through real-time evolution. Crucially, this does not require further energy minimization nor increased model complexity.
In more detail, we make three main contributions in this work. First, (1) we draw upon results from quantum information to prove that randomly evolving an NQS in real-time provides an up-to-quadratic suppression of systematic errors (i.e. ). Then, (2) we develop dynamical averaging as an algorithm that realizes this error suppression by averaging over real-time dynamics. We formulate this in both the Schrödinger and Heisenberg pictures, where either the NQS or target observable evolves in time, respectively. In the latter, we also develop an approximation that avoids explicit real-time evolution by adding a correction to the standard observable estimate. Lastly, (3) we showcase dynamical averaging on non-integrable spin models in 1D and 2D, where it achieves faster convergence and significantly reduces errors in correlation functions and magnetizations.
Collectively, these contributions improve the accuracy of ground state observables, bringing their convergence closer to that of the energy and addressing the aforementioned disparity. These findings also reveal the surprising utility of time evolution as a tool for optimization, suggesting that real-time dynamics may become an important ingredient in future optimization algorithms.
Background
NQSs parameterize a state vector by a set of parameters and minimize its energy to approximate the ground state according to the variational principle. The energy is estimated using variational Monte Carlo (VMC) [13, 21, 22, 23], which expresses it as a classical expectation value over configurations :
Here is the NQS in a basis , and is the local energy. Thus, the energy can be estimated by sampling and evaluating the mean of . Analogous expressions hold for other observables, e.g. , upon replacing with the appropriate local observable . This approach is also used to evaluate the gradient of energy with respect to and perform optimization.
Motivation—Our work is motivated by a simple observation: when optimizing an NQS to approximate a ground state, the energy is often far more accurate than other observables. To illustrate this, Figure 1 depicts the energy minimization process of an NQS applied to an Ising model. Here, we see that the error in energy decays faster than the error in a correlation function and reaches values a few orders of magnitude smaller. This discrepancy is notable because the energy does not entirely characterize the ground state; other observables like correlation functions and magnetization are often of equal physical interest.
Figure 1. Application of an NQS to the mixed field Ising model on spins (see Experiments section below for details). We show the relative error in the energy and a correlation function at the center of the chain .
This phenomenon is generic in NQSs (and other variational methods, like tensor networks) and stems from the ground state being an eigenstate of the Hamiltonian. Specifically, the energy converges quadratically with the error in the wave function, while other observables only converge linearly. To see this, consider an NQS that approximates the ground state as
where is the ground state, is a linear combination of excited states, and characterizes the error.1 Then, the relative error in an observable is:
For an arbitrary observable, where in general, the relative error scales as . In contrast, for the energy (), orthogonality of the eigenstates dictates that , which reduces the relative error to .
This observation can be formalized through a metric from quantum information known as the trace distance, which measures the deviation between two density matrices and : , where denotes the Schatten 1-norm (sum of singular values). The trace distance is especially useful as it bounds the difference in expectation values as [24]:
which is tight for arbitrary observables . For the NQS in Eq. (2), a straightforward calculation shows that its trace distance with the ground state is , which implies that generally incurs errors in observables. However, because Eq. (4) is only an upper bound, certain observables can attain smaller errors; as we saw above, the energy enjoys error scaling.
At first glance, this discrepancy might appear fundamental because the energy is being minimized and may naturally converge faster than other observables. However, when applying machine learning to physics, we can often surpass naive expectations by exploiting physical insights, like symmetries and equations of motion. This naturally raises the question: can we use physical insights to estimate observables with the same accuracy as the energy? We answer yes, showing how randomized real-time dynamics reduces the trace distance to , thus improving the accuracy of arbitrary observables.
Improving Accuracy with Real-Time Evolution—Recent work in quantum information has shown that randomization can help in approximating unitary transformations [25, 26, 27]. Specifically, randomizing over many approximate transformations can outperform any single deterministic approximation of the same cost, achieving up to quadratically smaller error.
Here we repurpose this concept to quadratically suppress errors in NQSs and resolve the disparity described above. In this setting, the analogous approach is to randomize over an ensemble of NQSs, which can approximate the ground state more accurately than a single NQS. Operationally, this amounts to taking a NQS, , and promoting it to a corresponding mixed state, which we denote by . In doing so however, we will not seek to optimize over NQS representations of such mixed states, which could be costly. Rather, we introduce a simple procedure that maps to .
The key idea of our procedure is to randomly apply operations that behave differently on the eigenstates of , enabling us to selectively suppress contributions from excited states. We realize this by evolving in real-time for random durations, thus promoting it to the following mixed state:
where is a probability distribution that we will specify later. Intuitively, this procedure imparts a random (relative) phase on the excited state components in , which suppresses their contributions. Equivalently, this decoheres the off-diagonal elements of the density matrix in the energy eigenbasis, yielding a more accurate approximation of the ground state. We make this statement rigorous as follows:
Theorem 1. Suppose an NQS approximates a ground state with trace distance error . Then, the mixed state (defined in Eq. (5)) suffers error
where are the excitation energies, and is the characteristic function of .
We include the proof of this theorem in the Supplementary Material. This result shows that randomizing over real-time evolution yields a more accurate ground state approximation. If the characteristic function is sufficiently small, i.e. , then the trace distance is suppressed to . Otherwise, the trace distance is bounded by , which is still an improvement because for all . Therefore, is able to achieve an up-to-quadratic reduction in trace distance, which by Eq. (4) translates to an equivalent reduction in the error of an arbitrary observable. This quadratic suppression is optimal in general; any stronger error suppression would imply a reduction in energy, which is not possible because real-time evolution conserves energy.
A remaining question is how to select a distribution with a sufficiently small characteristic function. In practice, often evaluates to , and so bounding this quantity generally requires either a lower bound on the spectral gap , or the ability to adaptively tune the distribution. For instance, if is chosen to be a zero-mean Gaussian with variance , then , and setting ensures . However, if is unknown, one can successively increase until and no further significant improvement in accuracy is observed. Alternatively, our recent work Ref. [28] establishes a result analogous to Theorem 1 for ground state preparation on quantum computers and derives optimal distributions for given a lower bound on the spectral gap. These distributions can also be applied here.
Overall, replacing with provides more accurate ground state observables. Realizing this in practice amounts to averaging over real-time evolution, applied to either the NQS or a target observable. As such, we call this algorithm dynamical averaging, and we will use it to improve estimates of ground state observables below. We remark that Theorem 1 applies when an NQS is close to the ground state in trace distance, as occurs in spin chains of moderate size or molecules in a compact basis. However, this requirement can become difficult to satisfy in the thermodynamic limit due to the orthogonality catastrophe [29, 30, 31]. While this poses challenges for conventional ansätze like configuration interaction, recent studies suggest that NQSs may exhibit more favorable scaling with system size, potentially mitigating these challenges [32]. In addition, as we show in the Supplementary Material, even in the thermodynamic limit dynamical averaging resolves a disparity between the energy and arbitrary observables. Specifically, the error in energy scales with only the diagonal elements of the state in the energy eigenbasis, whereas the error in an arbitrary observable receives contributions from both the diagonal and off-diagonal elements. Promoting to then suppresses its off-diagonal elements by a factor of . Under strong suppression, only the diagonal elements contribute appreciably to the error in an observable, recovering the same scaling as the energy.
Dynamical Averaging in the Schrödinger Picture
A direct way to simulate is through time evolution in the Schrödinger picture. In this context, we can use VMC to express an observable as a double expectation value:
Here is the time-evolved NQS in a basis , and is the time-evolved local observable. In contrast to standard VMC which samples configurations from , Eq. (7) suggests sampling from time-evolved states and averaging over times drawn from .
A convenient way to realize this double expectation value is to evolve in real-time, and collect expectation values during evolution. These expectation values can then be aggregated together according to Eq. (7). In practice, when time evolution is implemented as a sequence of time steps, we realize dynamical averaging by evolving in time and estimating the target observable at a collection of time steps. These expectation values are then weighted by and summed to estimate . Therefore, the main overhead lies in simulating real-time evolution on NQSs, for which numerous methods have been developed [6, 7, 33, 34, 35, 36, 37]. In order to preserve quadratic error suppression, one should use a time evolution method that suffers total error , especially as approaches the ground state. For example, a naive application of the time-dependent variational principle can be challenging because the ground state is a stationary point of the force vector that defines its parameter update rule [38]. Later in our experiments, we use projected time-dependent VMC [7] to better treat this issue.
Dynamical Averaging in the Heisenberg Picture— We can also simulate in the Heisenberg picture, where observables evolve in time. Here, Eq. (7) becomes an expectation value of a time-averaged observable:
This formulation can be realized with operator evolution methods, which can be advantageous as it avoids time-evolving a highly optimized NQS. Eq. (8) also reveals that dynamical averaging can only improve estimates of observables that do not commute with the Hamiltonian, since commuting observables remain invariant under time evolution. This is expected, as commuting observables already exhibit error (see Eq. (3)).
However, rather than implementing Eq. (8) with operator evolution, we develop an approximation that obviates time evolution altogether. Specifically, under the assumption that is primarily supported on the ground state and an excited state (i.e., ), we derive in the Supplementary Material:
To reach this expression, we take to be a zero-mean Gaussian with variance and take the limit of large .
The second term in Eq. (9) can be viewed as a correction to the standard observable estimate. To compute it, note that for a local observable and local Hamiltonian , the nested commutators and are both local observables, albeit with larger support than . These commutators can therefore be determined analytically (e.g., with computer algebra software) and their expectation values estimated using standard NQS methods, without performing explicit real-time evolution (see Supplementary Material for details).
We reiterate that Eq. (9) relies on being predominantly supported on two eigenstates, and its accuracy and numerical stability may deteriorate when this assumption breaks down. Heuristically, we may expect this approximation to be valid during optimization because energy minimization algorithms like stochastic reconfiguration approximate imaginary time evolution [39], which exponentially suppresses high energy eigenstates.
Experiments— Let us first exemplify dynamical aver-
aging in the Schrödinger picture (Eq. (7)) on the mixed field Ising model:
We set , , and , at which point the model is non-integrable, and first consider a periodic system of spins to allow comparison with the exact solution. We use an NQS parametrized by a restricted Boltzmann machine with feature density (using NetKet [40, 41]), and employ stochastic reconfiguration to minimize energy. For dynamical averaging, we choose to be a zero-mean Gaussian with variance , and perform time evolution using projected time-dependent VMC [7] with time step size .
In Figure 2a, we compare the correlation function during energy minimization, evaluated with both standard VMC and dynamical averaging. Dynamical averaging consistently achieves smaller errors, with the improvement becoming more pronounced as increases, in agreement with the discussion following Theorem 1. At , the relative error is reduced but still decays as like in standard VMC, while at it decays as before saturating around , likely due to inaccuracies in time evolution. The dashed lines in the inset depict the exact error.
Figure 2. Comparison of standard VMC and dynamical averaging in the Schrödinger picture. a) The correlation function in the 1D mixed field Ising model (Eq. (10)) on spins. b) The average magnetization in the 2D mixed field Ising model on spins.
We additionally consider a regime beyond exact diagonalization, studying the same model on a square lattice with periodic boundary conditions and couplings , , and . We follow the same procedure as above, but now using an NQS parameterized by a Vision Transformer [42, 43]. We focus on the average magnetization . Figure 2b again shows that dynamical averaging converges more quickly to the best estimate of this observable (obtained at the final iteration), with performance improving as increases.
Next, we study our approximation to dynamical averaging in the Heisenberg picture (Eq. (9)) applied to the
1D XXZ model with transverse magnetic field:
We set , , and , for which the model is non-integrable, and first consider a periodic system of spins to benchmark against exact diagonalization. We use an NQS parameterized by a restricted Boltzmann machine with feature density and the SPRING optimizer [44] to minimize energy. Figure 3a compares the connected correlation function evaluated with standard VMC and dynamical averaging. As evidenced in this plot, dynamical averaging suppresses relative errors by about an order of magnitude during optimization and accelerates convergence to the exact value. The relative error ultimately saturates around , limited by the accuracy of the approximation used to derive Eq. (9).
Figure 3. Comparison of standard VMC and (approximate) dynamical averaging in the Heisenberg picture. a) The connected correlation function in the 1D XXZ model (Eq. (11)) on spins. b) The same connected correlation function on spins.
Lastly, we study this system beyond exact diagonalization by considering the same model on spins, now with parameters and . Using the same approach as above, Figure 3b shows the connected correlation function during optimization, again demonstrating that dynamical averaging achieves faster convergence to the best estimate of this quantity.
Overall, these results show that dynamical averaging reduces errors and accelerates convergence, even in large systems. Nevertheless, the method has its limitations. Its realization in the Schrödinger picture requires evolving an NQS in real-time, which can be computationally costly in challenging systems. In contrast, our approach in the Heisenberg picture is much cheaper to evaluate, but relies on the assumption that is predominantly supported on a few low energy eigenstates. When this assumption is violated, this approach can experience additional errors and numerical instabilities. An interesting direction for future work is to refine dynamical averaging in the Heisenberg picture using operator evolution methods, like Pauli propagation [45, 46].
Conclusions— We have used insights from quantum information to develop a new NQS algorithm that improves ground state approximations. At a conceptual level, dynamical averaging exploits a fundamental feature of quantum mechanics: a quantum state is really a quadratic in the state vector, i.e. , whereas typical NQS methods optimize only the state vector . By averaging over many such state vectors, we promote the variational object to a mixed state that can better approximate the ground state. This adds to the growing body of research that uses randomization to improve quantum state preparation and estimation [28, 47, 48, 49, 50, 51].
Our work suggests several natural extensions. For one, dynamical averaging could be applied to excited state NQSs [17, 52], or extended to other variational methods like tensor networks [53, 54, 55, 56, 57, 58] and Jastrow ansätze [13, 22, 59]. Beyond classical simulation, the ideas developed here may also find use in related settings, such as in variational quantum algorithms [60, 61, 62] or machine learning problems that optimize an energy-like quantity.
Moreover, dynamical averaging can be generalized beyond real-time dynamics. In general, any operation that acts differently on the eigenstates of can, when appropriately randomized, suppress contributions from undesired states. For instance, symmetry operators, such as translations or rotations, can be randomly applied to selectively target states in certain symmetry sectors [63].
From a quantum information perspective, randomizing over symmetry operators to isolate a desired symmetry sector parallels the stabilizer formalism of quantum error correction [63, 64, 65]. However, unlike error correction, our procedure constitutes only a form of error mitigation, which reduces errors but cannot suppress them arbitrarily. Nonetheless, this connection suggests that NQSs, and classical simulation methods in general, could benefit considerably from a synthesis with quantum information, which provides both the conceptual and technical tools to design better simulation algorithms.
Code Availability— Code to run the experiments conducted in this paper is available on GitHub at https://github.com/rr637/DynamicalAveragingNQS.
Acknowledgments— JMM acknowledges insightful conversations with Alèv Orfi, Luciano Viteritti, Giuseppe Carleo, Dries Sels, Norm Tubman, Samuel Buckley-Bonanno, Noah Eckstein, and Sam Garratt.
This research was supported by PNNL’s Quantum Algorithms and Architecture for Domain Science (QuAADS) Laboratory Directed Research and Development Initiative. This research was supported by the Physical and Computational Sciences Directorate Seed, under the Laboratory Directed Research and Development Program at PNNL. This material is based upon work supported by the U.S. Department of Energy, Office of Science, National Quantum Information Science Research Centers, Quantum Science Center (QSC). PNNL is a multi-program national laboratory operated for the U.S. Department of Energy (DOE) by Battelle Memorial Institute under Contract No. DE-AC05-76RL01830.
References
Proof of Theorem 1
Proof. For simplicity, we will take the ground state energy to be zero, , and make appropriate replacements at the end of the proof to account for a non-zero ground state energy. Consequently, the excitation energies are . This effectively shifts the energy by a constant, which only changes physically-irrelevant global phases.
To begin, let us expand in the eigenbasis of as , where we take and without loss of generality. Then, for pure states and , their trace distance evaluates to [24], which implies that .
We can then prove the theorem by direct computation. Let us denote the time-evolved state as , and the density matrix of interest as . Let us also define . We can express the 1-norm that appears in as
where we have invoked the triangle inequality in obtaining the last line.
The first term is upper bounded as . To evaluate this, recall that the 1-norm is the sum of the singular values. Noting that is itself an un-normalized singular value decomposition, its 1-norm is the squared 2-norm of :
Therefore, we have that .
The next term in Eq. (12) similarly evaluates to
Inserting , and using the orthogonality of the eigenstates, this norm evaluates to
where is the characteristic function of , and we have used that . Furthermore, the third term in Eq. (12) is analogously upper bounded.
Collecting all the above terms, we have:
Then, reintroducing a non-zero ground state energy amounts to shifting the energies to excitation energies . This yields the stated bound:
For completeness, we note that the same result can alternatively be derived using the concept of randomized compiling [25, 26], as is often considered in quantum computing contexts.
High-Accuracy NQSs in the Heisenberg Picture
As we discussed in the main text, a straightforward way to realize dynamical averaging is by time-evolving the state vector as . This corresponds to the Schrödinger picture of quantum mechanics, where states evolve and observables remain fixed. Alternatively, dynamical averaging can also be realized in the Heisenberg picture, where states are static and observables evolve in time. This approach can be more favorable in classical simulation where directly time-evolving wave functions can be costly, in contrast to simulation on quantum computers where Schrödinger-picture time evolution is more efficient.
To develop dynamical averaging in the Heisenbergberg picture, consider estimating an observable in the mixed state from Eq. (5) in the main text: . We can express an observable as
Using the nested commutator expansion of a time-evolved operator, we write
where is a superoperator defined by the Taylor expansion:
Here the power notation denotes a nested commutator:
Substituting this into the integral in Eq. (18), we obtain
where is the characteristic function of . The superoperator is defined by the Taylor series of (assuming this series exists and converges), analogous to Eq. (20). That is, if , then .
Altogether, we can express an observable as
Eq. (23) contrasts conventional estimation of a ground state observable, in which one directly evaluates . Rather, Eq. (23) replaces the observable with the operator , which acts as a proxy for the observable . As this formulation is equivalent to dynamical averaging in the Schrödinger picture, it inherits the same results of the main text, including the quadratic suppression of error for general observables.
The operator has many favorable properties. By Eq. (22), it is clearly Hermitian because it is an average of Hermitian operators. In addition, because for any scalar constant , it is also invariant under shifting by a constant. Furthermore, for any distribution , so the first term in the expansion of is :
where are the coefficients of this expansion. The higher order terms can be interpreted as corrections to that improve the approximation to the ground state observable .
To better understand the action of , let us consider how it acts on the eigenstates of the Hamiltonian. In particular, let us consider the matrix element
Using the shift invariance of noted above, let us write . Writing the characteristic function as , we have
To evaluate this, note that in the expansion of the nested commutator , all terms with a factor of to the left of (e.g., ) annihilate the state and therefore vanish. The only term that remains is . Therefore, we have
We can use this to express the expectation value of the operator on a state as
where we have used . Compared to the standard expression for , Eq. (28) leaves the diagonal contribution unchanged, but modifies the off-diagonal terms by a factor of .
As we noted in the main text Eq. (3), the dominant error in ground state observables arises from off-diagonal contributions, which are precisely the terms that dynamical averaging seeks to suppress. By Theorem 1, we can achieve this suppression by choosing a probability distribution whose characteristic function is sufficiently small for . Eq. (28) makes this connection explicitly clear: multiplies the off-diagonal contributions and thus suppresses their contribution to the error. For example, in the main text we assumed the condition , which implies that for all pairs . Therefore, it suffices to choose to guarantee relative error in estimating .
Beyond this illuminating perspective provided by the Heisenberg picture, it also offers computational methods for implementing dynamical averaging. By Eq. (18), the expectation value is an average over time-evolved observables , which can be evaluated using operator-evolution methods like Pauli propagation methods [45, 46]. Moreover, in a later appendix section, we use the Heisenberg picture approach to derive an approximation to as a truncated expansion of nested commutators. This approximation is particularly useful because it obviates the need to perform explicit time evolution.
Analogy Between Dynamical Averaging and Imaginary Time Evolution
We note that the above analysis in the Heisenberg picture also indicates that dynamical averaging is similar to, but distinct from, imaginary time evolution. Consider taking the distribution to be a zero-mean Gaussian of width such that its characteristic function is , and thus .2 Then, computing the expectation value appears analogous to applying imaginary time evolution to for a time .
However, while both imaginary time evolution and dynamical averaging produce a finer approximation to ground state observables, they do so through different mechanisms. Imaginary time evolution suppresses all excited state amplitudes in , whereas dynamical averaging suppresses the off-diagonal elements of its density matrix in the energy eigenbasis. Moreover, imaginary time evolution requires renormalization of the state after its application, whereas dynamical averaging preserves the normalization of the state.
High-Accuracy NQSs in the Thermodynamic Limit
In the main text, Theorem 1 specialized to the case where an NQS is close in trace distance to the ground state. While this holds in finite sized systems, this intuition can break down in the thermodynamic limit due to the orthogonality catastrophe, where the fidelity between the variational state and ground state can be small (typically decaying with system size), even as local observables converge to their ground state values. Nevertheless, there still remains a disparity between the errors in the energy and arbitrary observables.
To analyze this, let us consider a state . The relative error in an observable is
where we have used . Thus, for an arbitrary observable where in general, its error receives contributions from both the diagonal and off-diagonal elements in the energy eigenbasis. In contrast, for the energy, the off-diagonal contributions vanish for , so its error depends only on the diagonal contributions. Qualitatively, this explains why even in large systems, the energy can converge faster than a generic observable, although the fidelity with the ground state may remain small.
We can use this reasoning to show that dynamical averaging still suppresses errors in these large systems, where assumptions on the trace distance with the ground state may not be appropriate. Eqs. (23) and (28) indicate that an observable computed with dynamical averaging suffers relative error
Evidently, the off-diagonal terms are suppressed by a factor of . This can be seen as analogous to a dephasing channel (or phase damping channel) [67], which similarly suppresses off-diagonal elements of the density matrix. For an appropriately chosen probability distribution whose characteristic function strongly suppresses these terms, only the diagonal terms contribute significantly to the error, yielding the same error scaling as the energy.
Therefore, in large systems the advantage of dynamical averaging is more naturally understood not as a quadratic suppression of the trace distance, but as a suppression of the off-diagonal contributions to the error in an observable. This provides a qualitative improvement in error scaling and enables one to estimate observables with the same accuracy as the energy. A precise quantitative improvement could be established under additional assumptions on the size of the diagonal and off-diagonal contributions.
Deriving an Approximation to Dynamical Averaging in the Heisenberg Picture
In this appendix, we derive an approximation to dynamical averaging in the Heisenberg picture that obviates the need to perform explicit time evolution. To begin, let us again take the distribution to be a Gaussian of width such that its characteristic function is , and so . Also, let the variational state be . Then, according to the discussion following Eq. (22), we have that
where we have defined the expectation value of the th-order nested commutator as
Next, note that by Eq. (28), we can equivalently express this quantity as
where we have defined as the sum of the diagonal contributions
As , converges to . Thus can be viewed as the best observable estimate obtained from dynamical averaging, corresponding to the complete suppression of all off-diagonal contributions. This provides the best approximation to the ground state observable without modifying the state .
While exactly evaluating generally requires real-time evolution, we can develop an approximation to it that avoids explicit time evolution as follows. First, we make the assumption that is close to the ground state, and that its deviation from the ground state is mostly concentrated on the first excited state (or really, any single excited state):
where . Heuristically, we expect this condition to be met as converges to the ground state under energy minimization. Under this approximation, the equality of Eqs. (29) and (31) indicates that
where is the spectral gap, and we have defined . By expanding in powers of , this expression translates to
Matching powers of , we find
This is a system of equations that can be solved to yield
from which can be extrapolated as
Inserting the expression for , we find that our approximation of the ground state observable is
To understand this expression, we can view the term as a correction to the ordinary observable estimate . To understand this correction term, note that both and are Hermitian (for any Hermitian ), which implies that their expectation values—and thus also the correction term—are manifestly real-valued. Moreover, when is a local observable and is a sum of local interactions, so too will and be local Hermitian observables, albeit with larger support than . In practice, we can evaluate these nested commutators analytically given a Hamiltonian and local observable (for instance, using computer algebra software). This means that we can evaluate their expectation values and on an NQS using standard VMC methods, without having to explicitly perform real-time evolution.
The correction term also displays other favorable properties. First, for any observable that commutes with the Hamiltonian, the corresponding correction term vanishes because . This is consistent with the fact that dynamical averaging only improves the accuracy of observables that do not commute with the Hamiltonian, as an observable that commutes with the Hamiltonian will already display error scaling as converges to the ground state (see Eq. (3) and the surrounding discussion). Second, as converges to the ground state, the correction vanishes. This is because acts as a constant on the ground state (), and thus the expectation value of a commutator of acting on the ground state is necessarily zero: . This is consistent with the fact that as converges to the ground state, the standard expectation value converges to , and so the correction should vanish. Lastly, we note that in both of these cases, the expectation values in the numerator and denominator of the correction term both vanish, which might appear to introduce a potential singularity. However, because the expectation value in the numerator is squared (see Eq. (39)), the numerator vanishes at a rate faster than the denominator, which stabilizes their ratio and ensures smooth convergence to zero.
Overall then, the expression for the correction term has a natural interpretation and exhibits several desirable properties. We emphasize however, that its derivation relies on the assumption that is predominantly supported on the ground state and a single excited state.
If this is not true, then Eq. (39) can incur numerical instabilities and may deviate from the targeted ground state observable. Nonetheless, if has appreciable support on the ground state and a few excited states (i.e., more than just one), the above derivation could be generalized to obtain a modified expression for the correction term. Such a generalization would likely require solving a larger system of equations and retaining terms beyond the fourth order nested commutator . Extending the our approximation to this setting, and thereby making it a more robust estimator of the ground state observables, would be an interesting direction for future work.
Realizing Approximate Dynamical Averaging in the Heisenberg Picture via Variational Monte Carlo
In the main text, we applied dynamical averaging to the XXZ model by using the approximation to dynamical averaging in the Heisenberg picture developed in the previous section. By Eq. (39), applying this to an observable requires computing the expectation values of the commutators and . For notational simplicity, let’s denote these nested commutators by
where we use the nested commutator notation defined in Eq. (21). We are interested in computing expectation values of and .
If is a local Hamiltonian, and is a local operator, then these nested commutators will also be sums of local operators. Therefore, one approach to estimating these expectation values is to determine analytically (either by hand or with computer algebra software) expressions for and , and then to estimate their expectation values by directly applying variational Monte Carlo to them:
where and are the corresponding local observables.
While this works in principle, these estimators suffer from large variances that require many samples to combat. To reduce variances, we can instead use the following different approach, motivated by the fact that in practice is close to the ground state. To begin, let us use the shift invariance of the commutator to write the expectation value of as
for any real constant . Next, note that is anti-Hermitian (), which enables us to express the above equation as
The remaining expectation value can then be equated to the following variational Monte Carlo expression by inserting a resolution of the identity in a basis :
where and are the corresponding local observables. Overall, this provides the expression
Lastly, we select , which reduces the variance of this estimator through the factor . This occurs because approaches as approaches the ground state. Therefore, with this choice, Eq. (45) dramatically reduces the variance of the estimator for , and thus also decreases the number of samples needed to estimate this expectation value accurately.
Furthermore, we can also derive an analogous expression for :
We use Eqs. (45) and (46) to estimate and in our experiments in the main text.
A further simplification is possible for periodic, translation invariant systems, where the expectation value of a local operator is independent of its position. When the NQS respects this translation symmetry, one may replace a single local operator acting on site (or more generally, a multi-site operator whose nontrivial support is anchored at site ) with its spatial average over the lattice:
without changing its expectation value. This spatial averaging provides an additional reduction in variance of the estimator. In our experiments in the main text, we apply this strategy to and to further reduce the number of samples required for accurate estimation of their expectation values.
Details on Numerical Experiments
In the experiments conducted in the main text, we applied dynamical averaging to various spin models. Here we used both dynamical averaging in the Schrödinger picture (i.e., Eq. (7)), which requires performing real-time evolution on the NQS, as well as our approximation to dynamical averaging in the Heisenberg picture (i.e., Eq. (9)), which requires computing nested commutators rather than explicit real-time evolution. In both cases, we use NetKet [40, 41] to implement NQSs, compute observables, perform energy minimization, and perform real-time evolution.
In applying dynamical averaging in the Schrödinger picture, we use different NQS ansätze for the 1D and 2D systems. For the 1D system with spins, we use a restricted Boltzmann machine [2] with feature density , symmetrized under lattice translations, yielding 27 complex parameters. For the 2D system with spins, we use a Vision Transformer with translation-invariant factored attention [42, 43], consisting of patches, embedding dimension , and two encoder layers with 8 attention heads and feed-forward expansion factor 2, yielding 33,888 real parameters. We optimize both ansätze using stochastic reconfiguration [22, 68]. We use standard stochastic reconfiguration for the 1D system, where , and minimum-step stochastic reconfiguration [69, 70] for the 2D system, where . The respective learning rates are and , with 1024 and 2048 samples. Both methods use a diagonal regularization shift of .
To perform dynamical averaging, we choose as a zero-mean Gaussian with variance . We perform real-time evolution using projected time-dependent VMC [7, [71], which approximates time evolution by minimizing the infidelity between a short-time evolution of the current state and a state within the variational manifold. We use the second-order Padé product expansion [35], requiring one compression per time step. For the 1D and 2D systems, respectively, we use time steps and , with 2048 and 4096 samples. Starting from selected states along the energy minimization trajectory, we evolve forward and backward over , with (1D) and (2D), and evaluate Eq. (7) with the truncated Gaussian weights renormalized over this interval. To resolve the improvements from dynamical averaging shown in Figure 2a and Figure 2b, we estimate the observables using additional samples.
In applying our approximation to dynamical averaging in the Heisenberg picture, we also used an NQS parametrized by a restricted Boltzmann machine with feature density , symmetrized under lattice translations. For both systems on and spins, we performed energy minimization with the SPRING algorithm [44], using learning rate , momentum , and diagonal regularization shift of . We also used samples to estimate the gradient of the energy and the quantum geometric tensor during optimization. To compute the expectation values of the nested commutators that comprise Eq. (39), we used VMC with the estimators derived in the previous section, namely Eqs. (45) and (46).
High-Accuracy NQSs as an Instance of Randomly-Compiled Quantum Monte Carlo
Recently, Ref. [72] developed a framework of randomly-compiled quantum Monte Carlo, which enhances quantum Monte Carlo (QMC) algorithms by strategically averaging over approximations. In standard QMC, an observable is estimated using a single approximation (e.g., a single Trotter formula). In contrast, randomly-compiled QMC estimates an observable as average over many approximations:
where is a probability distribution, and is the observable obtained using an approximation indexed by . Ref. [72] showed that this significantly reduces systematic error and provides an improvement over standard QMC algorithms.
Because NQSs incorporate variational Monte Carlo, which is itself a QMC algorithm, they naturally admit a randomly-compiled extension. To wit, this extension would estimate a ground state observable by averaging over a collection ground state approximations. Our dynamical averaging algorithm achieves precisely this. Indeed, Eq. (7) in the main text proposes to estimate a ground state observable as
Like Eq. (48), this expression is manifestly an average of observables evaluated in time-evolved states , each of which is an approximation to the ground state. Therefore, dynamical averaging can be interpreted as the randomly-compiled extension of variational Monte Carlo for NQSs.
References
- [1]G. Carleo, I. Cirac, K. Cranmer, L. Daudet, M. Schuld, N. Tishby, L. Vogt-Maranto, and L. Zdeborová, Machine learning and the physical sciences, Rev. Mod. Phys. 91, 045002 (2019).
- [2]G. Carleo and M. Troyer, Solving the quantum many-body problem with artificial neural networks, Science 355, 602 (2017).DOI
- [3]X. Gao and L.-M. Duan, Efficient representation of quantum many-body states with deep neural networks, Nature Communications 8, 662 (2017).
- [4]O. Sharir, A. Shashua, and G. Carleo, Neural tensor contractions and the expressive power of deep neural quantum states, Phys. Rev. B 106, 205136 (2022).DOI
- [5]J. Carrasquilla and G. Torlai, How to use neural networks to investigate quantum many-body physics, PRX Quantum 2, 040201 (2021).DOI
- [6]I. L. Gutiérrez and C. B. Mendl, Real time evolution with neural-network quantum states, Quantum 6, 627 (2022).
- [7]A. Sinibaldi, C. Giuliani, G. Carleo, and F. Vicentini, Unbiasing time-dependent variational monte carlo by projected quantum evolution, Quantum 7, 1131 (2023).DOI
- [8]J. M. Martyn, K. Najafi, and D. Luo, Variational neural-network ansatz for continuum quantum field theory, Physical Review Letters 131 (2023).DOI
- [9]D. Luo, D. Dai, and L. Fu, Pairing-based graph neural network for simulating quantum materials, Phys. Rev. B 113, 165107 (2026).arxiv.org/abs/2311.02143
- [10]A. Foster, Z. Schätzle, P. B. Szabó, L. Cheng, J. Köhler, G. Cassella, N. Gao, J. Li, F. Noé, and J. Hermann, An ab initio foundation model of wavefunctions that accurately describes chemical bond breaking, Nature Communications 17, 9976 (2026).DOI
- [11]H. Lange, A. Van de Walle, A. Abedinnia, and A. Bohrdt, From architectures to applications: a review of neural quantum states, Quantum Science and Technology 9, 040501 (2024).
- [12]M. Medvedović and J. R. Moreno, Neural-network quantum states for many-body physics, The European Physical Journal Plus 139 (2024).
- [13]W. M. C. Foulkes, L. Mitáš, R. J. Needs, and G. Rajagopal, Quantum monte carlo simulations of solids, Rev. Mod. Phys. 73, 33 (2001).
- [14]J. Hermann, J. Spencer, K. Choo, A. Mezzacapo, W. M. C. Foulkes, D. Pfau, G. Carleo, and F. Noé, Ab initio quantum chemistry with neural-network wavefunctions, Nature Reviews Chemistry 7, 692–709 (2023).DOI
- [15]D. Pfau, J. S. Spencer, A. G. D. G. Matthews, and W. M. C. Foulkes, Ab initio solution of the many-electron Schrödinger equation with deep neural networks, Physical Review Research 2 (2020).
- [16]J. Hermann, Z. Schätzle, and F. Noé, Deep-neural-network solution of the electronic schrödinger equation, Nature Chemistry 12, 891–897 (2020).
- [17]D. Pfau, S. Axelrod, H. Sutterud, I. von Glehn, and J. S. Spencer, Accurate computation of quantum excited states with neural networks, Science 385, eadn0137 (2024).DOI
- [18]R. Assaraf and M. Caffarel, Zero-variance zero-bias principle for observables in quantum monte carlo: Application to forces, The Journal of Chemical Physics 119, 10536–10552 (2003).
- [19]D.-B. Zhang, B.-L. Chen, Z.-H. Yuan, and T. Yin, Variational quantum eigensolvers by variance minimization, Chinese Physics B 31, 120301 (2022).arxiv.org/abs/2006.15781
- [20]H. Zhang, R. J. Webber, M. Lindsey, T. C. Berkelbach, and J. Weare, Improved energies and local energies with weighted variational monte carlo, Phys. Rev. Res. 8, 013213 (2026).DOI
- [21]F. Becca and S. Sorella, Quantum Monte Carlo approaches for correlated systems (Cambridge University Press, 2017).DOI
- [22]S. Sorella, Wave function optimization in the variational monte carlo method, Phys. Rev. B 71, 241103 (2005).DOI
- [23]E. Neuscamman, C. J. Umrigar, and G. K.-L. Chan, Optimizing large parameter sets in variational quantum monte carlo, Physical Review B 85 (2012).DOI
- [24]M. M. Wilde, Quantum information theory (Cambridge university press, 2013).
- [25]M. B. Hastings, Turning gate synthesis errors into incoherent errors (2016), arXiv:1612.01011 [quant-ph].arxiv.org/abs/1612.01011
- [26]E. Campbell, Shorter gate sequences for quantum computing by mixing unitaries, Phys. Rev. A 95, 042306 (2017).DOI
- [27]E. Campbell, Random compiler for fast hamiltonian simulation, Physical Review Letters 123, 070503 (2019).DOI
- [28]A. Arulandu, J. M. Martyn, and I. L. Chuang, Trading imaginary time for randomness in ground state preparation (2026), arXiv:2608.00443 [quant-ph].arxiv.org/abs/2608.00443
- [29]P. W. Anderson, Infrared catastrophe in fermi gases with local scattering potentials, Phys. Rev. Lett. 18, 1049 (1967).
- [30]T. Fogarty, S. Deffner, T. Busch, and S. Campbell, Orthogonality catastrophe as a consequence of the quantum speed limit, Phys. Rev. Lett. 124, 110601 (2020).DOI
- [31]M. Erakovic, F. Witteveen, D. Harley, J. Günther, M. Benser, O. R. Meitei, M. Cho, T. Van Voorhis, M. Reiher, and M. Christandl, High ground state overlap via quantum embedding methods, PRX Life 3, 013003 (2025).DOI
- [32]L. L. Viteritti, R. Rende, S. Sachdev, and G. Carleo, Approaching the thermodynamic limit with neural-network quantum states (2026), arXiv:2602.02665 [cond-mat.str-el].arxiv.org/abs/2602.02665
- [33]A. Van de Walle, M. Schmitt, and A. Bohrdt, Many-body dynamics with explicitly time-dependent neural quantum states, Machine Learning: Science and Technology 6, 045011 (2025).arxiv.org/abs/2412.11830
- [34]J. Nys, G. Pescia, A. Sinibaldi, and G. Carleo, Ab-initio variational wave functions for the time-dependent many-electron schrödinger equation, Nature Communications 15 (2024).DOI
- [35]L. Gravina, V. Savona, and F. Vicentini, Neural projected quantum dynamics: a systematic study, Quantum 9, 1803 (2025).DOI
- [36]M. Schmitt and M. Heyl, Simulating dynamics of correlated matter with neural quantum states (2025), arXiv:2506.03124 [quant-ph].arxiv.org/abs/2506.03124
- [37]A. Sinibaldi, D. Hendry, F. Vicentini, and G. Carleo, Time-dependent neural galerkin method for quantum dynamics, Phys. Rev. Lett. 136, 120402 (2026).DOI
- [38]M. Schmitt and M. Heyl, Quantum many-body dynamics in two dimensions with artificial neural networks, Phys. Rev. Lett. 125, 100503 (2020).DOI
- [39]J. Stokes, J. Izaac, N. Killoran, and G. Carleo, Quantum Natural Gradient, Quantum 4, 269 (2020).DOI
- [40]G. Carleo, K. Choo, D. Hofmann, J. E. T. Smith, T. Westerhout, F. Alét, E. J. Davis, S. Efthymiou, I. Glasser, S.-H. Lin, M. Mauri, G. Mazzola, C. B. Mendl, E. van Nieuwenburg, O. O’Reilly, H. Théveniaut, G. Torlai, F. Vicentini, and A. Wietek, NetKet: A machine learning toolkit for many-body quantum systems, SoftwareX 10, 100311 (2019).
- [41]F. Vicentini, D. Hofmann, A. Szabó, D. Wu, C. Roth, C. Giuliani, G. Pescia, J. Nys, V. Vargas-Calderón, N. Astrakhantsev, and G. Carleo, NetKet 3: Machine Learning Toolbox for Many-Body Quantum Systems, Sci-Post Phys. Codebases , 7 (2022).DOI
- [42]L. L. Viteritti, R. Rende, and F. Becca, Transformer variational wave functions for frustrated quantum spin systems, Phys. Rev. Lett. 130, 236401 (2023).DOI
- [43]L. L. Viteritti, R. Rende, F. Parola, S. Goldt, and F. Becca, Transformer wave function for two dimensional frustrated magnets: Emergence of a spin-liquid phase in the shastry-sutherland model, Phys. Rev. B 111, 134411 (2025).DOI
- [44]G. Goldshlager, N. Abrahamsen, and L. Lin, A kaczmarz-inspired approach to accelerate the optimization of neural network wavefunctions, Journal of Computational Physics 516, 113351 (2024).DOI
- [45]P. R. D. Liang, J. J. Cook, and W. Kretschmer, Simulation of qubit quantum circuits via pauli propagation, Phys. Rev. A 99, 062337 (2019).
- [46]M. S. Rudolph, T. Jones, Y. Teng, A. Angrisani, and Z. Holmes, Pauli propagation: A computational framework for simulating quantum systems, PRX Quantum 7, 032001 (2026).DOI
- [47]A. W. Harrow, A. Lowe, and F. Witteveen, Randomized truncation of quantum states (2025), arXiv:2510.08518 [quant-ph].arxiv.org/abs/2510.08518
- [48]Y. Wang, X.-M. Zhang, X. Yuan, and Q. Zhao, Faster state preparation with randomization (2025), arXiv:2510.12247 [quant-ph].
- [49]A. Zlokapa, R. R. Allen, and A. W. Harrow, Optimal lower bounds for hamiltonian simulation (2026), arXiv:2607.19852 [quant-ph].arxiv.org/abs/2607.19852
- [50]J. D. Watson, Randomly compiled quantum simulation with exponentially reduced circuit depths (2025), arXiv:2411.04240 [quant-ph].arxiv.org/abs/2411.04240
- [51]A. Angrisani, R. Puig, Y. Teng, and Z. Holmes, Dissipation accelerates quantum and classical simulation of open-system dynamics (2026), arXiv:2609.40174 [quant-ph].arxiv.org/abs/2609.40174
- [52]M. T. Entwistle, Z. Schätzle, P. A. Erdman, J. Hermann, and F. Noé, Electronic excited states in deep variational monte carlo, Nature Communications 14, 274 (2023).DOI
- [53]A. W. Sandvik and G. Vidal, Variational quantum monte carlo simulations with tensor-network states, Phys. Rev. Lett. 99, 220602 (2007).DOI
- [54]N. Schuch, M. M. Wolf, F. Verstraete, and J. I. Cirac, Simulation of quantum many-body systems with strings of operators and monte carlo tensor contractions, Phys. Rev. Lett. 100, 040501 (2008).pubmed.ncbi.nlm.nih.gov/18352247
- [55]A. J. Ferris and G. Vidal, Variational monte carlo with the multiscale entanglement renormalization ansatz,DOI
- [56]W.-Y. Liu, Y.-Z. Huang, S.-S. Gong, and Z.-C. Gu, Accurate simulation for finite projected entangled pair states in two dimensions, Phys. Rev. B 103, 235155 (2021).DOI
- [57]W.-Y. Liu, S.-J. Du, R. Peng, J. Gray, and G. K.-L. Chan, Tensor network computations that capture strict variationlity, volume law behavior, and the efficient representation of neural network states, Phys. Rev. Lett. 133, 260404 (2024).DOI
- [58]W.-Y. Liu, H. Zhai, R. Peng, Z.-C. Gu, and G. K.-L. Chan, Accurate simulation of the Hubbard model with finite fermionic projected entangled pair states, Phys. Rev. Lett. 134, 265502 (2025).DOI
- [59]M. Motta, K. J. Sung, K. B. Whaley, M. Head-Gordon, and J. Shee, Bridging physical intuition and hardware efficiency for correlated electronic states: the local unitary cluster jastrow ansatz for electronic structure, Chem. Sci. 14, 11213 (2023).DOI
- [60]A. Peruzzo, J. McClean, P. Shadbolt, M.-H. Yung, X.-Q. Zhou, P. J. Love, A. Aspuru-Guzik, and J. L. O’Brien, A variational eigenvalue solver on a photonic quantum processor, Nature communications 5, 1 (2014).DOI
- [61]M. Cerezo, A. Arrasmith, R. Babbush, S. C. Benjamin, S. Endo, K. Fujii, R. McClean, K. Mitarai, X. Yuan, L. Cincio, and P. J. Coles, Variational quantum algorithms, Nature Reviews Physics 3, 625 (2021).DOI
- [62]J. Tilly, H. Chen, S. Cao, D. Picozzi, X. Li, Y. Li, E. Grant, L. Wossnig, I. Rungger, G. H. Booth, and J. Tennison, The variational quantum eigensolver: A review of methods and best practices, Physics Reports 986, 1 (2022).DOI
- [63]A. Greene, M. Kjaergaard, M. E. Schwartz, G. O. Samach, A. Bengtsson, M. O’Keeffe, D. K. Kim, M. Mar-vian, A. Melville, B. M. Niedzielski, A. Vepsalainen, R. Winik, J. Yoder, D. Rosenberg, S. Lloyd, T. P. Orlando, I. Marvian, S. Gustavsson, and W. D. Oliver, Error mitigation via stabilizer measurement emulation (2021), arXiv:2102.05767 [quant-ph].arxiv.org/abs/2102.05767
- [64]D. Gottesman, Stabilizer codes and quantum error correction (1997), arXiv:quant-ph/9705052 [quant-ph].DOI
- [65]B. M. Terhal, Quantum error correction for quantum memories, Rev. Mod. Phys. 87, 307 (2015).DOI
- [66]S. Buckley-Bonanno, N. Eckstein, and S. F. Yelin, Quantum simulation of gauge theories on dynamical spacetimes via floquet-induced matrix models (2026), arXiv:2607.04040 [quant-ph].
- [67]M. A. Nielsen, I. L. Chuang, et al., Quantum computation and quantum information, Vol. 1 (Cambridge university press Cambridge, 2000).
- [68]S. Sorella, Green function monte carlo with stochastic reconfiguration, Phys. Rev. Lett. 80, 4558 (1998).
- [69]A. Chen and M. Heyl, Empowering deep neural quantum states through efficient optimization, Nature Physics 20, 1476–1481 (2024).DOI
- [70]R. Rende, L. L. Viteritti, L. Bardone, F. Becca, and S. Goldt, A simple linear algebra identity to optimize large-scale neural network quantum states, Communications Physics 7 (2024).DOI
- [71]L. Gravina and F. Vicentini, ptvmc-systematic-study package (2025).
- [72]J. M. Martyn, J. Lin, N. C. Warring ton, I. L. Chuang, and A. J. Daley, Fast quantum monte carlo simulation by random compilation (2026), arXiv:2609.10486 [quant-ph].arxiv.org/abs/2609.10486


