Skip to content

Commit 2ecbc3b

Browse files
committed
update week 4
1 parent 4aa85c4 commit 2ecbc3b

File tree

8 files changed

+1431
-271
lines changed

8 files changed

+1431
-271
lines changed

doc/pub/week4/html/week4-bs.html

Lines changed: 198 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
2,
4141
None,
4242
'plans-for-the-week-of-february-10-14'),
43+
('Readings', 2, None, 'readings'),
4344
('Gates, the whys and hows', 2, None, 'gates-the-whys-and-hows'),
4445
('Structure of the lecture', 2, None, 'structure-of-the-lecture'),
4546
('Part 1: Mathematical background',
@@ -99,11 +100,19 @@
99100
2,
100101
None,
101102
'part-2-specific-realizations-and-famous-gates'),
103+
('Spin Hamiltonian', 2, None, 'spin-hamiltonian'),
104+
('Field along the $z$-axis', 2, None, 'field-along-the-z-axis'),
105+
('Bringing back a state on the Bloch sphere',
106+
2,
107+
None,
108+
'bringing-back-a-state-on-the-bloch-sphere'),
109+
('Time evolution', 2, None, 'time-evolution'),
110+
('Final expression', 2, None, 'final-expression'),
102111
('Part 3: Fanous Quantum gates, circuits and simple algorithms '
103-
'(parts from last week)',
112+
'(repetition from last week)',
104113
2,
105114
None,
106-
'part-3-fanous-quantum-gates-circuits-and-simple-algorithms-parts-from-last-week'),
115+
'part-3-fanous-quantum-gates-circuits-and-simple-algorithms-repetition-from-last-week'),
107116
('Quantum circuits', 2, None, 'quantum-circuits'),
108117
('Single-Qubit Gates', 2, None, 'single-qubit-gates'),
109118
('Widely used gates', 2, None, 'widely-used-gates'),
@@ -156,7 +165,18 @@
156165
2,
157166
None,
158167
'more-on-rotation-operators'),
159-
('Code example', 2, None, 'code-example')]}
168+
('Code example', 2, None, 'code-example'),
169+
('Topics next week', 2, None, 'topics-next-week'),
170+
('Exercises this week: Hamiltonians and project 1',
171+
2,
172+
None,
173+
'exercises-this-week-hamiltonians-and-project-1'),
174+
('Rewriting in terms of Pauli matrices',
175+
2,
176+
None,
177+
'rewriting-in-terms-of-pauli-matrices'),
178+
('The interaction part', 2, None, 'the-interaction-part'),
179+
('Measurement basis', 2, None, 'measurement-basis')]}
160180
end of tocinfo -->
161181

