Quantum Computing, Spring 2013, HW4: simulating the Quantum Phase Estimation algorithm