-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathlecture5.tex
264 lines (195 loc) · 7.09 KB
/
lecture5.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
\section{Lecture 5: Other Quantum Gates, Measurement, Multi-Qubit Systems}
\label{sec:lecture5}
\index{quantum gates!single-qubit gates}
\dfn{Single-Qubit Gates}{Quantum gates manipulate individual qubits.
Single-qubit gates are represented by unitary matrices that operate on a
single qubit.}
The following are common single-qubit gates:
\begin{itemize}
\index{quantum gates!single-qubit gates!Hadamard gate}
\item \textbf{Hadamard Gate (H):}
\[
\boxed{
H = \frac{1}{\sqrt{2}} \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}
}
\]
Creates superposition: \boxed{H\zero = \ket{+}, H\one = \ket{-}}
\vspace{0.3cm}
Properties:
\begin{itemize}
\item Self-inverse: $H^2 = I$
\item Maps computational basis to $\ket{\pm}$ basis:
\begin{align*}
\ket{+} &= \frac{1}{\sqrt{2}}(\zero + \one) \\
\ket{-} &= \frac{1}{\sqrt{2}}(\zero - \one)
\end{align*}
\end{itemize}
\nt{
\[
H \zero = \ket{+}, \quad H \one = \ket{-}, \quad H \ket{+} = \zero,
\quad H \ket{-} = \one
\]
}
\index{quantum gates!single-qubit gates!Phase gate}
\item \textbf{Phase Gate (S):}
\[
\boxed{
S = \begin{pmatrix} 1 & 0 \\ 0 & i \end{pmatrix}
}
\]
Adds a $\pi/2$ phase to $\one$, so it is also referred to as the "$\pi$/4
gate" due to $\theta/2$ term in the Bloch sphere equation.
\vspace{0.3cm}
\textbf{Properties:}
\begin{itemize}
\item \textbf{Unitary but not Hermitian}
\item $S^2 = Z$
\item Effect on $\ket{+}$ : \boxed{S\ket{+} =
\frac{1}{\sqrt{2}}(\zero + i\one)}
\end{itemize}
\index{quantum gates!single-qubit gates!T gate}
\item \textbf{T Gate:}
\[
\boxed{
T = \begin{pmatrix} 1 & 0 \\ 0 & e^{i\pi/4} \end{pmatrix}
}
\]
Adds a $\pi/4$ phase to $\one$, so it is also known as the "$\pi$/8 gate".
\vspace{0.3cm}
\textbf{Properties:}
\begin{itemize}
\item $T^2 = S$
\item $T^4 = Z$
\item Often used in quantum error correction
\end{itemize}
\index{quantum gates!single-qubit gates!General Phase gate}
\item \textbf{General Phase Gate } $P(\theta)$:
\[
P(\theta) = \begin{pmatrix} 1 & 0 \\ 0 & e^{i\theta} \end{pmatrix}
\]
Generalizes S and T gates: \boxed{S = P(\pi/2), T = P(\pi/4)}
\end{itemize}
\ex{Example of Applying the Hadamard Gate}{
\begin{align*}
H\zero &= \frac{1}{\sqrt{2}} \begin{bmatrix} 1 & 1 \\ 1 & -1
\end{bmatrix} \begin{bmatrix} 1 \\ 0 \end{bmatrix} \\
& \frac{1}{\sqrt{2}} \begin{bmatrix} 1 \\ 1 \end{bmatrix} = \ket{+}
\end{align*}
}
\nt{
The following properties arise from applying the Hadamard gate:
\begin{align*}
Z &= H X H \\
X &= H Z H
\end{align*}
\begin{proof}
\[
HXH = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}
\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}
\frac{1}{\sqrt{2}}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix} =
\begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix} = Z
\]
\end{proof}
}
\index{quantum measurement}
\subsection*{Back to Measurement}
Measurement collapses quantum states to basis states with
probabilities determined by amplitudes.
\index{quantum measurement!measurement bases}
\begin{itemize}
\item \textbf{Z-basis:} Standard computational basis ($\zero$, $\one$)
\begin{itemize}[label={*}]
\item For state $\ket{\psi} = \alpha\zero + \beta\one$:
\begin{align*}
P(0) &= ||\alpha||^2 \\
P(1) &= ||\beta||^2
\end{align*}
\end{itemize}
\item \textbf{X-basis:} Hadamard basis ($\ket{+}$, $\ket{-}$)
\begin{itemize}[label={*}]
\item Measure in Z-basis after applying H gate
\item $P(+) = |\bra{+}\psi\rangle|^2$
\item $P(-) = |\bra{-}\psi\rangle|^2$
\end{itemize}
\item \textbf{Y-basis:} Eigenstates of Y
\begin{itemize}[label={*}]
\item $\ket{+i} = \frac{1}{\sqrt{2}}(\zero + i\one)$
\item $\ket{-i} = \frac{1}{\sqrt{2}}(\zero - i\one)$
\end{itemize}
\end{itemize}
\index{multi-qubit systems}
\subsection*{Multi-Qubit Systems}
States for multiple qubits are represented as
tensor products:
\[
\boxed{
\ket{\psi} = \sum_{k=0}^{k = 2^n-1} \alpha_k \ket{k}, \quad \sum
||\alpha_k||^2 = 1
}
\]
\noindent
\textbf{Properties of tensor products:}
\index{vector!tensor product!properties@\textit{properties}}
\begin{itemize}
\item \textbf{Not commutative:} $(\ket{0} \otimes \ket{1} \neq \ket{1}
\otimes \ket{0})$
\item Associative: $((\ket{a} \otimes \ket{b}) \otimes \ket{c} = \ket{a}
\otimes (\ket{b} \otimes \ket{c}))$
\item Distributive: $((\alpha\ket{a} + \beta\ket{b}) \otimes \ket{c} =
\alpha(\ket{a} \otimes \ket{c}) + \beta(\ket{b} \otimes \ket{c}))$
\end{itemize}
\vspace{0.3cm}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\qs{Exercise 1}{Prove that the Hadamard gate is unitary and Hermitian.}
\sol{
To prove H is unitary and Hermitian:
\begin{align*}
H^\dagger &= \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & 1 \\ 1 & -1
\end{pmatrix} = H \\
HH &= \frac{1}{2}\begin{pmatrix} 1 & 1 \\ 1 & -1
\end{pmatrix}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix} =
\begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} = I
\end{align*}
Thus, H is both unitary ($HH^\dagger = I$) and Hermitian ($H = H^\dagger$).
}
\vspace{0.3cm}
\qs{Exercise 2}{For $\ket{\psi} = \frac{1}{\sqrt{2}}(\ket{00} + \ket{11})$,
find measurement probabilities for $\ket{00}$ and $\ket{11}$.}
\sol{
For $\ket{\psi} = \frac{1}{\sqrt{2}}(\ket{00} + \ket{11})$:
\begin{align*}
P(00) &= |\bra{00}\psi\rangle|^2 = \left|\frac{1}{\sqrt{2}}\right|^2 =
\frac{1}{2} \\
P(11) &= |\bra{11}\psi\rangle|^2 = \left|\frac{1}{\sqrt{2}}\right|^2 =
\frac{1}{2}
\end{align*}
}
\vspace{0.3cm}
\qs{Exercise 3}{Determine if $U = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & i \\
i & 1 \end{pmatrix}$ is unitary.}
\sol{
To verify unitarity, compute $UU^\dagger$:
\begin{align*}
U^\dagger &= \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & -i \\ -i & 1
\end{pmatrix} \\
UU^\dagger &= \frac{1}{2}\begin{pmatrix} 1 & i \\ i & 1
\end{pmatrix}\begin{pmatrix} 1 & -i \\ -i & 1 \end{pmatrix} =
\begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}
\end{align*}
$\therefore$ U is unitary.
}
\vspace{0.3cm}
\qs{Exercise 4}{If we apply H $\otimes$ H to $\ket{00}$, what state do we
get?}
\sol{
\begin{align*}
(H \otimes H)\ket{00} &= (H\ket{0}) \otimes (H\ket{0}) \\
&= \frac{1}{\sqrt{2}}(\ket{0} + \ket{1}) \otimes
\frac{1}{\sqrt{2}}(\ket{0} + \ket{1}) \\
&= \frac{1}{2}(\ket{00} + \ket{01} + \ket{10} + \ket{11})
\end{align*}
This creates an equal superposition of all two-qubit basis states.
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% End of Lecture 5
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%