Quantum Simulation Algorithms with Applications to Quantum Error Correction and Topological Data Analysis