Skip to content

Commit 0ed5dd6

Browse files
committed
update week 2
1 parent a28f7a7 commit 0ed5dd6

File tree

10 files changed

+606
-773
lines changed

10 files changed

+606
-773
lines changed

doc/pub/week2/html/week2-bs.html

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,11 @@
5959
('Further manipulations', 2, None, 'further-manipulations'),
6060
('Spectral decomposition', 2, None, 'spectral-decomposition'),
6161
('Explicit results', 2, None, 'explicit-results'),
62-
('The spectral decomposition',
62+
('The spectral decomposition, from last week',
6363
2,
6464
None,
65-
'the-spectral-decomposition'),
65+
'the-spectral-decomposition-from-last-week'),
66+
('Meet the Bloch sphere', 2, None, 'meet-the-bloch-sphere'),
6667
('Measurements', 2, None, 'measurements'),
6768
('Qubit example', 2, None, 'qubit-example'),
6869
('Total probability', 2, None, 'total-probability'),
@@ -181,7 +182,8 @@
181182
<!-- navigation toc: --> <li><a href="#further-manipulations" style="font-size: 80%;">Further manipulations</a></li>
182183
<!-- navigation toc: --> <li><a href="#spectral-decomposition" style="font-size: 80%;">Spectral decomposition</a></li>
183184
<!-- navigation toc: --> <li><a href="#explicit-results" style="font-size: 80%;">Explicit results</a></li>
184-
<!-- navigation toc: --> <li><a href="#the-spectral-decomposition" style="font-size: 80%;">The spectral decomposition</a></li>
185+
<!-- navigation toc: --> <li><a href="#the-spectral-decomposition-from-last-week" style="font-size: 80%;">The spectral decomposition, from last week</a></li>
186+
<!-- navigation toc: --> <li><a href="#meet-the-bloch-sphere" style="font-size: 80%;">Meet the Bloch sphere</a></li>
185187
<!-- navigation toc: --> <li><a href="#measurements" style="font-size: 80%;">Measurements</a></li>
186188
<!-- navigation toc: --> <li><a href="#qubit-example" style="font-size: 80%;">Qubit example</a></li>
187189
<!-- navigation toc: --> <li><a href="#total-probability" style="font-size: 80%;">Total probability</a></li>
@@ -260,7 +262,6 @@ <h2 id="summary-from-last-week-and-plans-for-this-week" class="anchor">Summary f
260262
</div>
261263
</div>
262264

263-
<p>Most of the material can be found in Scherer, Mathematics of Quantum Computations, chapter 2, available electronically via UiO's subscription.</p>
264265

265266
<!-- !split -->
266267
<h2 id="this-week-s-plans" class="anchor">This week's plans </h2>
@@ -272,7 +273,7 @@ <h2 id="this-week-s-plans" class="anchor">This week's plans </h2>
272273
<li> tensor products of Hilbert Spaces and definition of Computational basis, partly repetition from last week</li>
273274
<li> Reminder on spectral Decomposition from last week</li>
274275
<li> Bloch sphere and representation of qubits</li>
275-
<li> Spectral Decomposition, Measurements and Density matrices</li>
276+
<li> Spectral Decomposition (again), Measurements and Density matrices</li>
276277
<li> Wavefunction collapse as a result of measurement</li>
277278
<li> Simple Hamiltonians and other operators</li>
278279
<li> <a href="https://youtu.be/" target="_self">Video of lecture to be added</a>
@@ -504,7 +505,7 @@ <h2 id="explicit-results" class="anchor">Explicit results </h2>
504505

505506

506507
<!-- !split -->
507-
<h2 id="the-spectral-decomposition" class="anchor">The spectral decomposition </h2>
508+
<h2 id="the-spectral-decomposition-from-last-week" class="anchor">The spectral decomposition, from last week </h2>
508509
<p>The results from the previous slide gives us
509510
the following spectral decomposition of \( \boldsymbol{A} \)
510511
</p>
@@ -520,6 +521,39 @@ <h2 id="the-spectral-decomposition" class="anchor">The spectral decomposition </
520521
$$
521522

522523

