- Home
- Library
- Computational Quantum Field Theory
- Variational Monte Carlo and Neural Quantum States
- Neural Wavefunction Representations
Neural Wavefunction Representations
Two wavefunctions can assign exactly the same probabilities to every spin configuration and still predict different measurements. A neural representation of a quantum state must therefore describe amplitudes and relative phases. Reproducing a histogram is enough only for observables diagonal in the sampled basis.
This article constructs a small complex neural state, fits it to an exactly known two-spin target, and checks probabilities, phases and observables separately. The product-state energy estimate fixed the estimator without fitting amplitudes. Here the target is the state itself, including its relative phase.
Preparation: normalized state vectors, Pauli matrices and the variational principle. We use the state and Schrödinger conventions of the common convention source.
A state is more than its sampling distribution
Let , with , label an orthonormal spin basis. For an unnormalized complex function , define
The Born probability is . Where the amplitude is nonzero, one can write
A real network for describes a positive state; a second phase output can describe complex interference. A common additive constant in disappears upon normalization, and a common constant in is an unobservable global phase. Relative phases remain physical. For a general operator,
so off-diagonal matrix elements connect amplitudes whose relative phases a probability model does not determine.
The logarithmic parameterization also has a restriction: finite never gives an exact zero. Nodes require a limit, a separate nodal factor, or an ansatz that can vanish. At a zero, the phase and logarithmic derivative need not be defined even when the wavefunction and its direct derivatives are perfectly regular. This matters for both fermionic nodes and the tangent metric used in stochastic reconfiguration.
Summing hidden spins gives a tractable amplitude
A restricted Boltzmann machine wavefunction introduces hidden spins and sums them exactly:
The parameters may be complex. The hidden sum factorizes because there are no hidden-hidden couplings. Evaluating one amplitude costs a number of operations proportional to ; normalizing over all visible configurations still costs exponentially unless a separate sampling or normalization method is available. This architecture is the starting construction in Carleo and Troyer, “Neural-Network Quantum States”.
Put . Away from zeros,
At a zero of , use the direct product derivative instead:
This expression does not divide by the vanishing factor. The companion evaluates it with prefix and suffix products. Multiplying a zero amplitude by an infinite is an avoidable numerical failure; it is not a definition of the derivative.
Symmetries can also be imposed on amplitudes. For global spin flip ,
belongs to the corresponding parity sector, provided it is not the zero state. Differentiate this projection before normalizing. The odd projection can create nodes even when the original real RBM is positive. A symmetry label must refer to an operator that actually commutes with the Hamiltonian; it does not follow from a network's name or its parameter count.
A known two-spin state with a nontrivial phase
Take one open bond and Pauli matrices, with
This is not a two-site periodic convention that counts the bond twice. In the even basis
the matrix is
Solving this two-dimensional problem gives
Now apply a diagonal unitary with a fixed phase:
Its amplitudes, in integer order with site 0 the least significant bit, are
Thus the probabilities of and are each; those of and are each. Relative to the first component, the two antiparallel configurations have phase . Removing all phases preserves these four probabilities exactly.
The tied one-hidden-unit ansatz
has aligned-to-antialigned amplitude ratio . Therefore it can represent the target if
The analytic value is an independent representability check. The actual calculation separately minimizes
in the two real coordinates of , using analytic derivatives and three fixed starts. The optimizer is not initialized at .
| Initial | Final aligned state distance | Termination |
|---|---|---|
| precision-loss report | ||
| gradient criterion met | ||
| gradient criterion met |
The aligned distance is . Start 0 remains the designated fit even though its solver status is unsuccessful: its state is accurate, but the requested optimizer stopping condition was not established. The negative final from start 2 represents the same function because is even. All starts and statuses are retained.
Checking observables exposes a phase error
For the untwisted ground state, . Conjugating the Pauli operators by gives
The standard Pauli convention fixes the last sign.
| Observable | Complex target | Same probabilities, phases removed |
|---|---|---|
The fitted complex amplitude reproduces the target's density and relative phase. The phase-blind control has the same density but gives a different expectation of and misses the nonzero signal. The plotted fit is the fixed first start, including its retained precision-loss status.
The example is exactly representable with one tied hidden unit. It does not prove that an arbitrary many-body state is compactly representable, that an optimizer will find such a representation, or that fermionic phase cancellations have disappeared. Those are separate statements with separate tests.
From spin amplitudes to field wavefunctionals
A finite spin state is a function on a discrete basis with counting measure. A scalar-field wavefunctional, after a spatial regulator is chosen, is a function of continuous field coordinates. Its norm is an integral with the declared configuration measure, and its energy includes kinetic derivatives and boundary conditions. Changing a neural width does not change that measure or remove a field cutoff.
The continuous-wavefunctional calculation makes those extra controls explicit. The present spin example instead isolates representation and phase. Its reproducible companion directory, examples/computational-qft/neural-quantum-states/, retains the target, all fitted parameters, direct-derivative checks and selected observables. Verification and plotting read those outputs without fitting again.
Summary
A neural wavefunction represents a complex ray in Hilbert space. Probabilities, relative phases, symmetries and nodes all constrain that representation. The two-spin fit tests each of these directly: a phase-blind model passes the density test and fails off-diagonal observables, while a complex hidden-unit amplitude reproduces the target with explicitly recorded optimization accuracy.
Exercises
1. Differentiate through a hidden-factor zero
Sum one hidden spin in . Derive the direct derivative with respect to a parameter entering . Evaluate it at and . Explain why the logarithmic derivative is unsuitable there.
Solution
The sum is . Its derivative is . At the stated point the amplitude vanishes but the derivative is . The quotient is undefined. The direct derivative remains finite and can change the amplitude of a configuration that currently has zero probability. With several hidden spins, the same derivative multiplies every other ; no division by the zero factor is needed.
2. A density test at a quarter-turn phase
Keep the two-spin ground state above but choose . Find its probabilities and the expectations of and . Compare with the state obtained by removing its phases.
Solution
The unitary is diagonal, so the probabilities remain on each aligned configuration and on each antialigned configuration. For and an operator anticommuting with ,
Using and gives the conjugations required above. The untwisted state is real and has vanishing expectation. At , the twisted expectations are therefore and , respectively. Removing phases restores and . Neither the normalization nor any diagonal probability detects this difference.
References
- G. Carleo and M. Troyer, “Solving the Quantum Many-Body Problem with Artificial Neural Networks,” Science 355, 602–606 (2017), doi:10.1126/science.aag2302, arXiv:1606.02318v1. The section “Neural-Network Quantum States” contains the hidden-spin sum and product construction.
- F. Vicentini et al., “NetKet 3: Machine Learning Toolbox for Many-Body Quantum Systems,” SciPost Physics Codebases 7 (2022), doi:10.21468/SciPostPhysCodeb.7, arXiv:2112.10526v2. Sections 3.3 and 3.5, especially the nodal qualification in footnote 14. This article uses the mathematical constructions, not a NetKet installation.
Scrollable formula. Use Left and Right arrow keys to reveal hidden content.
Scrollable table. Use Left and Right arrow keys to reveal hidden columns.
Scrollable figure. Use Left and Right arrow keys to reveal hidden content.