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

Utility Functions for the Simulation

The util.C file contains functions which are called from shor.C. Many of the functions are written to avoid overflow when calculating functions in which there are intermediate steps which may have large values. For example while factoring 15, x255 mod 15 is calculated, but the modular exponentiation function in util.C calculates it in such a manner that x255 need not be explicitly calculated. I have commented these helper functions in the code itself.


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