162182
<body>
@@ -192,6 +212,7 @@
192212
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
193213
<ul class="dropdown-menu">
194214
<!-- navigation toc: --> <li><a href="#plans-for-the-week-of-february-10-14" style="font-size: 80%;">Plans for the week of February 10-14</a></li>
215+
<!-- navigation toc: --> <li><a href="#readings" style="font-size: 80%;">Readings</a></li>
195216
<!-- navigation toc: --> <li><a href="#gates-the-whys-and-hows" style="font-size: 80%;">Gates, the whys and hows</a></li>
196217
<!-- navigation toc: --> <li><a href="#structure-of-the-lecture" style="font-size: 80%;">Structure of the lecture</a></li>
197218
<!-- navigation toc: --> <li><a href="#part-1-mathematical-background" style="font-size: 80%;">Part 1: Mathematical background</a></li>
@@ -218,7 +239,12 @@
218239
<!-- navigation toc: --> <li><a href="#initial-state-preparation" style="font-size: 80%;">Initial state preparation</a></li>
219240
<!-- navigation toc: --> <li><a href="#final-expression" style="font-size: 80%;">Final expression</a></li>
220241
<!-- navigation toc: --> <li><a href="#part-2-specific-realizations-and-famous-gates" style="font-size: 80%;">Part 2: Specific realizations and famous gates</a></li>
221-
<!-- navigation toc: --> <li><a href="#part-3-fanous-quantum-gates-circuits-and-simple-algorithms-parts-from-last-week" style="font-size: 80%;">Part 3: Fanous Quantum gates, circuits and simple algorithms (parts from last week)</a></li>
242+
<!-- navigation toc: --> <li><a href="#spin-hamiltonian" style="font-size: 80%;">Spin Hamiltonian</a></li>
243+
<!-- navigation toc: --> <li><a href="#field-along-the-z-axis" style="font-size: 80%;">Field along the \( z \)-axis</a></li>
244+
<!-- navigation toc: --> <li><a href="#bringing-back-a-state-on-the-bloch-sphere" style="font-size: 80%;">Bringing back a state on the Bloch sphere</a></li>
245+
<!-- navigation toc: --> <li><a href="#time-evolution" style="font-size: 80%;">Time evolution</a></li>
246+
<!-- navigation toc: --> <li><a href="#final-expression" style="font-size: 80%;">Final expression</a></li>
247+
<!-- navigation toc: --> <li><a href="#part-3-fanous-quantum-gates-circuits-and-simple-algorithms-repetition-from-last-week" style="font-size: 80%;">Part 3: Fanous Quantum gates, circuits and simple algorithms (repetition from last week)</a></li>
222248
<!-- navigation toc: --> <li><a href="#quantum-circuits" style="font-size: 80%;">Quantum circuits</a></li>
223249
<!-- navigation toc: --> <li><a href="#single-qubit-gates" style="font-size: 80%;">Single-Qubit Gates</a></li>
224250
<!-- navigation toc: --> <li><a href="#widely-used-gates" style="font-size: 80%;">Widely used gates</a></li>
@@ -248,6 +274,11 @@
248274
<!-- navigation toc: --> <li><a href="#possible-ansatzes" style="font-size: 80%;">Possible ansatzes</a></li>
249275
<!-- navigation toc: --> <li><a href="#more-on-rotation-operators" style="font-size: 80%;">More on rotation operators</a></li>
250276
<!-- navigation toc: --> <li><a href="#code-example" style="font-size: 80%;">Code example</a></li>
277+
<!-- navigation toc: --> <li><a href="#topics-next-week" style="font-size: 80%;">Topics next week</a></li>
278+
<!-- navigation toc: --> <li><a href="#exercises-this-week-hamiltonians-and-project-1" style="font-size: 80%;">Exercises this week: Hamiltonians and project 1</a></li>
279+
<!-- navigation toc: --> <li><a href="#rewriting-in-terms-of-pauli-matrices" style="font-size: 80%;">Rewriting in terms of Pauli matrices</a></li>
280+
<!-- navigation toc: --> <li><a href="#the-interaction-part" style="font-size: 80%;">The interaction part</a></li>
281+
<!-- navigation toc: --> <li><a href="#measurement-basis" style="font-size: 80%;">Measurement basis</a></li>
251282

252283
</ul>
253284
</li>
@@ -288,13 +319,18 @@ <h2 id="plans-for-the-week-of-february-10-14" class="anchor">Plans for the week
288319

289320
<ol>
290321
<li> Reminder from last week on gates and circuits</li>
291-
<li> One-qubit and two-qubit gates, background and realizations
292-
<!-- o Entropy as a measurement of entanglement --></li>
322+
<li> One-qubit and two-qubit gates, background and realizations</li>
293323
<li> Simple Hamiltonian systems</li>
294324
<li> <a href="https://youtu.be/" target="_self">Video of lecture to be added</a>
295325
<!-- o <a href="https://github.com/CompPhysics/QuantumComputingMachineLearning/blob/gh-pages/doc/HandWrittenNotes/2025/NotesFebruary12.pdf" target="_self">Whiteboard notes</a> --></li>
296326
</ol>
297327
<!-- !split -->
328+
<h2 id="readings" class="anchor">Readings </h2>
329+
330+
<ol>
331+
<li> For the discussion of one-qubit, two-qubit and other gates, sections 2.6-2.11 and 3.1-3.4 of Hundt's book <b>Quantum Computing for Programmers</b>, contain most of the relevant information.</li>
332+
</ol>
333+
<!-- !split -->
298334
<h2 id="gates-the-whys-and-hows" class="anchor">Gates, the whys and hows </h2>
299335

