  A state-preserving quantum counting algorithm is used to obtain coefficients
of a Lanczos recursion from a single ground state wavefunction on the quantum
computer. This is used to compute the continued fraction representation of an
interacting Green's function for use in condensed matter, particle physics, and
other areas. The wavefunction does not need to be re-prepared at each
iteration. The quantum algorithm represents an exponential reduction in memory
over known classical methods. An extension of the method to determining the
ground state is also discussed.