524+
<!-- !split -->
525+
<h2 id="meet-the-bloch-sphere" class="anchor">Meet the Bloch sphere </h2>
526+
527+
<!-- code=python (!bc pycod) typeset with pygments style "default" -->
528+
<div class="cell border-box-sizing code_cell rendered">
529+
<div class="input">
530+
<div class="inner_cell">
531+
<div class="input_area">
532+
<div class="highlight" style="background: #f8f8f8">
533+
<pre style="line-height: 125%;"><span style="color: #008000; font-weight: bold">import</span> <span style="color: #0000FF; font-weight: bold">numpy</span> <span style="color: #008000; font-weight: bold">as</span> <span style="color: #0000FF; font-weight: bold">np</span>
534+
<span style="color: #008000; font-weight: bold">from</span> <span style="color: #0000FF; font-weight: bold">qiskit.visualization</span> <span style="color: #008000; font-weight: bold">import</span> plot_bloch_vector
535+
536+
plot_bloch_vector([<span style="color: #666666">0</span>,<span style="color: #666666">1</span>,<span style="color: #666666">0</span>], title<span style="color: #666666">=</span><span style="color: #BA2121">&quot;New Bloch Sphere&quot;</span>)
537+
538+
<span style="color: #408080; font-style: italic"># You can use spherical coordinates instead of cartesian. </span>
539+
540+
plot_bloch_vector([<span style="color: #666666">1</span>, np<span style="color: #666666">.</span>pi<span style="color: #666666">/2</span>, np<span style="color: #666666">.</span>pi<span style="color: #666666">/3</span>], coord_type<span style="color: #666666">=</span><span style="color: #BA2121">&#39;spherical&#39;</span>)
541+
</pre>
542+
</div>
543+
</div>
544+
</div>
545+
</div>
546+
<div class="output_wrapper">
547+
<div class="output">
548+
<div class="output_area">
549+
<div class="output_subarea output_stream output_stdout output_text">
550+
</div>
551+
</div>
552+
</div>
553+
</div>
554+
</div>
555+
556+
523557
<!-- !split -->
524558
<h2 id="measurements" class="anchor">Measurements </h2>
525559

doc/pub/week2/html/week2-reveal.html

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,6 @@ <h2 id="summary-from-last-week-and-plans-for-this-week">Summary from last week a
205205
<p><li> introduced the spectral decomposition of operators</li>
206206
</ol>
207207
</div>
208-
209-
<p>Most of the material can be found in Scherer, Mathematics of Quantum Computations, chapter 2, available electronically via UiO's subscription.</p>
210208
</section>
211209

212210
<section>
@@ -219,7 +217,7 @@ <h2 id="this-week-s-plans">This week's plans </h2>
219217
<p><li> tensor products of Hilbert Spaces and definition of Computational basis, partly repetition from last week</li>
220218
<p><li> Reminder on spectral Decomposition from last week</li>
221219
<p><li> Bloch sphere and representation of qubits</li>
222-
<p><li> Spectral Decomposition, Measurements and Density matrices</li>
220+
<p><li> Spectral Decomposition (again), Measurements and Density matrices</li>
223221
<p><li> Wavefunction collapse as a result of measurement</li>
224222
<p><li> Simple Hamiltonians and other operators</li>
225223
<p><li> <a href="https://youtu.be/" target="_blank">Video of lecture to be added</a>
@@ -495,7 +493,7 @@ <h2 id="explicit-results">Explicit results </h2>
495493
</section>
496494

497495
<section>
498-
<h2 id="the-spectral-decomposition">The spectral decomposition </h2>
496+
<h2 id="the-spectral-decomposition-from-last-week">The spectral decomposition, from last week </h2>
499497
<p>The results from the previous slide gives us
500498
the following spectral decomposition of \( \boldsymbol{A} \)
501499
</p>
@@ -515,6 +513,39 @@ <h2 id="the-spectral-decomposition">The spectral decomposition </h2>
515513
<p>&nbsp;<br>
516514
</section>
517515

516+
<section>
517+
<h2 id="meet-the-bloch-sphere">Meet the Bloch sphere </h2>
518+
519+
<!-- code=python (!bc pycod) typeset with pygments style "perldoc" -->
520+
<div class="cell border-box-sizing code_cell rendered">
521+
<div class="input">
522+
<div class="inner_cell">
523+
<div class="input_area">
524+
<div class="highlight" style="background: #eeeedd">
525+
<pre style="font-size: 80%; line-height: 125%;"><span style="color: #8B008B; font-weight: bold">import</span> <span style="color: #008b45; text-decoration: underline">numpy</span> <span style="color: #8B008B; font-weight: bold">as</span> <span style="color: #008b45; text-decoration: underline">np</span>
526+
<span style="color: #8B008B; font-weight: bold">from</span> <span style="color: #008b45; text-decoration: underline">qiskit.visualization</span> <span style="color: #8B008B; font-weight: bold">import</span> plot_bloch_vector
527+
528+
plot_bloch_vector([<span style="color: #B452CD">0</span>,<span style="color: #B452CD">1</span>,<span style="color: #B452CD">0</span>], title=<span style="color: #CD5555">&quot;New Bloch Sphere&quot;</span>)
529+
530+
<span style="color: #228B22"># You can use spherical coordinates instead of cartesian. </span>
531+
532+
plot_bloch_vector([<span style="color: #B452CD">1</span>, np.pi/<span style="color: #B452CD">2</span>, np.pi/<span style="color: #B452CD">3</span>], coord_type=<span style="color: #CD5555">&#39;spherical&#39;</span>)
533+
</pre>
534+
</div>
535+
</div>
536+
</div>
537+
</div>
538+
<div class="output_wrapper">
539+
<div class="output">
540+
<div class="output_area">
541+
<div class="output_subarea output_stream output_stdout output_text">
542+
</div>
543+
</div>
544+
</div>
545+
</div>
546+
</div>
547+
</section>
548+
518549
<section>
519550
<h2 id="measurements">Measurements </h2>
520551

doc/pub/week2/html/week2-solarized.html

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,11 @@
8686
('Further manipulations', 2, None, 'further-manipulations'),
8787
('Spectral decomposition', 2, None, 'spectral-decomposition'),
8888
('Explicit results', 2, None, 'explicit-results'),
89-
('The spectral decomposition',
89+
('The spectral decomposition, from last week',
9090
2,
9191
None,
92-
'the-spectral-decomposition'),
92+
'the-spectral-decomposition-from-last-week'),
93+
('Meet the Bloch sphere', 2, None, 'meet-the-bloch-sphere'),
9394
('Measurements', 2, None, 'measurements'),
9495
('Qubit example', 2, None, 'qubit-example'),
9596
('Total probability', 2, None, 'total-probability'),
@@ -213,7 +214,6 @@ <h2 id="summary-from-last-week-and-plans-for-this-week">Summary from last week a
213214
</ol>
214215
</div>
215216

216-
<p>Most of the material can be found in Scherer, Mathematics of Quantum Computations, chapter 2, available electronically via UiO's subscription.</p>
217217

218218
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
219219
<h2 id="this-week-s-plans">This week's plans </h2>
@@ -225,7 +225,7 @@ <h2 id="this-week-s-plans">This week's plans </h2>
225225
<li> tensor products of Hilbert Spaces and definition of Computational basis, partly repetition from last week</li>
226226
<li> Reminder on spectral Decomposition from last week</li>
227227
<li> Bloch sphere and representation of qubits</li>
228-
<li> Spectral Decomposition, Measurements and Density matrices</li>
228+
<li> Spectral Decomposition (again), Measurements and Density matrices</li>
229229
<li> Wavefunction collapse as a result of measurement</li>
230230
<li> Simple Hamiltonians and other operators</li>
231231
<li> <a href="https://youtu.be/" target="_blank">Video of lecture to be added</a>
@@ -456,7 +456,7 @@ <h2 id="explicit-results">Explicit results </h2>
456456

457457

458458
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
459-
<h2 id="the-spectral-decomposition">The spectral decomposition </h2>
459+
<h2 id="the-spectral-decomposition-from-last-week">The spectral decomposition, from last week </h2>
460460
<p>The results from the previous slide gives us
461461
the following spectral decomposition of \( \boldsymbol{A} \)
462462
</p>
@@ -472,6 +472,39 @@ <h2 id="the-spectral-decomposition">The spectral decomposition </h2>
472472
$$
473473

474474

475+
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
476+
<h2 id="meet-the-bloch-sphere">Meet the Bloch sphere </h2>
477+
478+
<!-- code=python (!bc pycod) typeset with pygments style "perldoc" -->
479+
<div class="cell border-box-sizing code_cell rendered">
480+
<div class="input">
481+
<div class="inner_cell">
482+
<div class="input_area">
483+
<div class="highlight" style="background: #eeeedd">
484+
<pre style="line-height: 125%;"><span style="color: #8B008B; font-weight: bold">import</span> <span style="color: #008b45; text-decoration: underline">numpy</span> <span style="color: #8B008B; font-weight: bold">as</span> <span style="color: #008b45; text-decoration: underline">np</span>
485+
<span style="color: #8B008B; font-weight: bold">from</span> <span style="color: #008b45; text-decoration: underline">qiskit.visualization</span> <span style="color: #8B008B; font-weight: bold">import</span> plot_bloch_vector
486+
487+
plot_bloch_vector([<span style="color: #B452CD">0</span>,<span style="color: #B452CD">1</span>,<span style="color: #B452CD">0</span>], title=<span style="color: #CD5555">&quot;New Bloch Sphere&quot;</span>)
488+
489+
<span style="color: #228B22"># You can use spherical coordinates instead of cartesian. </span>
490+
491+
plot_bloch_vector([<span style="color: #B452CD">1</span>, np.pi/<span style="color: #B452CD">2</span>, np.pi/<span style="color: #B452CD">3</span>], coord_type=<span style="color: #CD5555">&#39;spherical&#39;</span>)
492+
</pre>
493+
</div>
494+
</div>
495+
</div>
496+
</div>
497+
<div class="output_wrapper">
498+
<div class="output">
499+
<div class="output_area">
500+
<div class="output_subarea output_stream output_stdout output_text">
501+
</div>
502+
</div>
503+
</div>
504+
</div>
505+
</div>
506+
507+
475508
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
476509
<h2 id="measurements">Measurements </h2>
477510

doc/pub/week2/html/week2.html

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,11 @@
163163
('Further manipulations', 2, None, 'further-manipulations'),
164164
('Spectral decomposition', 2, None, 'spectral-decomposition'),
165165
('Explicit results', 2, None, 'explicit-results'),
166-
('The spectral decomposition',
166+
('The spectral decomposition, from last week',
167167
2,
168168
None,
169-
'the-spectral-decomposition'),
169+
'the-spectral-decomposition-from-last-week'),
170+
('Meet the Bloch sphere', 2, None, 'meet-the-bloch-sphere'),
170171
('Measurements', 2, None, 'measurements'),
171172
('Qubit example', 2, None, 'qubit-example'),
172173
('Total probability', 2, None, 'total-probability'),
@@ -290,7 +291,6 @@ <h2 id="summary-from-last-week-and-plans-for-this-week">Summary from last week a
290291
</ol>
291292
</div>
292293

293-
<p>Most of the material can be found in Scherer, Mathematics of Quantum Computations, chapter 2, available electronically via UiO's subscription.</p>
294294

295295
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
296296
<h2 id="this-week-s-plans">This week's plans </h2>
@@ -302,7 +302,7 @@ <h2 id="this-week-s-plans">This week's plans </h2>
302302
<li> tensor products of Hilbert Spaces and definition of Computational basis, partly repetition from last week</li>
303303
<li> Reminder on spectral Decomposition from last week</li>
304304
<li> Bloch sphere and representation of qubits</li>
305-
<li> Spectral Decomposition, Measurements and Density matrices</li>
305+
<li> Spectral Decomposition (again), Measurements and Density matrices</li>
306306
<li> Wavefunction collapse as a result of measurement</li>
307307
<li> Simple Hamiltonians and other operators</li>
308308
<li> <a href="https://youtu.be/" target="_blank">Video of lecture to be added</a>
@@ -533,7 +533,7 @@ <h2 id="explicit-results">Explicit results </h2>
533533

534534

535535
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
536-
<h2 id="the-spectral-decomposition">The spectral decomposition </h2>
536+
<h2 id="the-spectral-decomposition-from-last-week">The spectral decomposition, from last week </h2>
537537
<p>The results from the previous slide gives us
538538
the following spectral decomposition of \( \boldsymbol{A} \)
539539
</p>
@@ -549,6 +549,39 @@ <h2 id="the-spectral-decomposition">The spectral decomposition </h2>
549549
$$
550550

551551

552+
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
553+
<h2 id="meet-the-bloch-sphere">Meet the Bloch sphere </h2>
554+
555+
<!-- code=python (!bc pycod) typeset with pygments style "default" -->
556+
<div class="cell border-box-sizing code_cell rendered">
557+
<div class="input">
558+
<div class="inner_cell">
559+
<div class="input_area">
560+
<div class="highlight" style="background: #f8f8f8">
561+
<pre style="line-height: 125%;"><span style="color: #008000; font-weight: bold">import</span> <span style="color: #0000FF; font-weight: bold">numpy</span> <span style="color: #008000; font-weight: bold">as</span> <span style="color: #0000FF; font-weight: bold">np</span>
562+
<span style="color: #008000; font-weight: bold">from</span> <span style="color: #0000FF; font-weight: bold">qiskit.visualization</span> <span style="color: #008000; font-weight: bold">import</span> plot_bloch_vector
563+
564+
plot_bloch_vector([<span style="color: #666666">0</span>,<span style="color: #666666">1</span>,<span style="color: #666666">0</span>], title<span style="color: #666666">=</span><span style="color: #BA2121">&quot;New Bloch Sphere&quot;</span>)
565+
566+
<span style="color: #408080; font-style: italic"># You can use spherical coordinates instead of cartesian. </span>
567+
568+
plot_bloch_vector([<span style="color: #666666">1</span>, np<span style="color: #666666">.</span>pi<span style="color: #666666">/2</span>, np<span style="color: #666666">.</span>pi<span style="color: #666666">/3</span>], coord_type<span style="color: #666666">=</span><span style="color: #BA2121">&#39;spherical&#39;</span>)
569+
</pre>
570+
</div>
571+
</div>
572+
</div>
573+
</div>
574+
<div class="output_wrapper">
575+
<div class="output">
576+
<div class="output_area">
577+
<div class="output_subarea output_stream output_stdout output_text">
578+
</div>
579+
</div>
580+
</div>
581+
</div>
582+
</div>
583+
584+
552585
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
553586
<h2 id="measurements">Measurements </h2>
554587

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)