  We present an algorithm to compute Green's functions on quantum computers for
interacting electron systems, which is a challenging task on conventional
computers. It uses a continued fraction representation based on the Lanczos
method, where the wave functions are expanded as linear combination of basis
states within a quantum subspace. While on conventional computers the cost of
the computation grows exponentially with system size, limiting the method to
small systems, by representing the basis states on a quantum computer one may
overcome this exponential scaling barrier. We propose a two-level multigrid
Trotter time evolution for an efficient preparation of the basis states in a
quantum circuit, which takes advantage of the robustness of the subspace
expansion against Trotter errors. Using a quantum emulator we demonstrate the
algorithm for the Hubbard model on a Bethe lattice with infinite coordination,
which we map to a 16 qubit Anderson impurity model within the dynamical mean
field theory. Our algorithm computes the Green's function accurately for both
the metallic and Mott insulating regimes, with a circuit depth several orders
of magnitude below what has been proposed using time evolution. The two-level
multigrid time evolution reduces the number of Trotter steps required to
compute the Green's function to about four to six. We therefore expect that the
method can be used on near term quantum computers for moderate system sizes,
while allowing for scalability to larger circuit depths and qubit numbers on
future fault tolerant quantum computers.
