  We devise a quasilinear quantum algorithm for generating an approximation for
the ground state of a quantum field theory (QFT). Our quantum algorithm
delivers a super-quadratic speedup over the state-of-the-art quantum algorithm
for ground-state generation, overcomes the ground-state-generation bottleneck
of the prior approach and is optimal up to a polylogarithmic factor.
Specifically, we establish two quantum algorithms -- Fourier-based and
wavelet-based -- to generate the ground state of a free massive scalar bosonic
QFT with gate complexity quasilinear in the number of discretized-QFT modes.
The Fourier-based algorithm is limited to translationally invariant QFTs.
Numerical simulations show that the wavelet-based algorithm successfully yields
the ground state for a QFT with broken translational invariance. Furthermore,
the cost of preparing particle excitations in the wavelet approach is
independent of the energy scale. Our algorithms require a routine for
generating one-dimensional Gaussian (1DG) states. We replace the standard
method for 1DG-state generation, which requires the quantum computer to perform
lots of costly arithmetic, with a novel method based on inequality testing that
significantly reduces the need for arithmetic. Our method for 1DG-state
generation is generic and could be extended to preparing states whose
amplitudes can be computed on the fly by a quantum computer.
