In order to make the steps of Shor's algorithm more concrete to me I
made a program which simulates the operation of a quantum computer
performing Shor's algorithm. As noted by Feynman and others it is
impossible to simulate a quantum mechanical system on a classical
computing device without incurring exponential slowdown, thus the
simulation is only tolerable to observe for relatively small numbers.
The simulation implements all of the steps in Shor's algorithm, and
successfully factors numbers. The code is written in C++ and can be
found in Appendix D.