Code Optimization For Quantum Computing