  The efficient calculation of Hamiltonian spectra, a problem often intractable
on classical machines, can find application in many fields, from physics to
chemistry. Here, we introduce the concept of an "eigenstate witness" and
through it provide a new quantum approach which combines variational methods
and phase estimation to approximate eigenvalues for both ground and excited
states. This protocol is experimentally verified on a programmable silicon
quantum photonic chip, a mass-manufacturable platform, which embeds entangled
state generation, arbitrary controlled-unitary operations, and projective
measurements. Both ground and excited states are experimentally found with
fidelities >99%, and their eigenvalues are estimated with 32-bits of precision.
We also investigate and discuss the scalability of the approach and study its
performance through numerical simulations of more complex Hamiltonians. This
result shows promising progress towards quantum chemistry on quantum computers.
