next up previous contents
Next: The Quantum Memory Register Up: A Simulation of Shor's Previous: Introduction to the Code   Contents

The Complex Number Class

The complex class is needed because the probability amplitudes, or the lengths, of a vector in a Hilbert Space are in general complex. The state of our quantum memory register may be thought of as a vector in a Hilbert Space. Each complex number can be set to a complex value, which is stored internally as a real part, and an imaginary part, both of which are double precision floating point numbers in this simulation.


next up previous contents
Next: The Quantum Memory Register Up: A Simulation of Shor's Previous: Introduction to the Code   Contents
Matthew Hayward - Quantum Computing and Shor's Algorithm GitHub Repository