Compilation, Optimization, Error Mitigation, and Machine Learning in Quantum Algorithms