Skip to content

Commit aaead69

Browse files
committed
update
1 parent b703deb commit aaead69

File tree

7 files changed

+55
-2062
lines changed

7 files changed

+55
-2062
lines changed

doc/pub/week13/html/week13-bs.html

Lines changed: 11 additions & 310 deletions
Original file line numberDiff line numberDiff line change
@@ -36,51 +36,13 @@
3636

3737
<!-- tocinfo
3838
{'highest level': 2,
39-
'sections': [('Plans for the week of April 15-19',
39+
'sections': [('Plans for the week of April 21-25',
4040
2,
4141
None,
42-
'plans-for-the-week-of-april-15-19'),
43-
('QFT', 2, None, 'qft'),
44-
('In terms of arbitrary states',
45-
2,
46-
None,
47-
'in-terms-of-arbitrary-states'),
48-
('Unitarity', 2, None, 'unitarity'),
49-
('Binary representation', 2, None, 'binary-representation'),
50-
('Rewriting the QFT', 2, None, 'rewriting-the-qft'),
51-
('Short hand notation', 2, None, 'short-hand-notation'),
52-
('Four qubit system', 2, None, 'four-qubit-system'),
53-
('QFT acts as follows', 2, None, 'qft-acts-as-follows'),
54-
('Quantum circuits', 2, None, 'quantum-circuits'),
55-
('Rotation gates', 2, None, 'rotation-gates'),
56-
('Using the Hadamard gate', 2, None, 'using-the-hadamard-gate'),
57-
('Algorithm', 2, None, 'algorithm'),
58-
('Binary fraction', 2, None, 'binary-fraction'),
59-
('Controlled rotation gate', 2, None, 'controlled-rotation-gate'),
60-
('Applying to all qubits', 2, None, 'applying-to-all-qubits'),
61-
('Plans for the week of April 22-26',
62-
2,
63-
None,
64-
'plans-for-the-week-of-april-22-26')]}
42+
'plans-for-the-week-of-april-21-25')]}
6543
end of tocinfo -->
6644

6745
<body>
68-
69-
70-
71-
<script type="text/x-mathjax-config">
72-
MathJax.Hub.Config({
73-
TeX: {
74-
equationNumbers: { autoNumber: "AMS" },
75-
extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
76-
}
77-
});
78-
</script>
79-
<script type="text/javascript" async
80-
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
81-
</script>
82-
83-
8446
<!-- Bootstrap navigation bar -->
8547
<div class="navbar navbar-default navbar-fixed-top">
8648
<div class="navbar-header">
@@ -96,23 +58,7 @@
9658
<li class="dropdown">
9759
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Contents <b class="caret"></b></a>
9860
<ul class="dropdown-menu">
99-
<!-- navigation toc: --> <li><a href="#plans-for-the-week-of-april-15-19" style="font-size: 80%;">Plans for the week of April 15-19</a></li>
100-
<!-- navigation toc: --> <li><a href="#qft" style="font-size: 80%;">QFT</a></li>
101-
<!-- navigation toc: --> <li><a href="#in-terms-of-arbitrary-states" style="font-size: 80%;">In terms of arbitrary states</a></li>
102-
<!-- navigation toc: --> <li><a href="#unitarity" style="font-size: 80%;">Unitarity</a></li>
103-
<!-- navigation toc: --> <li><a href="#binary-representation" style="font-size: 80%;">Binary representation</a></li>
104-
<!-- navigation toc: --> <li><a href="#rewriting-the-qft" style="font-size: 80%;">Rewriting the QFT</a></li>
105-
<!-- navigation toc: --> <li><a href="#short-hand-notation" style="font-size: 80%;">Short hand notation</a></li>
106-
<!-- navigation toc: --> <li><a href="#four-qubit-system" style="font-size: 80%;">Four qubit system</a></li>
107-
<!-- navigation toc: --> <li><a href="#qft-acts-as-follows" style="font-size: 80%;">QFT acts as follows</a></li>
108-
<!-- navigation toc: --> <li><a href="#quantum-circuits" style="font-size: 80%;">Quantum circuits</a></li>
109-
<!-- navigation toc: --> <li><a href="#rotation-gates" style="font-size: 80%;">Rotation gates</a></li>
110-
<!-- navigation toc: --> <li><a href="#using-the-hadamard-gate" style="font-size: 80%;">Using the Hadamard gate</a></li>
111-
<!-- navigation toc: --> <li><a href="#algorithm" style="font-size: 80%;">Algorithm</a></li>
112-
<!-- navigation toc: --> <li><a href="#binary-fraction" style="font-size: 80%;">Binary fraction</a></li>
113-
<!-- navigation toc: --> <li><a href="#controlled-rotation-gate" style="font-size: 80%;">Controlled rotation gate</a></li>
114-
<!-- navigation toc: --> <li><a href="#applying-to-all-qubits" style="font-size: 80%;">Applying to all qubits</a></li>
115-
<!-- navigation toc: --> <li><a href="#plans-for-the-week-of-april-22-26" style="font-size: 80%;">Plans for the week of April 22-26</a></li>
61+
<!-- navigation toc: --> <li><a href="#plans-for-the-week-of-april-21-25" style="font-size: 80%;">Plans for the week of April 21-25</a></li>
11662

