The code base for the simulation of Shor's algorithm consists of eight
files.

complex.h/C

: These files contain the simple complex number
class that we wrote for storing state information about the quantum
memory register in the simulation.

qureg.h/C

: This file contains the quantum register class that
simulates the behavior of the quantum memory register in Shor's
algorithm. It is generic enough that it may be made to simulate any
quantum memory register, although what happens in the event of a
collapse not due to the direct measurement of the register is left
to the programmer to perform. An example of such a collapse that is
the collapse of the first partition of Shor's quantum memory
register in step 7 of his algorithm.