Skip to content

Commit 14d1467

Browse files
committed
Update week6.do.txt
1 parent 32b593d commit 14d1467

File tree

1 file changed

+49
-19
lines changed

1 file changed

+49
-19
lines changed

doc/src/week6/week6.do.txt

Lines changed: 49 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -56,68 +56,92 @@ The Pauli matrices (and gate operations following therefrom) are defined as
5656

5757
!split
5858
===== Pauli-$X$ gate =====
59+
5960
The Pauli-$X$ gate is also known as the _NOT_ gate, which flips the state of the qubit.
6061
!bt
6162
\begin{align}
6263
X\ket{0} &= \ket{1}, \\
6364
X\ket{1} &= \ket{0}.
6465
\end{align}
6566
!et
66-
The Pauli-Y gate flips the bit and multiplies the phase by $ i $.
67+
The Pauli-$Y$ gate flips the bit and multiplies the phase by $ i $.
68+
!bt
6769
\begin{align}
6870
Y\ket{0} &= i\ket{1}, \\
6971
Y\ket{1} &= -i\ket{0}.
7072
\end{align}
71-
The Pauli-Z gate multiplies only the phase of $\ket{1}$ by $ -1 $.
73+
!et
74+
The Pauli-$Z$ gate multiplies only the phase of $\ket{1}$ by $ -1 $.
75+
!bt
7276
\begin{align}
7377
Z\ket{0} &= \ket{0}, \\
7478
Z\ket{1} &= -\ket{1}.
7579
\end{align}
80+
!et
81+
!split
82+
===== Hadamard gate =====
7683

77-
\subsubsection{Hadamard Gate}
7884
The Hadamard gate is defined as
79-
\begin{equation}
85+
!bt
86+
\[
8087
H = \frac{1}{\sqrt{2}} \begin{pmatrix}
8188
1 & 1 \\
8289
1 & -1
8390
\end{pmatrix}.
84-
\end{equation}
91+
\]
92+
!et
93+
8594
It creates a superposition of the $ \ket{0} $ and $ \ket{1} $ states.
95+
!bt
8696
\begin{align}
8797
H\ket{0} &= \frac{1}{\sqrt{2}} \left( \ket{0} + \ket{1} \right), \\
8898
H\ket{1} &= \frac{1}{\sqrt{2}} \left( \ket{0} - \ket{1} \right).
8999
\end{align}
100+
!et
90101

91-
\subsubsection{Phase Gates}
92-
The S-phase gate is usually denoted as $ S $ and is defined as
102+
!split
103+
===== Phase Gates =====
104+
The phase gate is usually denoted as $S$ and is defined as
105+
!bt
93106
\begin{equation}
94107
S = \begin{pmatrix}
95108
1 & 0 \\
96109
0 & i
97110
\end{pmatrix}.
98111
\end{equation}
112+
!et
99113
It multiplies only the phase of the $ \ket{1} $ state by $ i $.
114+
!bt
100115
\begin{align}
101116
S\ket{0} &= \ket{0}, \\
102117
S\ket{1} &= i\ket{1}.
103118
\end{align}
104-
Its inverse
119+
!et
120+
121+
!split
122+
===== The inverse of the $S$-gate =====
123+
124+
The inverse
125+
!bt
105126
\begin{equation}
106127
S^\dagger = \begin{pmatrix}
107128
1 & 0 \\
108129
0 & -i
109130
\end{pmatrix}
110131
\end{equation}
111-
is known as the $ S^\dagger $ gate which applies a $ -i $ phase shift to \ $ \ket{1}$.
132+
!et
133+
is known as the $ S^\dagger $ gate which applies an $\imath$ phase shift to $\ket{1}$.
134+
!bt
112135
\begin{align}
113136
S^\dagger\ket{0} &= \ket{0}, \\
114137
S^\dagger\ket{1} &= -i\ket{1}.
115138
\end{align}
139+
!et
140+
!split
141+
===== Two-qubit gates =====
116142

117-
\subsection{Two Qubit Gates}
118-
\subsubsection{CNOT Gate}
119-
\label{ssub:cnot_gate}
120143
The CNOT gate is a two-qubit gate which acts on two qubits, a control qubit and a target qubit. The CNOT gate is defined as
144+
!bt
121145
\begin{equation}
122146
\text{CNOT} = \begin{pmatrix}
123147
1 & 0 & 0 & 0 \\
@@ -126,17 +150,22 @@ The CNOT gate is a two-qubit gate which acts on two qubits, a control qubit and
126150
0 & 0 & 1 & 0
127151
\end{pmatrix}.
128152
\end{equation}
153+
!et
129154
It is often used to perform linear entanglement on qubits.
155+
!bt
130156
\begin{align*}
131157
\label{eq:cnot-behaviour}
132158
\cnot \ket{00} &= \ket{00}, \\
133159
\cnot \ket{01} &= \ket{01}, \\
134160
\cnot \ket{10} &= \ket{11}, \\
135161
\cnot \ket{11} &= \ket{10}.
136162
\end{align*}
137-
\subsubsection{SWAP gate}%
138-
\label{ssub:swap_gate}
163+
!et
164+
165+
!split
166+
===== The SWAP gate =====
139167
The SWAP gate is a two-qubit gate which swaps the state of two qubits. It is defined as
168+
!bt
140169
\begin{equation}
141170
\text{SWAP} = \begin{pmatrix}
142171
1 & 0 & 0 & 0 \\
@@ -145,13 +174,14 @@ The SWAP gate is a two-qubit gate which swaps the state of two qubits. It is def
145174
0 & 0 & 0 & 1
146175
\end{pmatrix}.
147176
\end{equation}
177+
!et
148178
\begin{align*}
149-
\swp \ket{00} &= \ket{00}, \\
150-
\swp \ket{01} &= \ket{10}, \\
151-
\swp \ket{10} &= \ket{01}, \\
152-
\swp \ket{11} &= \ket{11}.
179+
\text{SWAP}\ket{00} &= \ket{00}, \\
180+
\text{SWAP} \ket{01} &= \ket{10}, \\
181+
\text{SWAP} \ket{10} &= \ket{01}, \\
182+
\text{SWAP} \ket{11} &= \ket{11}.
153183
\end{align*}
154-
184+
!et
155185

156186
!split
157187
===== Pauli Strings =====

0 commit comments

Comments
 (0)