next up previous contents
Next: The Simulation of Shor's 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 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.

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

timer.C
: Function for measuring the running time of Shor's algorithm.

barrier.h/C
: Contains code supporting barriers, where threads must synchronize.

range.h/C
: Contains code for splitting up work between threads.

shor.C
: Contains the simulation of the steps of Shor's algorithm.


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