Quantum algorithm for Gaussian process regression