Estimation of ground state energies in quantum circuits