Machine Learning Algorithms Using Classical and Quantum Photonics