Digital quantum simulations and machine learning on near-term quantum processors