  Preparing the ground state of a given Hamiltonian and estimating its ground
energy are important but computationally hard tasks. However, given some
additional information, these problems can be solved efficiently on a quantum
computer. We assume that an initial state with non-trivial overlap with the
ground state can be efficiently prepared, and the spectral gap between the
ground energy and the first excited energy is bounded from below. With these
assumptions we design an algorithm that prepares the ground state when an upper
bound of the ground energy is known, whose runtime has a logarithmic dependence
on the inverse error. When such an upper bound is not known, we propose a
hybrid quantum-classical algorithm to estimate the ground energy, where the
dependence of the number of queries to the initial state on the desired
precision is exponentially improved compared to the current state-of-the-art
algorithm proposed in [Ge et al. 2019]. These two algorithms can then be
combined to prepare a ground state without knowing an upper bound of the ground
energy. We also prove that our algorithms reach the complexity lower bounds by
applying it to the unstructured search problem and the quantum approximate
counting problem.