300336
<p>In quantum computing it is common to rewrite various unitary
@@ -320,7 +356,7 @@ <h2 id="gates-the-whys-and-hows" class="anchor">Gates, the whys and hows </h2>
320356
<h2 id="structure-of-the-lecture" class="anchor">Structure of the lecture </h2>
321357

322358
<ol>
323-
<li> First we review some of the basic ways of representing the solution to the Schr\"odinger's equation, introducing the so-called intenraction, Heisenberg and Schr\"odinger prictures and unitary transformations.</li>
359+
<li> First we review some of the basic ways of representing the solution to the Schr\"odinger equation, introducing the so-called Interaction, Heisenberg and Schr\"odinger prictures and unitary transformations.</li>
324360
<li> Secondly, we present examples of physical processes and how they can be represented as unitary operations on a given state.</li>
325361
<li> These unitary transformations are then represented as gates. Setting gates together gives us a final circuit which can represent a specific physical system</li>
326362
</ol>
@@ -752,12 +788,96 @@ <h2 id="final-expression" class="anchor">Final expression </h2>
752788
<!-- !split -->
753789
<h2 id="part-2-specific-realizations-and-famous-gates" class="anchor">Part 2: Specific realizations and famous gates </h2>
754790

755-
<p>This part is not yet ready and will be part of the whiteboard notes.
756-
I will try to get it ready by the end of Tuesday, Feb 11
791+
<p>Nuclear magnetic resonance (NMR) quantum computing is one of the several
792+
proposed approaches for constructing a quantum computer. It uses the
793+
spin states of nuclei within molecules as qubits. The quantum states
794+
are probed through the nuclear magnetic resonances, allowing the
795+
system to be implemented as a variation of nuclear magnetic resonance
796+
spectroscopy. NMR differs from other implementations of quantum
797+
computers in that it uses an ensemble of systems, in this case
798+
molecules, rather than a single pure state.
799+
</p>
800+
801+
<p>You can read more about this at <a href="https://cba.mit.edu/docs/papers/98.06.sciqc.pdf" target="_self"><tt>https://cba.mit.edu/docs/papers/98.06.sciqc.pdf</tt></a></p>
802+
803+
<!-- !split -->
804+
<h2 id="spin-hamiltonian" class="anchor">Spin Hamiltonian </h2>
805+
806+
<p>In order to understand in terms of a given Hamiltonian how the
807+
different gates arise, we consider now the Hamiltonian of a nuclear
808+
spin in a magnetic field. Since the spin provides provides a magnetic
809+
dipole moment, a nucleus with a spin will interact with the magnetic
810+
field. The Haniltonian of a nucleus with spin interacting with a
811+
magnetic field \( \boldsymbol{B} \) is
757812
</p>
758813

