Skip to content
QFT.org

Search QFT.org

Enter a word or phrase.

    You can also browse the main navigation and chapter contents.

    Continuous Scalar-Field Wavefunctionals

    A spatial lattice leaves each scalar-field value continuous. A neural wavefunction therefore has to do more than assign amplitudes to a finite list of spins: it must be normalizable, have well-defined kinetic derivatives, and permit controlled integration over field space. We construct a Gaussian vacuum with a trained neural correction and optimize it for two coupled anharmonic oscillators.

    The example improves both energy and correlators, but also exposes two limits of numerical evidence. Every optimizer misses its requested gradient tolerance, and restricting a kinetic-energy integral to a small field box can produce a value below the true ground energy without contradicting the variational principle.

    Preparation: Scalar Hamiltonians and local bases, local energies and VMC and differentiation of a multivariable function.

    From a field to canonical coordinates

    In one spatial dimension, discretize space with spacing aa before choosing a wavefunctional ansatz. The canonical relations and Hamiltonian are

    [ϕn,πm]=iaδnm,H=a∑n[πn22+(ϕn+1−ϕn)22a2+m02ϕn22+λ0ϕn424].[\phi_n,\pi_m]=\frac{i}{a}\delta_{nm},\qquad H=a\sum_n\left[ \frac{\pi_n^2}{2} +\frac{(\phi_{n+1}-\phi_n)^2}{2a^2} +\frac{m_0^2\phi_n^2}{2} +\frac{\lambda_0\phi_n^4}{24}\right].

    Thus πn=−i∂ϕn/a\pi_n=-i\partial_{\phi_n}/a in the field representation, and the kinetic operator is −∑n∂ϕn2/(2a)-\sum_n\partial_{\phi_n}^2/(2a). The factors of aa follow from the commutator; a site derivative alone does not fix them. This agrees with the scalar normalization in Jordan–Lee–Preskill, Eqs. (2)–(3).

    Set qn=a ϕnq_n=\sqrt a\,\phi_n. In NN spatial sites,

    ∏ndqn=aN/2∏ndϕn,ψq(q)=a−N/4ψϕ(q/a).\prod_n dq_n=a^{N/2}\prod_n d\phi_n,\qquad \psi_q(q)=a^{-N/4}\psi_\phi(q/\sqrt a).

    The two wavefunctions then have the same norm. The qq-space kinetic term is −12∑n∂qn2-\frac12\sum_n\partial_{q_n}^2 with ordinary Lebesgue measure.

    For two periodic sites there are two forward spatial bonds, giving

    H=−12(∂q02+∂q12)+(q0−q1)2a2+m022(q02+q12)+λ024a(q04+q14).(1)H=-\frac12(\partial_{q_0}^2+\partial_{q_1}^2) +\frac{(q_0-q_1)^2}{a^2} +\frac{m_0^2}{2}(q_0^2+q_1^2) +\frac{\lambda_0}{24a}(q_0^4+q_1^4). \tag{1}

    An open two-site chain would have a different gradient coefficient. We keep a=1a=1, m02=0.25m_0^2=0.25 and λ0=0.2\lambda_0=0.2, matching the previously checked Hamiltonian example. This is a continuous-time quantum Hamiltonian, distinct from the two-variable Euclidean probability density used in the preceding generative-model chapter.

    The orthogonal coordinates

    Q=q0+q12,R=q0−q12Q=\frac{q_0+q_1}{\sqrt2},\qquad R=\frac{q_0-q_1}{\sqrt2}

    preserve the measure and Laplacian. Write

    ΩQ=m0,ΩR=m02+4/a2.\Omega_Q=m_0,\qquad \Omega_R=\sqrt{m_0^2+4/a^2}.

    Then the potential becomes

    V(Q,R)=ΩQ2Q2+ΩR2R22+λ048a(Q4+6Q2R2+R4).(2)V(Q,R)=\frac{\Omega_Q^2Q^2+\Omega_R^2R^2}{2} +\frac{\lambda_0}{48a}(Q^4+6Q^2R^2+R^4). \tag{2}

    For λ0=0\lambda_0=0 and m0>0m_0>0, the normalized vacuum is

    ψ0(Q,R)=(ΩQΩR)1/4πexp⁡ ⁣[−ΩQQ2+ΩRR22].(3)\psi_0(Q,R)=\frac{(\Omega_Q\Omega_R)^{1/4}}{\sqrt\pi} \exp\!\left[-\frac{\Omega_Q Q^2+\Omega_R R^2}{2}\right]. \tag{3}

    Its local energy is the constant (ΩQ+ΩR)/2(\Omega_Q+\Omega_R)/2, and its Born covariance is diag⁡(1/(2ΩQ),1/(2ΩR))\operatorname{diag}(1/(2\Omega_Q),1/(2\Omega_R)). These provide direct checks of normalization, kinetic factors and the Gaussian limit.

    Add a neural factor without losing the domain

    Let ℓθ=log⁡ψθ\ell_\theta=\log\psi_\theta be an unnormalized real log amplitude:

    ℓθ(Q,R)=−ωQQ2+ωRR22+Fθ(Q,R),Fθ=∑j=1HvjAj,(4)\ell_\theta(Q,R)= -\frac{\omega_Q Q^2+\omega_R R^2}{2} +F_\theta(Q,R),\qquad F_\theta=\sum_{j=1}^{H}v_j A_j, \tag{4}

    where ωQ,ωR>0\omega_Q,\omega_R>0 and

    Aj(Q,R)=14∑ϵ,η=±1tanh⁡(bj+ϵwjQQ+ηwjRR)−tanh⁡bj.(5)A_j(Q,R)=\frac14\sum_{\epsilon,\eta=\pm1} \tanh(b_j+\epsilon w_{jQ}Q+\eta w_{jR}R)-\tanh b_j. \tag{5}

    Both widths and all hidden weights, biases and output weights are optimized. The sign average makes the state even separately in QQ and RR, implementing field inversion and exchange of the two spatial sites. Subtracting the value at the origin removes an irrelevant constant in the log amplitude.

    This is a Gaussian envelope multiplied by a positive neural factor. At finite parameters the factor and its field derivatives are bounded. Gaussian decay therefore makes the norm, kinetic quadratic form and quartic potential expectation finite. The state is in the appropriate quadratic-form domain, and integration by parts on the whole plane has no boundary contribution. Continuous-space wavefunctions require these conditions independently of any software declaration of a Hilbert space [2, §§6.1–6.4].

    The positivity restriction is suited to the nodeless ground state of this confining scalar problem. It does not supply nodal excited states. Nor does increasing HH change the spatial regulator or prove a universal approximation statement for continuum quantum field theory.

    Differentiate the wavefunction that is actually used

    For a smooth positive state,

    Eloc(Q,R)=V−12[Δℓθ+∣∇ℓθ∣2].(6)E_{\rm loc}(Q,R) =V-\frac12\left[\Delta\ell_\theta+ |\nabla\ell_\theta|^2\right]. \tag{6}

    The term ∣∇ℓθ∣2|\nabla\ell_\theta|^2 is essential: differentiating the log amplitude twice is not the same as dividing Δψ\Delta\psi by ψ\psi. The normalized energy is also

    Eθ=∫R2e2ℓθ[12∣∇ℓθ∣2+V] dQ dR∫R2e2ℓθ dQ dR.(7)E_\theta= \frac{\displaystyle\int_{\mathbb R^2}e^{2\ell_\theta} \left[\frac12|\nabla\ell_\theta|^2+V\right]\,dQ\,dR} {\displaystyle\int_{\mathbb R^2}e^{2\ell_\theta}\,dQ\,dR}. \tag{7}

    For exact integrals this is the Rayleigh quotient of the same Hamiltonian as (1), hence an upper bound to its ground energy. A quadrature approximation to it needs its own accuracy checks.

    To see how the network enters the derivatives, put uj=bj+ϵwjQQ+ηwjRRu_j=b_j+\epsilon w_{jQ}Q+\eta w_{jR}R. Each hidden contribution obeys

    ∂QAj=wjQ4∑ϵ,ηϵ sech⁡2uj,\partial_Q A_j=\frac{w_{jQ}}4\sum_{\epsilon,\eta} \epsilon\,\operatorname{sech}^2u_j, ΔAj=−wjQ2+wjR22∑ϵ,ηtanh⁡uj sech⁡2uj.(8)\Delta A_j=-\frac{w_{jQ}^2+w_{jR}^2}{2} \sum_{\epsilon,\eta}\tanh u_j\,\operatorname{sech}^2u_j. \tag{8}

    The Gaussian contributes −ωQQ,−ωRR-\omega_QQ,-\omega_RR to the gradient and −ωQ−ωR-\omega_Q-\omega_R to the Laplacian. The companion compares these expressions with finite differences at fixed points, including the visible small-step roundoff floor.

    For a real parameter define Oα=∂θαℓθO_\alpha=\partial_{\theta_\alpha}\ell_\theta and eform=∣∇ℓθ∣2/2+Ve_{\rm form}=|\nabla\ell_\theta|^2/2+V. Differentiating the normalized quadratic form gives

    ∂θαE=2Cov⁡(Oα,eform)+⟨∇ℓθ⋅∇Oα⟩.(9)\partial_{\theta_\alpha}E =2\operatorname{Cov}(O_\alpha,e_{\rm form}) +\left\langle\nabla\ell_\theta\cdot\nabla O_\alpha\right\rangle. \tag{9}

    Whole-space integration by parts converts this to 2Cov⁡(Oα,Eloc)2\operatorname{Cov}(O_\alpha,E_{\rm loc}) [2, Eqs. (26)–(28)]. At a finite quadrature order these two rearrangements need not agree exactly. We optimize the derivative of the quadratic form evaluated at fixed quadrature nodes, then use the local-energy version as a refinement check.

    Optimize width separately from integration accuracy

    The calculation uses whole-line tensor Gauss–Hermite quadrature with reference weight e−ΩQQ2−ΩRR2e^{-\Omega_QQ^2-\Omega_RR^2}. The remaining weight, coordinate Jacobian and normalization are included explicitly. There is no finite field box in the optimization.

    First optimize the two-width Gaussian. Its energy has the independent analytic expression

    EG=ωQ+ωR4+ΩQ24ωQ+ΩR24ωR+λ064a(1ωQ+1ωR)2.(10)E_G=\frac{\omega_Q+\omega_R}{4} +\frac{\Omega_Q^2}{4\omega_Q}+\frac{\Omega_R^2}{4\omega_R} +\frac{\lambda_0}{64a} \left(\frac1{\omega_Q}+\frac1{\omega_R}\right)^2. \tag{10}

    Then use hidden widths H=2,4,8H=2,4,8, with two fixed initializations each. All seven fits use quadrature order 48 per coordinate and bounded parameters; the network bounds are ∣vj∣≤1|v_j|\le1, ∣wja∣,∣bj∣≤2|w_{ja}|,|b_j|\le2, with log⁡(ωa/Ωa)∈[−0.4,0.7]\log(\omega_a/\Omega_a)\in[-0.4,0.7]. Each fit is limited to 400 optimizer iterations and 800 objective calls. Neither seeds nor budgets are changed after examining the results.

    The final states are evaluated at orders 64, 96 and 128 without refitting. Their energy differences from the retained 32-state-per-site Hermite reference are:

    Hidden widthStartEnergy differenceFinal projected gradient, infinity norm
    001.35×10−41.35\times10^{-4}1.65×10−81.65\times10^{-8}
    204.30×10−74.30\times10^{-7}2.33×10−72.33\times10^{-7}
    214.95×10−74.95\times10^{-7}3.32×10−53.32\times10^{-5}
    403.92×10−83.92\times10^{-8}1.38×10−61.38\times10^{-6}
    411.35×10−71.35\times10^{-7}6.09×10−76.09\times10^{-7}
    802.94×10−82.94\times10^{-8}2.50×10−52.50\times10^{-5}
    811.91×10−81.91\times10^{-8}1.59×10−61.59\times10^{-6}

    Every fit misses the requested 10−810^{-8} gradient tolerance. Width 8, start 0 reaches the 400-iteration cap; the other success flags report small objective reduction, which is a different stopping condition. These are achieved trial states, not certified minima of their neural families. The gradient is projected against the stated box constraints.

    For the predetermined primary state, width 4, start 0,

    E=1.2983236289,⟨Q2⟩=0.9039558293,⟨R2⟩=0.2409320928.E=1.2983236289,\qquad \langle Q^2\rangle=0.9039558293,\qquad \langle R^2\rangle=0.2409320928.

    New 16- and 24-state Hermite ground vectors supply independent correlator and overlap comparisons. At 24 states the corresponding moments are 0.90395491480.9039549148 and 0.24093239730.2409323973, and ⟨q0q1⟩=0.3315112587\langle q_0q_1\rangle=0.3315112587. The primary neural state has overlap squared approximately 0.99999999410.9999999941 with that vector. The new vectors reproduce the already retained energies and extend them with these observables; the old spectrum and field-grid studies were not repeated.

    The neural energies change by less than 2×10−152\times10^{-15} between orders 96 and 128. This is numerical integration evidence for the retained states, not a bound on all errors at that precision. For example, width 8, start 0 has a smaller energy difference than the primary state but a larger Q2Q^2 error, approximately 5.7×10−55.7\times10^{-5}. Small energy error does not give equally small errors for every unbounded field moment.

    Energy differences for the fixed Gaussian and neural widths, together with moment errors for both initializations.

    Seven retained fits of the same quantum Hamiltonian. Both initializations remain visible. Energy and moment errors use the checked Hermite references; quadrature refinement is a separate control. The curves are achieved finite-network results and do not imply monotone optimizer convergence with width.

    A finite box can change the question

    As an independent integration check, restrict the primary state's integrals to [−L,L]2[-L,L]^2 and use Gauss–Legendre quadrature. Define ZL=∫boxψ2Z_L=\int_{\rm box}\psi^2. Integration by parts gives

    Eform,L−Eloc,L=12ZL∫∂boxψ ∂nψ dΣ.(11)E_{{\rm form},L}-E_{{\rm loc},L} =\frac1{2Z_L}\int_{\partial{\rm box}}\psi\,\partial_n\psi\,d\Sigma. \tag{11}

    At L=4L=4 the missing norm is about 1.2346×10−51.2346\times10^{-5}, while the right-hand side is −8.5057×10−5-8.5057\times10^{-5}. The two integral routes agree only after this surface term is included. Refining the box quadrature from 96 to 128 points does not remove a field-range effect. At L=6L=6 the missing norm is about 1.1×10−111.1\times10^{-11}; at L=8L=8 its computed sign fluctuates at roundoff, so it is not reported as a resolved tiny probability.

    A simple analytic probability bound provides a different check. Let B=∑j∣vj∣B=\sum_j|v_j|. The oscillation of FθF_\theta is at most 2B2B, so the normalized Born density is bounded above by e4Be^{4B} times the normalized Gaussian-envelope density. A union bound yields

    Pr⁡(∣Q∣>L or ∣R∣>L)≤e4B[erfc⁡(ωQL)+erfc⁡(ωRL)].(12)\Pr(|Q|>L\ \hbox{or}\ |R|>L) \le e^{4B}\left[ \operatorname{erfc}(\sqrt{\omega_Q}L) +\operatorname{erfc}(\sqrt{\omega_R}L)\right]. \tag{12}

    For the primary state the bounds at L=4,6,8L=4,6,8 are approximately 0.00600.0060, 2.55×10−92.55\times10^{-9} and 3.97×10−183.97\times10^{-18}. They are conservative bounds on probability, not certified moment or energy errors.

    The neural wavefunction has not been made zero at the box boundary. Its conditional quadratic-form integral is consequently not a Dirichlet variational state for the original problem. This distinction prevents a spurious “violation” of the variational principle. Physical spatial spacing, local Hermite cutoff, field integration range, quadrature order and neural width must remain separate controls [1, §A.4].

    Summary

    A Gaussian envelope supplies normalizability and a free-field check; a smooth neural correction supplies variational flexibility. The kinetic operator must differentiate the full wavefunction with the correct field measure. The finite example achieves accurate energies and low correlators, while retaining optimizer failures and a measurable box-boundary bias. It establishes neither an interacting continuum limit nor a general high-dimensional training result.

    Exercises

    1. Recover the canonical Gaussian

    Starting from the field commutator, derive the kinetic term and wavefunction rescaling in canonical coordinates. For the free two-site periodic chain, find the ground energy and ⟨q0q1⟩\langle q_0q_1\rangle. Explain where the second spatial bond enters.

    Solution

    The commutator is realized by πn=−i∂ϕn/a\pi_n=-i\partial_{\phi_n}/a, hence aπn2/2=−∂ϕn2/(2a)a\pi_n^2/2=-\partial_{\phi_n}^2/(2a). With qn=a ϕnq_n=\sqrt a\,\phi_n, ∂ϕn=a ∂qn\partial_{\phi_n}=\sqrt a\,\partial_{q_n}, giving −∂qn2/2-\partial_{q_n}^2/2. The coordinate Jacobian is aN/2a^{N/2}, and multiplying the old amplitude by a−N/4a^{-N/4} preserves its norm in the new measure.

    The two terms (ϕ1−ϕ0)2/(2a)(\phi_1-\phi_0)^2/(2a) and (ϕ0−ϕ1)2/(2a)(\phi_0-\phi_1)^2/(2a) combine to (q0−q1)2/a2(q_0-q_1)^2/a^2. In normal coordinates this is 2R2/a22R^2/a^2, giving frequencies m0m_0 and m02+4/a2\sqrt{m_0^2+4/a^2}. Thus

    E0=12(m0+m02+4/a2),⟨q0q1⟩=14(1m0−1m02+4/a2).E_0=\frac12\left(m_0+\sqrt{m_0^2+4/a^2}\right),\qquad \langle q_0q_1\rangle =\frac14\left(\frac1{m_0}-\frac1{\sqrt{m_0^2+4/a^2}}\right).

    Here m0>0m_0>0 is required for a normalizable zero-mode vacuum. Omitting one bond changes the relative-mode frequency and the correlation; it describes the open chain.

    2. An apparent energy below the vacuum

    For ψ(q)=e−ωq2/2\psi(q)=e^{-\omega q^2/2} and H=−∂q2/2+ω2q2/2H=-\partial_q^2/2+\omega^2q^2/2, restrict integrals to [−L,L][-L,L] without changing ψ\psi at the endpoints. Show that the conditional quadratic-form energy is below ω/2\omega/2. Why is this not a variational improvement?

    Solution

    The local energy is identically ω/2\omega/2. With ZL=∫−LLe−ωq2 dqZ_L=\int_{-L}^L e^{-\omega q^2}\,dq, integration by parts gives

    Eform,L−ω2=ψ(L)ψ′(L)−ψ(−L)ψ′(−L)2ZL=−ωLe−ωL2ZL<0.E_{{\rm form},L}-\frac\omega2 =\frac{\psi(L)\psi'(L)-\psi(-L)\psi'(-L)}{2Z_L} =-\frac{\omega L e^{-\omega L^2}}{Z_L}<0.

    The form integrand itself is ω2q2\omega^2q^2, so conditioning on a bounded interval reduces its average. Extending the restricted function by zero would produce a jump at each boundary and would not have the finite kinetic form used in this calculation. Alternatively, imposing a legitimate boundary condition changes the operator or the state. The conditional integral is therefore not the Rayleigh quotient of a normalized whole-line trial state. Its negative difference is exactly the omitted boundary contribution.

    References

    1. S. P. Jordan, K. S. Lee and J. Preskill, “Quantum Algorithms for Quantum Field Theories,” Science 336 (2012), 1130–1133, arXiv:1111.3633v2. Full text. Eqs. (2)–(3) fix the lattice commutator and Hamiltonian; supplementary §A.4, Eqs. (26)–(47), distinguishes field range and resolution.
    2. F. Vicentini et al., “NetKet 3: Machine Learning Toolbox for Many-Body Quantum Systems,” SciPost Physics Codebases 7 (2022), arXiv:2112.10526v2. Full text. §§3.3, 4.1 and 6.1–6.4 give local estimators, gradients and continuous-space examples. The present calculation uses its own small numerical implementation.

    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.