11763
</ul>
11864
</li>
@@ -130,281 +76,36 @@ <h1>Quantum Computing, Quantum Machine Learning and Quantum Information Theories
13076

13177
<!-- author(s): Morten Hjorth-Jensen -->
13278
<center>
133-
<b>Morten Hjorth-Jensen</b> [1, 2]
79+
<b>Morten Hjorth-Jensen</b>
13480
</center>
135-
<!-- institution(s) -->
81+
<!-- institution -->
13682
<center>
137-
[1] <b>Department of Physics, University of Oslo</b>
138-
</center>
139-
<center>
140-
[2] <b>Department of Physics and Astronomy and Facility for Rare Isotope Beams, Michigan State University</b>
83+
<b>Department of Physics, University of Oslo, Norway</b>
14184
</center>
14285
<br>
14386
<center>
144-
<h4>April 17</h4>
87+
<h4>April 23</h4>
14588
</center> <!-- date -->
14689
<br>
14790

14891
<!-- potential-jumbotron-button -->
14992
</div> <!-- end jumbotron -->
15093

15194
<!-- !split -->
152-
<h2 id="plans-for-the-week-of-april-15-19" class="anchor">Plans for the week of April 15-19 </h2>
95+
<h2 id="plans-for-the-week-of-april-21-25" class="anchor">Plans for the week of April 21-25 </h2>
15396

15497
<div class="panel panel-default">
15598
<div class="panel-body">
15699
<!-- subsequent paragraphs come in larger fonts, so start with a paragraph -->
157100
<ol>
158-
<li> Quantum Fourier transforms (QFT), reminder from last week</li>
159-
<li> Implementing QFTs</li>
160-
<li> Quantum phase estimation (QPE) and computation of eigenvalues</li>
161-
<li> Reading recommendations: Hundt's text <b>Quantum Computing for Programmers</b>, sections 6.1-6.4</li>
162-
<li> <a href="https://youtu.be/gNKJ_sBrPuE" target="_self">Video of lecture at</a></li>
163-
<li> <a href="https://github.com/CompPhysics/QuantumComputingMachineLearning/blob/gh-pages/doc/HandWrittenNotes/2024/NotesApril17.pdf" target="_self">Whiteboard notes</a></li>
164-
<li> Discussion of project 2</li>
101+
<li> TBA</li>
102+
<li> <a href="https://youtu.be/" target="_self">Video of lecture TBA</a>
103+
<!-- o <a href="https://github.com/CompPhysics/QuantumComputingMachineLearning/blob/gh-pages/doc/HandWrittenNotes/2024/NotesApril17.pdf" target="_self">Whiteboard notes</a> --></li>
165104
</ol>
166105
</div>
167106
</div>
168107

