next up previous contents
Next: The Complex Number Class Up: A Simulation of Shor's Previous: A Simulation of Shor's   Contents

Introduction to the Code for the Simulation

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

complex.C
: This file contains the simple complex number class that I wrote for storing state information about my quantum memory register in the simulation.

qureg.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.

shor.C
: This is the main body of the simulation, which contains the Steps of Shor's algorithm as described above.

util.C
: This is a library of useful functions used by shor.C

Makefile
: A simple makefile to produce the shor-simulator executable.


next up previous contents
Next: The Complex Number Class Up: A Simulation of Shor's Previous: A Simulation of Shor's   Contents
Matthew Hayward - Quantum Computing and Shor's Algorithm GitHub Repository