You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Report/sections/introduction.tex
+29-48
Original file line number
Diff line number
Diff line change
@@ -3,28 +3,22 @@
3
3
\begin{document}
4
4
5
5
6
-
Here I will give a brief overview of the mathematics necessary to follow
7
-
the workings / implementation of the Simulator, and also to refresh
8
-
slightly on the notation and concepts of what will be used throughout
9
-
this paper.\\
10
-
A working knowledge of linear algebra, matrix operations (\emph{i.e.
11
-
multiplication, transpose, trace and tensor products}) among others,
12
-
along with a basic idea of some Quantum Mechanics / Quantum
13
-
Informational Theory and the workings of Classical Computers, is helpful
14
-
but not 100\% necessary. I will try and keep away from the extreme
15
-
specifics, and the reasons behind everything, to the best of my
16
-
abilities, although some detail is needed in order to portray the ideas
17
-
behind this. If you are interested in learning more, the book
6
+
Here I will give a brief overview of the whats necessary to follow
7
+
the workings / implementation of the Simulator and then the programming language, and also to look over the notation and concepts that will be used throughout this paper.\\
8
+
A familiarity with some linear algebra
9
+
along with a basic idea of some Quantum Mechanics and the workings of Classical Computers, is helpful
10
+
but not 100\% necessary. \\
11
+
If you are interested in learning more about Quantum Computing, the book
18
12
``\emph{Quantum Computing for Computer Scientists}''\cite{quantumcomputerscience} is very good.
19
13
20
14
\subsection{The Qubit}
21
15
22
16
In classical computing, the bit (short for binary unit) is the smallest
23
17
data unit. It has a \emph{Single binary value, that can be either
24
18
\texttt{0} or \texttt{1}}.\\
25
-
The \emph{qubit} would be the Quantum version of the classical bit.
19
+
The \emph{qubit} is the Quantum analog of the classical bit.
26
20
However, unlike a classical bit, it can take a superposition, meaning
27
-
that it is possible for a qubit to be in a linear combination of
21
+
that it is possible for a qubit to be in a combination of
28
22
states.\\
29
23
In this paper, the choice of basis states (\(Z\)) are as follows:
30
24
\begin{equation}
@@ -43,36 +37,29 @@ \subsection{The Qubit}
43
37
superposition. A single qubit superposition would look like this:\\
Copy file name to clipboardExpand all lines: Report/sections/simulation.tex
+8-8
Original file line number
Diff line number
Diff line change
@@ -2,18 +2,18 @@
2
2
3
3
\begin{document}
4
4
When thinking of simulating a Quantum Computer, there are a number of possible ways to implement it, depending on what you want from your simulator.
5
-
Regardless of what method, it will always get exponentially slower as you add more qubits to simulate, as the number of amplitudes you need to store is \(2^n\).
6
-
To get the most accurate simulation, you need to also simulate 'Decoherence', which is where the system will loose information by the outside environment, although the simulator detailed here is called an 'Ideal' Simulator, as it doesn't also simulate Decoherence.
5
+
Regardless of what method, it will always get exponentially slower as you add more Qubits to simulate, as the number of amplitudes you need to store is \(2^n\).
6
+
To get the most accurate simulation, you need to also simulate 'Decoherence', which is where the system will loose information due to measurements by the outside environment, although the simulator detailed here is called an 'Ideal' Simulator, as it doesn't also simulate Decoherence.
7
7
In this project, the simulator will be built upon vector-matrix opperations.
8
8
9
9
\subsection{Quantum Register}
10
-
To first start the simulator, you have to have a new quantum register object. When a new Quantum Register is created, it creates a new \(2^n\) dimensional vector of zero, and then it sets the first 0 to 1. This is the same as representing an n qubit state, and setting all n qubits to the state \(\lvert0\rangle\). Remember:
10
+
When you start the simulator, you have to have a new Quantum Register. When a new Quantum Register is created, it creates a new \(2^n\) dimensional vector of zero, and then it sets the first 0 to 1. This is the same as representing an n Qubit state, and setting all n Qubits to the state \(\lvert0\rangle\). Remember:
If you look at the gates defined in the Previous Section, 'Quantum Logic Gates' (For Example, Equation (3)), they are all either \(2\times2\) or \(4\times4\) Matrices, which means that they can only be applied to either a 2 or 4 dimensional vector. This is a problem for our computational model, as we create a large \(2^n\) Dimensional Vector.
28
28
29
29
\subsubsection{Expanding Single Qubit Gates}
30
-
Essentially, what we are trying to do it take a 2x2 matrix, and scale it up, so that it a \(2^n\) x \(2^n\) matrix. Whats important, is that the new matrix must only affect the qubit its targeting. For example, if I had a 4 Qubit Register, and I wanted to apply an \(X\) Gate to the 3rd Qubit, The equation for that new matrix is \(X_{3,4} = Id \otimes Id \otimes X \otimes Id \), with \(Id\) Being a 2x2 Identity Matrix. \\
31
-
To generalise this further, to create the gate \(G_{m,n}\) (With \(n\) being the number of qubits in the register, \(m\) being the number of the qubit the gate will act on, and \(G\) Being the 2x2 gate that will be applied to that qubit),
30
+
Essentially, what we are trying to do it take a 2x2 matrix, and scale it up, so that it a \(2^n\) x \(2^n\) matrix. Whats important, is that the new matrix must only affect the Qubit its targeting. For example, if I had a 4 Qubit Register, and I wanted to apply an \(X\) Gate to the 3rd Qubit, The equation for that new matrix is \(X_{3,4} = Id \otimes Id \otimes X \otimes Id \), with \(Id\) Being a 2x2 Identity Matrix. \\
31
+
To generalise this further, to create the gate \(G_{m,n}\) (With \(n\) being the number of Qubits in the register, \(m\) being the number of the Qubit the gate will act on, and \(G\) Being the 2x2 gate that will be applied to that Qubit),
32
32
you can use the equation:
33
33
34
34
\begin{equation}
@@ -42,7 +42,7 @@ \subsubsection{Expanding Single Qubit Gates}
42
42
(Note: \(\underset{i=1}{\overset{n}{\otimes}}\) is like \(\underset{i=1}{\overset{n}{\sum}}\), but using the kronecker product, instead of the sum.)
43
43
44
44
\subsubsection{Expanding Multi-Qubit Gates}
45
-
Focusing on Controlled Gates, there are a number of ways to expand / scale up multi-qubit gates, but most of them are quite long winded (See the appendix for a general expansion method),
45
+
Focusing on Controlled Gates, there are a number of ways to expand / scale up multi-Qubit gates, but most of them are quite long winded (See the appendix for a general expansion method),
46
46
but the way that the CNOT / Controlled X Gate is implemented in the simulator, is using a Input-Output like structure to generate a new matrix. \\
47
47
There is no equation for this gate (Again, see the appendices for a full, generalised mathematical solution), but the generation method for this simulator can be shown using the source code. \\\\
48
48
See the \emph{Gate} class, and the \emph{generateGate} method.
@@ -54,7 +54,7 @@ \subsection{Applying Gates}
54
54
\lvert\psi\rangle\cdot G
55
55
\end{equation}
56
56
57
-
For example, to apply a Pauli-X Gate (Not Gate) to the second qubit of a 2-Qubit Register, it would look as shown (Keep in mind the previous Gate Matrix Generation Equations):
57
+
For example, to apply a Pauli-X Gate (Not Gate) to the second Qubit of a 2-Qubit Register, it would look as shown (Keep in mind the previous Gate Matrix Generation Equations):
0 commit comments