169108

170-
<!-- !split -->
171-
<h2 id="qft" class="anchor">QFT </h2>
172-
173-
<p>The Quantum Fourier Transform (QFT) has mathematically the same equation as starting point
174-
but the notation is generally different. We generally compute the
175-
quantum Fourier transform on a set of orthonormal basis state vectors
176-
\(|0\rangle, |1\rangle, ..., |N-1\rangle\). The linear operator defining
177-
the transform is given by the action on basis states
178-
</p>
179-
180-
$$
181-
|j\rangle \mapsto \frac{1}{\sqrt{N}} \sum_{k=0}^{N-1} e^{2\pi ijk/N}|k\rangle.
182-
$$
183-
184-
185-
<!-- !split -->
186-
<h2 id="in-terms-of-arbitrary-states" class="anchor">In terms of arbitrary states </h2>
187-
188-
<p>This can be written on arbitrary states,</p>
189-
$$
190-
\sum_{j=0}^{N-1}x_j|j\rangle \mapsto \sum_{k=0}^{N-1} y_k|k\rangle
191-
$$
192-
193-
<p>where each amplitude \(y_k\) is the discrete Fourier transform of
194-
\(x_j\).
195-
</p>
196-
197-
<!-- !split -->
198-
<h2 id="unitarity" class="anchor">Unitarity </h2>
199-
200-
<p>The quantum Fourier transform is unitary. Taking \(N = 2^n\),
201-
for \(n\) qubits gives us the orthonormal (computational) basis
202-
</p>
203-
$$
204-
|0\rangle, |1\rangle, ..., |2^{n}-1\rangle.
205-
$$
206-
207-
208-
<!-- !split -->
209-
<h2 id="binary-representation" class="anchor">Binary representation </h2>
210-
211-
<p>Each of the computational basis states can be represented in binary</p>
212-
$$
213-
j = j_1j_2 \cdots j_n
214-
$$
215-
216-
<p>where each \(j_k\) is either \(0\) or \(1\), and the corresponding
217-
binary vector is \(|j_1j_2 \cdots j_n\rangle\).
218-
</p>
219-
220-
<!-- !split -->
221-
<h2 id="rewriting-the-qft" class="anchor">Rewriting the QFT </h2>
222-
223-
<p>The quantum Fourier
224-
transform on one of these \(n\)-qubit vectors can be written as,
225-
</p>
226-
227-
$$
228-
\begin{align*}
229-
|j_1j_2 \cdots j_n \rangle = \frac{\left(|0\rangle +e^{2\pi i0.j_n}|1\rangle\right) \otimes \left(|0\rangle +e^{2\pi i0.j_{n-1}j_n}|1\rangle\right) \otimes \cdots \otimes \left(|0\rangle +e^{2\pi i0.j_1j_2 \cdots j_n}|1\rangle\right)}{2^{n/2}}
230-
\end{align*}
231-
$$
232-
233-
234-
<!-- !split -->
235-
<h2 id="short-hand-notation" class="anchor">Short hand notation </h2>
236-
237-
<p>In the above, we use the notation</p>
238-
239-
$$
240-
0.j_lj_{l+1} \cdots j_n = \frac{j+l}{2} + \frac{j_{l+1}}{2^2} + \cdots + \frac{j_n}{2^{m-l+1}}
241-
$$
242-
243-
244-
<!-- !split -->
245-
<h2 id="four-qubit-system" class="anchor">Four qubit system </h2>
246-
<p>The basis states are</p>
247-
$$
248-
|j_1j_2j_3j_4 \rangle
249-
$$
250-
251-
<p>where \(j_k\) is either \(0\) or \(1\). We have</p>
252-
253-
$$
254-
\begin{align*}
255-
0.j_3 &= \frac{j_3}{2} \\
256-
0.j_2j_3 &= \frac{j_2}{2} + \frac{j_3}{4} \\
257-
0.j_1j_2j_3 &= \frac{j_1}{2} + \frac{j_2}{4} + \frac{j_3}{8} \\
258-
0.j_0j_1j_2j_3 &= \frac{j_0}{2} + \frac{j_1}{4} + \frac{j_2}{8} + \frac{j_3}{16} \\
259-
\end{align*}
260-
$$
261-
262-
263-
<!-- !split -->
264-
<h2 id="qft-acts-as-follows" class="anchor">QFT acts as follows </h2>
265-
266-
<p>The quantum Fourier transform acts as follows:</p>
267-
268-
$$
269-
\begin{align*}
270-
|j_1j_2j_3j_4 \rangle \mapsto \frac{1}{\sqrt{2^{4/2}}}
271-
\left(|0\rangle + e^{2 \pi i 0.j4}|1\rangle \right) \otimes
272-
\left(|0\rangle + e^{2 \pi i 0.j_3j4}|1\rangle \right) \otimes
273-
\left(|0\rangle + e^{2 \pi i 0.j_2j_3j4}|1\rangle \right) \otimes
274-
\left(|0\rangle + e^{2 \pi i 0.j_1j_2j_3j4}|1\rangle \right)
275-
\end{align*}
276-
$$
277-
278-
279-
<!-- !split -->
280-
<h2 id="quantum-circuits" class="anchor">Quantum circuits </h2>
281-
282-
<p>To compose a quantum circuit that calculates the quantum Fourier
283-
transform we use the operators
284-
</p>
285-
286-
$$
287-
\begin{align*}
288-
R_k =
289-
\begin{bmatrix}
290-
1 & 0 \\
291-
0 & e^{2\pi i/2^k}
292-
\end{bmatrix}.
293-
\end{align*}
294-
$$
295-
296-
297-
<!-- !split -->
298-
<h2 id="rotation-gates" class="anchor">Rotation gates </h2>
299-
300-
<p>In this example, the \(R_k\) gates are:</p>
301-
$$
302-
\begin{align*}
303-
R_1 = \begin{bmatrix}
304-
1 & 0 \\
305-
0 & e^{2 \pi i /2^0}
306-
\end{bmatrix} =
307-
\begin{bmatrix}
308-
1 & 0 \\
309-
0 & 1
310-
\end{bmatrix}, \quad
311-
R_2 = \begin{bmatrix}
312-
1 & 0 \\
313-
0 & e^{2 \pi i /2^2}
314-
\end{bmatrix}, \quad
315-
R_3 = \begin{bmatrix}
316-
1 & 0 \\
317-
0 & e^{2 \pi i /2^3}
318-
\end{bmatrix}, \quad
319-
R_4 = \begin{bmatrix}
320-
1 & 0 \\
321-
0 & e^{2 \pi i /2^4}
322-
\end{bmatrix}.
323-
\end{align*}
324-
$$
325-
326-
327-
<!-- !split -->
328-
<h2 id="using-the-hadamard-gate" class="anchor">Using the Hadamard gate </h2>
329-
<p>The Hadamard
330-
gate on a single qubit creates an equal superposition of its basis
331-
states, assuming it is not already in a superposition, such that
332-
</p>
333-
334-
$$
335-
H\vert 0 \rangle = \frac{1}{\sqrt{2}} \left(\vert 0 \rangle + \vert 1\rangle\right), \quad H\vert 1\rangle = \frac{1}{\sqrt{2}} \left(\vert 0 \rangle - \vert 1\rangle\right)
336-
$$
337-
338-
<p>The \( R_k \)&#160;gate simply adds a phase if the qubit it acts on is in the state \( \vert 1\rangle \)</p>
339-
$$
340-
R_k\vert 0 \rangle = \vert 0 \rangle, \quad R_k\vert 1\rangle = e^{2\pi i/2^{k}}\vert 1\rangle
341-
$$
342-
343-
<p>Since all this gates are unitary, the quantum Fourier transfrom is also unitary.</p>
344-
345-
<!-- !split -->
346-
<h2 id="algorithm" class="anchor">Algorithm </h2>
347-
348-
<p>Assume we have a quantum register of \( n \) qubits in the state \( \vert j_1 j_2 \dots j_n\rangle \).
349-
Applying the Hadamard gate to the first qubit
350-
produces the state
351-
</p>
352-
353-
$$
354-
H\vert j_1 j_2 \dots j_n\rangle = \frac{\left(\vert 0 \rangle + e^{2\pi i 0.j_1}\vert 1\rangle\right)}{2^{1/2}} \vert j_2 \dots j_n\rangle.
355-
$$
356-
357-
358-
<!-- !split -->
359-
<h2 id="binary-fraction" class="anchor">Binary fraction </h2>
360-
361-
<p>Here we have made use of the binary fraction to represent the action of the Hadamard gate </p>
362-
$$
363-
\exp{2\pi i 0.j_1} = -1,
364-
$$
365-
366-
<p>if \( j_1 = 1 \) and \( +1 \) if \( j_1 = 0 \).</p>
367-
368-
<!-- !split -->
369-
<h2 id="controlled-rotation-gate" class="anchor">Controlled rotation gate </h2>
370-
371-
<p>Furthermore we can apply the controlled-\( R_k \)&#160;gate, with all the other qubits \( j_k \) for \( k>1 \) as control qubits to produce the state</p>
372-
373-
$$
374-
\frac{\left(\vert 0 \rangle + e^{2\pi i 0.j_1j_2\dots j_n}\vert 1\rangle\right)}{2^{1/2}} \vert j_2 \dots j_n\rangle
375-
$$
376-
377-
<p>Next we do the same procedure on qubit \( 2 \)&#160;producing the state</p>
378-
379-
$$
380-
\frac{\left(\vert 0 \rangle + e^{2\pi i 0.j_1j_2\dots j_n}\vert 1\rangle\right)\left(\vert 0 \rangle + e^{2\pi i 0.j_2\dots j_n}\vert 1\rangle\right)}{2^{2/2}} \vert j_2 \dots j_n\rangle
381-
$$
382-
383-
384-
<!-- !split -->
385-
<h2 id="applying-to-all-qubits" class="anchor">Applying to all qubits </h2>
386-
387-
<p>Doing this for all \( n \) qubits yields state</p>
388-
389-
$$
390-
\frac{\left(\vert 0 \rangle + e^{2\pi i 0.j_1j_2\dots j_n}\vert 1\rangle\right)\left(\vert 0 \rangle + e^{2\pi i 0.j_2\dots j_n}\vert 1\rangle\right)\dots \left(\vert 0 \rangle + e^{2\pi i 0.j_n}\vert 1\rangle\right)}{2^{n/2}} \vert j_2 \dots j_n\rangle
391-
$$
392-
393-
<p>At the end we use swap gates to reverse the order of the qubits</p>
394-
395-
$$
396-
\frac{\left(\vert 0 \rangle + e^{2\pi i 0.j_n}\vert 1\rangle\right)\left(\vert 0 \rangle + e^{2\pi i 0.j_{n-1}j_n}\vert 1\rangle\right)\dots\left(\vert 0 \rangle + e^{2\pi i 0.j_1j_2\dots j_n}\vert 1\rangle\right) }{2^{n/2}} \vert j_2 \dots j_n\rangle
397-
$$
398-
399-
<p>This is just the product representation from earlier, obviously our desired output.</p>
400-
401-
<!-- !split -->
402-
<h2 id="plans-for-the-week-of-april-22-26" class="anchor">Plans for the week of April 22-26 </h2>
403-
404-
<ol>
405-
<li> Summary of algorithms and discussion of project 2</li>
406-
<li> Discussion of physical realizations of quantum computers</li>
407-
</ol>
408109
<!-- ------------------- end of main content --------------- -->
409110
</div> <!-- end container -->
410111
<!-- include javascript, jQuery *first* -->

0 commit comments

Comments
 (0)