814+
$$
815+
H = -\boldsymbol{\mu}\boldsymbol{B},
816+
$$
817+
818+
<p>with \( \boldsymbol{\mu}=\gamma\boldsymbol{S} \), \( \gamma \) being the so-called gyromagnetic ratio and \( \boldsymbol{S} \) the spin.</p>
819+
820+
<!-- !split -->
821+
<h2 id="field-along-the-z-axis" class="anchor">Field along the \( z \)-axis </h2>
822+
823+
<p>It is common to let the spin interact with a constant magnetic field
824+
along the \( z \)-axis. This gives an effecitve Hamiltonian
825+
</p>
826+
827+
$$
828+
H_z = -\frac{\hbar\omega_L}{2}\sigma_z,
829+
$$
830+
831+
<p>where \( \omega_L \) is the so-called Larmor precession frequency. This
832+
quantity includes also the constant magnetif field along the
833+
\( z \)-axis. For all practical purposes it suffices for us to have an
834+
expression of the Hamiltonian in terms of the Pauli-Z matrix.
835+
</p>
836+
837+
<!-- !split -->
838+
<h2 id="bringing-back-a-state-on-the-bloch-sphere" class="anchor">Bringing back a state on the Bloch sphere </h2>
839+
840+
<p>Suppose that our initial one qubit state (for example a spin-\( 1/2 \)
841+
nucleus for NMR studies) points along some arbitrary axis. As
842+
discussed during our second week, a point on the Bloch sphere can be
843+
represented as at time \( t=0 \)
844+
</p>
845+
$$
846+
\vert \psi(t=0) \rangle = \vert \psi(0) \rangle=\cos{(\frac{\theta}{2})}\vert 0\rangle +\exp{\imath\phi}\sin{(\frac{\theta}{2})}\vert 1\rangle.
847+
$$
848+
849+
850+
<!-- !split -->
851+
<h2 id="time-evolution" class="anchor">Time evolution </h2>
852+
853+
<p>Since the hamiltonian is time-independent, the state \( \vert \psi(0)
854+
\rangle \), our system will evolve according to unitary transformation
855+
</p>
856+
$$
857+
\vert \psi(t) \rangle = U(t)\vert \psi(0) \rangle=\exp{\imath\omega_L t\sigma_z/2}\vert \psi(0) \rangle.
858+
$$
859+
860+
<p>Inserting the Bloch sphere ansatz we have then</p>
861+
$$
862+
\vert \psi(t) \rangle=\exp{\imath\omega_L t\sigma_z/2}\cos{(\frac{\theta}{2})}\vert 0\rangle +\exp{\imath\omega_L t\sigma_z/2}\exp{\imath\phi}\sin{(\frac{\theta}{2})}\vert 1\rangle.
863+
$$
864+
865+
866+
<!-- !split -->
867+
<h2 id="final-expression" class="anchor">Final expression </h2>
868+
<p>In exercise 4 from the second week, we showed that, given \( \boldsymbol{A} \) an operator on a vector space satisfying \( \boldsymbol{A}^2=1 \) and \( \alpha \) any real constant, we had</p>
869+
$$
870+
\exp{\imath\alpha \boldsymbol{A}}=\sum_{n=0}^{\infty} \frac{(i\alpha)^n}{n!}\boldsymbol{A}^n=\boldsymbol{I}\cos{\alpha}+\imath\boldsymbol{A}\sin{\alpha}.
871+
$$
872+
873+
<p>Using this result, we obtain</p>
874+
$$
875+
\vert \psi(t) \rangle=\exp{\imath\omega_L t/2}\cos{(\frac{\theta}{2})}\vert 0\rangle +\exp{-\imath\omega_L t/2}\exp{\imath\phi}\sin{(\frac{\theta}{2})}\vert 1\rangle.
876+
$$
877+
878+
759879
<!-- !split -->
760-
<h2 id="part-3-fanous-quantum-gates-circuits-and-simple-algorithms-parts-from-last-week" class="anchor">Part 3: Fanous Quantum gates, circuits and simple algorithms (parts from last week) </h2>
880+
<h2 id="part-3-fanous-quantum-gates-circuits-and-simple-algorithms-repetition-from-last-week" class="anchor">Part 3: Fanous Quantum gates, circuits and simple algorithms (repetition from last week) </h2>
761881

