Towards provably efficient quantum algorithms for large-scale machine-learning models