% vim: ft=tex \section{The naive Simulator} A quite big part of the simulations interesting for students and researchers is not covered by stabilizer states and stabilizer circuits. In particular the phase estimation algorithm is essential for many applications. Being able to simulate such an algorithm is essential for education. \subsection{Simulator Core} Recalling \ref{ref:nqbitsystems} an arbitrary state $\ket{\psi}$ can be written as such: $$ \ket{\psi} = \sum\limits_{i = 0}^{2^N - 1} c_i \ket{i} $$ Which yields $2^N$ coefficients $c_i = \braket{\psi}{i}$. These coefficients are used to store the quantum mechanical state of the simulator and are stored in numpy arrays \cite{numpy_array}. They can be modified and viewed without overhead using python and allow fast modification using so-called NumPy ufuncs\cite{numpy_ufunc}. A simulator state also contains a classical state which is a length $N$ integer array containing the measured classical bits with a default value of $-1$. The gates are implemented as NumPy ufuncs which allows