Skip to content

Commit 5de03df

Browse files
committed
update week 6
1 parent 14d1467 commit 5de03df

File tree

8 files changed

+1611
-474
lines changed

8 files changed

+1611
-474
lines changed

doc/pub/week6/html/week6-bs.html

Lines changed: 222 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,21 @@
4242
None,
4343
'plans-for-the-week-of-february-24-28-solving-quantum-mechanical-problems'),
4444
('Readings', 2, None, 'readings'),
45-
('Gates and measurements, reminder from previous two weeks',
45+
('States, gates and measurements, reminder from preview lectures',
4646
2,
4747
None,
48-
'gates-and-measurements-reminder-from-previous-two-weeks'),
48+
'states-gates-and-measurements-reminder-from-preview-lectures'),
49+
('Single qubit gates', 2, None, 'single-qubit-gates'),
50+
('Pauli-$X$ gate', 2, None, 'pauli-x-gate'),
51+
('Hadamard gate', 2, None, 'hadamard-gate'),
52+
('Phase Gates', 2, None, 'phase-gates'),
53+
('The inverse of the $S$-gate',
54+
2,
55+
None,
56+
'the-inverse-of-the-s-gate'),
57+
('Two-qubit gates', 2, None, 'two-qubit-gates'),
58+
('The SWAP gate', 2, None, 'the-swap-gate'),
59+
('Pauli Strings', 2, None, 'pauli-strings'),
4960
('Variational Quantum Eigensolver',
5061
2,
5162
None,
@@ -160,7 +171,15 @@
160171
<ul class="dropdown-menu">
161172
<!-- navigation toc: --> <li><a href="#plans-for-the-week-of-february-24-28-solving-quantum-mechanical-problems" style="font-size: 80%;">Plans for the week of February 24-28, Solving quantum mechanical problems</a></li>
162173
<!-- navigation toc: --> <li><a href="#readings" style="font-size: 80%;">Readings</a></li>
163-
<!-- navigation toc: --> <li><a href="#gates-and-measurements-reminder-from-previous-two-weeks" style="font-size: 80%;">Gates and measurements, reminder from previous two weeks</a></li>
174+
<!-- navigation toc: --> <li><a href="#states-gates-and-measurements-reminder-from-preview-lectures" style="font-size: 80%;">States, gates and measurements, reminder from preview lectures</a></li>
175+
<!-- navigation toc: --> <li><a href="#single-qubit-gates" style="font-size: 80%;">Single qubit gates</a></li>
176+
<!-- navigation toc: --> <li><a href="#pauli-x-gate" style="font-size: 80%;">Pauli-\( X \) gate</a></li>
177+
<!-- navigation toc: --> <li><a href="#hadamard-gate" style="font-size: 80%;">Hadamard gate</a></li>
178+
<!-- navigation toc: --> <li><a href="#phase-gates" style="font-size: 80%;">Phase Gates</a></li>
179+
<!-- navigation toc: --> <li><a href="#the-inverse-of-the-s-gate" style="font-size: 80%;">The inverse of the \( S \)-gate</a></li>
180+
<!-- navigation toc: --> <li><a href="#two-qubit-gates" style="font-size: 80%;">Two-qubit gates</a></li>
181+
<!-- navigation toc: --> <li><a href="#the-swap-gate" style="font-size: 80%;">The SWAP gate</a></li>
182+
<!-- navigation toc: --> <li><a href="#pauli-strings" style="font-size: 80%;">Pauli Strings</a></li>
164183
<!-- navigation toc: --> <li><a href="#variational-quantum-eigensolver" style="font-size: 80%;">Variational Quantum Eigensolver</a></li>
165184
<!-- navigation toc: --> <li><a href="#the-vqe" style="font-size: 80%;">The VQE</a></li>
166185
<!-- navigation toc: --> <li><a href="#expectation-value-of-hamiltonian" style="font-size: 80%;">Expectation value of Hamiltonian</a></li>
@@ -232,8 +251,7 @@ <h2 id="plans-for-the-week-of-february-24-28-solving-quantum-mechanical-problems
232251
<!-- subsequent paragraphs come in larger fonts, so start with a paragraph -->
233252
<ol>
234253
<li> Repetition from last week on gates, measurements and one-qubit systems</li>
235-
<li> Introducing the Variational Quantum Eigensolver (VQE) and discussion of project 1</li>
236-
<li> <b>Note on project work:</b> feel free to collaborate on the projects
254+
<li> Introducing the Variational Quantum Eigensolver (VQE) and discussion of project 1
237255
<!-- o <a href="https://youtu.be/" target="_self">Video of lecture to be added</a> -->
238256
<!-- o <a href="https://github.com/CompPhysics/QuantumComputingMachineLearning/blob/gh-pages/doc/HandWrittenNotes/2024/NotesFebruary21.pdf" target="_self">Whiteboard notes</a> --></li>
239257
</ol>
@@ -250,9 +268,200 @@ <h2 id="readings" class="anchor">Readings </h2>
250268
<li> <a href="https://www.sciencedirect.com/science/article/pii/S0370157322003118?via%3Dihub" target="_self">See also the VQE review article by Tilly et al.</a></li>
251269
</ol>
252270
<!-- !split -->
253-
<h2 id="gates-and-measurements-reminder-from-previous-two-weeks" class="anchor">Gates and measurements, reminder from previous two weeks </h2>
271+
<h2 id="states-gates-and-measurements-reminder-from-preview-lectures" class="anchor">States, gates and measurements, reminder from preview lectures </h2>
272+
273+
<p>Mathematically, quantum gates are a series of unitary operators in the
274+
operator space $ \mathcal{H} \otimes \mathcal{H}^{*}$ which evolve the
275+
state. The unitary nature preserves the norm of the state vector,
276+
ensuring the probabilities sum to unity. Since not all gates
277+
correspond to an observable, they are not necessarily hermitian.
278+
</p>
279+
280+
<!-- !split -->
281+
<h2 id="single-qubit-gates" class="anchor">Single qubit gates </h2>
282+
283+
<p>The Pauli matrices (and gate operations following therefrom) are defined as</p>
284+
$$
285+
X \equiv \sigma_x = \begin{pmatrix}
286+
0 & 1 \\
287+
1 & 0
288+
\end{pmatrix}, \quad
289+
Y \equiv \sigma_y = \begin{pmatrix}
290+
0 & -i \\
291+
i & 0
292+
\end{pmatrix}, \quad
293+
Z \equiv \sigma_z = \begin{pmatrix}
294+
1 & 0 \\
295+
0 & -1
296+
\end{pmatrix}.
297+
$$
298+
299+
300+
<!-- !split -->
301+
<h2 id="pauli-x-gate" class="anchor">Pauli-\( X \) gate </h2>
302+
303+
<p>The Pauli-\( X \) gate is also known as the <b>NOT</b> gate, which flips the state of the qubit.</p>
304+
$$
305+
\begin{align}
306+
X\vert 0\rangle &= \vert 1\rangle,
307+
\label{_auto1}\\
308+
X\vert 1\rangle &= \vert 0\rangle.
309+
\label{_auto2}
310+
\end{align}
311+
$$
312+
313+
<p>The Pauli-\( Y \) gate flips the bit and multiplies the phase by $ i $. </p>
314+
$$
315+
\begin{align}
316+
Y\vert 0\rangle &= i\vert 1\rangle,
317+
\label{_auto3}\\
318+
Y\vert 1\rangle &= -i\vert 0\rangle.
319+
\label{_auto4}
320+
\end{align}
321+
$$
322+
323+
<p>The Pauli-\( Z \) gate multiplies only the phase of \( \vert 1\rangle \) by $ -1 \( .</p>
324+
$$
325+
\begin{align}
326+
Z\vert 0\rangle &= \vert 0\rangle,
327+
\label{_auto5}\\
328+
Z\vert 1\rangle &= -\vert 1\rangle.
329+
\label{_auto6}
330+
\end{align}
331+
$$
332+
333+
<!-- !split -->
334+
<h2 id="hadamard-gate" class="anchor">Hadamard gate </h2>
335+
336+
<p>The Hadamard gate is defined as</p>
337+
$$
338+
H = \frac{1}{\sqrt{2}} \begin{pmatrix}
339+
1 & 1 \\
340+
1 & -1
341+
\end{pmatrix}.
342+
$$
343+
344+
<p>It creates a superposition of the \) \vert 0\rangle $ and $ \vert 1\rangle $ states.</p>
345+
$$
346+
\begin{align}
347+
H\vert 0\rangle &= \frac{1}{\sqrt{2}} \left( \vert 0\rangle + \vert 1\rangle \right),
348+
\label{_auto7}\\
349+
H\vert 1\rangle &= \frac{1}{\sqrt{2}} \left( \vert 0\rangle - \vert 1\rangle \right).
350+
\label{_auto8}
351+
\end{align}
352+
$$
353+
354+
355+
<!-- !split -->
356+
<h2 id="phase-gates" class="anchor">Phase Gates </h2>
357+
<p>The phase gate is usually denoted as \( S \) and is defined as</p>
358+
$$
359+
\begin{equation}
360+
S = \begin{pmatrix}
361+
1 & 0 \\
362+
0 & i
363+
\end{pmatrix}.
364+
\label{_auto9}
365+
\end{equation}
366+
$$
367+
368+
<p>It multiplies only the phase of the $ \vert 1\rangle $ state by $ i $.</p>
369+
$$
370+
\begin{align}
371+
S\vert 0\rangle &= \vert 0\rangle,
372+
\label{_auto10}\\
373+
S\vert 1\rangle &= i\vert 1\rangle.
374+
\label{_auto11}
375+
\end{align}
376+
$$
377+
378+
379+
<!-- !split -->
380+
<h2 id="the-inverse-of-the-s-gate" class="anchor">The inverse of the \( S \)-gate </h2>
381+
382+
<p>The inverse</p>
383+
$$
384+
\begin{equation}
385+
S^\dagger = \begin{pmatrix}
386+
1 & 0 \\
387+
0 & -i
388+
\end{pmatrix}
389+
\label{_auto12}
390+
\end{equation}
391+
$$
254392

255-
<p>Material to come here</p>
393+
<p>is known as the $ S^\dagger$ gate which applies an \( \imath \) phase shift to \( \vert 1\rangle \).</p>
394+
$$
395+
\begin{align}
396+
S^\dagger\vert 0\rangle &= \vert 0\rangle,
397+
\label{_auto13}\\
398+
S^\dagger\vert 1\rangle &= -i\vert 1\rangle.
399+
\label{_auto14}
400+
\end{align}
401+
$$
402+
403+
<!-- !split -->
404+
<h2 id="two-qubit-gates" class="anchor">Two-qubit gates </h2>
405+
406+
<p>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</p>
407+
$$
408+
\begin{equation}
409+
\text{CNOT} = \begin{pmatrix}
410+
1 & 0 & 0 & 0 \\
411+
0 & 1 & 0 & 0 \\
412+
0 & 0 & 0 & 1 \\
413+
0 & 0 & 1 & 0
414+
\end{pmatrix}.
415+
\label{_auto15}
416+
\end{equation}
417+
$$
418+
419+
<p>It is often used to perform linear entanglement on qubits.</p>
420+
$$
421+
\begin{align*}
422+
\text{CNOT} \vert 00\rangle &= \vert 00\rangle, \\
423+
\text{CNOT} \vert 01\rangle &= \vert 01\rangle, \\
424+
\text{CNOT} \vert 10\rangle &= \vert 11\rangle, \\
425+
\text{CNOT} \vert 11\rangle &= \vert 10\rangle.
426+
\end{align*}
427+
$$
428+
429+
430+
<!-- !split -->
431+
<h2 id="the-swap-gate" class="anchor">The SWAP gate </h2>
432+
<p>The SWAP gate is a two-qubit gate which swaps the state of two qubits. It is defined as</p>
433+
$$
434+
\begin{equation}
435+
\text{SWAP} = \begin{pmatrix}
436+
1 & 0 & 0 & 0 \\
437+
0 & 0 & 1 & 0 \\
438+
0 & 1 & 0 & 0 \\
439+
0 & 0 & 0 & 1
440+
\end{pmatrix}.
441+
\label{_auto16}
442+
\end{equation}
443+
$$
444+
445+
$$
446+
\begin{align*}
447+
\text{SWAP}\vert 00\rangle &= \vert 00\rangle, \\
448+
\text{SWAP} \vert 01\rangle &= \vert 10\rangle, \\
449+
\text{SWAP} \vert 10\rangle &= \vert 01\rangle, \\
450+
\text{SWAP} \vert 11\rangle &= \vert 11 \rangle.
451+
\end{align*}
452+
$$
453+
454+
455+
<!-- !split -->
456+
<h2 id="pauli-strings" class="anchor">Pauli Strings </h2>
457+
<p>A Pauli string, such as $ XIYZ $ is a tensor product of Pauli matrices acting on different qubits.
458+
The Pauli string $ XIYZ $ is defined as (from qubit one to qubit four, from left to right)
459+
</p>
460+
$$
461+
XIYZ \equiv X_0 \otimes I_1 \otimes Y_2 \otimes Z_3.
462+
$$
463+
464+
<p>Hamiltonians are often rewritten or decomposed in terms of Pauli string as they can be easily implemented on quantum computers. </p>
256465

257466
<!-- !split -->
258467
<h2 id="variational-quantum-eigensolver" class="anchor">Variational Quantum Eigensolver </h2>
@@ -366,15 +575,15 @@ <h2 id="expectation-values" class="anchor">Expectation values </h2>
366575
$$
367576
\begin{align}
368577
HS^{\dagger}, & \text{if} \ \sigma = Y,
369-
\label{_auto1}
578+
\label{_auto17}
370579
\end{align}
371580
$$
372581

373582
<p>and</p>
374583
$$
375584
\begin{align}
376585
I, & \text{if} \ \sigma = Z.
377-
\label{_auto2}
586+
\label{_auto18}
378587
\end{align}
379588
$$
380589

@@ -452,7 +661,7 @@ <h2 id="arbitrary-pauli-gate" class="anchor">Arbitrary Pauli gate </h2>
452661
&=\langle\phi\vert\left(\sum_{x\in\{0,1\}}(-1)^x\vert x\rangle\langle x\vert\right)\vert\phi\rangle \nonumber \\
453662
&=\sum_{x\in\{0,1\}}(-1)^x\vert\langle x\vert \phi\rangle\vert^2\nonumber \\
454663
&=\sum_{x\in\{0,1\}}(-1)^xP(\vert \phi\rangle\to\vert x\rangle),
455-
\label{_auto3}
664+
\label{_auto19}
456665
\end{align}
457666
$$
458667

@@ -518,7 +727,7 @@ <h2 id="which-gives-us" class="anchor">Which gives us </h2>
518727
\\
519728
&=
520729
\sum_{x\in\{0,1\}^n}(-1)^{\sum_{p\in Q}x_p}P(\vert \phi\rangle\to\vert x\rangle),
521-
\label{_auto4}
730+
\label{_auto20}
522731
\end{align}
523732
$$
524733

@@ -608,15 +817,15 @@ <h2 id="rewriting-the-hamiltonian" class="anchor">Rewriting the Hamiltonian </h2
608817
$$
609818
\begin{equation}
610819
H_0\vert 0 \rangle =E_1\vert 0 \rangle,
611-
\label{_auto5}
820+
\label{_auto21}
612821
\end{equation}
613822
$$
614823

615824
<p>and</p>
616825
$$
617826
\begin{equation}
618827
H_0\vert 1\rangle =E_2\vert 1\rangle,
619-
\label{_auto6}
828+
\label{_auto22}
620829
\end{equation}
621830
$$
622831

0 commit comments

Comments
 (0)