Data Encoding, Compilation, and Algorithms for Quantum Machine Learning