762882
<p>Quantum gates are physical actions that are applied to the physical
763883
system representing the qubits. Mathematically, they are
@@ -2127,6 +2247,74 @@ <h2 id="code-example" class="anchor">Code example </h2>
21272247
the angles \( \theta \) and \( \phi \). This will lead us to the so-called Variational Quantum Eigensolver to be discussed next week.
21282248
</p>
21292249

2250+
<!-- !split -->
2251+
<h2 id="topics-next-week" class="anchor">Topics next week </h2>
2252+
<ol>
2253+
<li> We will extend the above one-qubit Hamiltonian to a two-qubit problem and analyze how we can set up its simulation</li>
2254+
<li> Before we introduce the Variational Quantum Eigensolver (VQE), we need to discuss entropy as a measure of entanglement</li>
2255+
<li> If we get time, we start our discussion of the VQE algorithm</li>
2256+
</ol>
2257+
<!-- !split -->
2258+
<h2 id="exercises-this-week-hamiltonians-and-project-1" class="anchor">Exercises this week: Hamiltonians and project 1 </h2>
2259+
2260+
<p>As an initial test, we consider a simple \( 2\times 2 \) real
2261+
Hamiltonian consisting of a diagonal part \( H_0 \) and off-diagonal part
2262+
\( H_I \), playing the roles of a non-interactive one-body and interactive
2263+
two-body part respectively. Defined through their matrix elements, we
2264+
express them in the Pauli basis \( \vert 0\rangle \) and \( \vert 1 \rangle \)
2265+
</p>
2266+
2267+
$$
2268+
\begin{align*}
2269+
\begin{split}
2270+
H &= H_0 + H_I \\
2271+
H_0 = \begin{bmatrix}
2272+
E_1 & 0 \\
2273+
0 & E_2
2274+
\end{bmatrix}&, \hspace{20px}
2275+
H_I = \lambda \begin{bmatrix}
2276+
V_{11} & V_{12} \\
2277+
V_{21} & V_{22}
2278+
\end{bmatrix}
2279+
\end{split}
2280+
\end{align*}
2281+
$$
2282+
2283+
<p>Where \( \lambda \in [0,1] \) is a coupling constant parameterizing the strength of the interaction. </p>
2284+
2285+
<!-- !split -->
2286+
<h2 id="rewriting-in-terms-of-pauli-matrices" class="anchor">Rewriting in terms of Pauli matrices </h2>
2287+
2288+
<p>Define</p>
2289+
$$
2290+
E_+ = \frac{E_1 + E_2}{2},\hspace{20px} E_- = \frac{E_1 - E_2}{2}
2291+
$$
2292+
2293+
<p>show that by combining the identity and \( Z \) Pauli matrix, this can be expressed as</p>
2294+
2295+
$$
2296+
H_0 = E_+ I + E_- Z
2297+
$$
2298+
2299+
2300+
<!-- !split -->
2301+
<h2 id="the-interaction-part" class="anchor">The interaction part </h2>
2302+
2303+
<p>For \( H_1 \) we use the same trick to fill the diagonal, defining \( V_+ = (V_{11} + V_{22})/2, V_- = (V_{11} - V_{22})/2 \). From the hermiticity requirements of \( H \), we note that \( V_{12} = V_{21} \equiv V_o \). Use this to simplify the problem to a simple \( X \) term. </p>
2304+
2305+
$$
2306+
H_I = V_+ I + V_- Z + V_o X
2307+
$$
2308+
2309+
2310+
<!-- !split -->
2311+
<h2 id="measurement-basis" class="anchor">Measurement basis </h2>
2312+
2313+
<p>For the above system show that the Pauli \( X \) matrix can be rewritten in terms of the Hadamard matrices and the Pauli \( Z \) matrix, that is</p>
2314+
$$
2315+
X=HZH.
2316+
$$
2317+
21302318
<!-- ------------------- end of main content --------------- -->
21312319
</div> <!-- end container -->
21322320
<!-- include javascript, jQuery *first* -->

0 commit comments

Comments
 (0)