  Variational representations of quantum states abound and have successfully
been used to guess ground-state properties of quantum many-body systems. Some
are based on partial physical insight (Jastrow, Gutzwiller projected, and
fractional quantum Hall states, for instance), and others operate as a black
box that may contain information about the underlying structure of entanglement
and correlations (tensor networks, neural networks) and offer the advantage of
a large set of variational parameters that can be efficiently optimized.
However, using variational approaches to study excited states and, in
particular, calculating the excitation spectrum, remains a challenge. We
present a variational method to calculate the dynamical properties and spectral
functions of quantum many-body systems in the frequency domain, where the
Green's function of the problem is encoded in the form of a restricted
Boltzmann machine (RBM). We introduce a natural gradient descent approach to
solve linear systems of equations and use Monte Carlo to obtain the dynamical
correlation function. In addition, we propose a strategy to regularize the
results that improves the accuracy dramatically. As an illustration, we study
the dynamical spin structure factor of the one dimensional $J_1-J_2$ Heisenberg
model. The method is general and can be extended to other variational forms.
