Skip to content

Commit a3c9dc5

Browse files
committed
update 2nd week
1 parent 518e5be commit a3c9dc5

File tree

10 files changed

+771
-905
lines changed

10 files changed

+771
-905
lines changed

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

Lines changed: 100 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
2,
8585
None,
8686
'extending-the-expressions'),
87+
('Density Matrices', 2, None, 'density-matrices'),
8788
('Density matrices/operators',
8889
2,
8990
None,
@@ -92,6 +93,14 @@
9293
2,
9394
None,
9495
'properties-of-density-matrices'),
96+
('Important properties of the density matrix',
97+
2,
98+
None,
99+
'important-properties-of-the-density-matrix'),
100+
('More on the density matrix',
101+
2,
102+
None,
103+
'more-on-the-density-matrix'),
95104
('First entanglement encounter, two qubit system',
96105
2,
97106
None,
@@ -108,6 +117,10 @@
108117
('Examples of entanglement', 2, None, 'examples-of-entanglement'),
109118
('Ground state of helium', 2, None, 'ground-state-of-helium'),
110119
('Maximally entangled', 2, None, 'maximally-entangled'),
120+
('Density matrices in more detail',
121+
2,
122+
None,
123+
'density-matrices-in-more-detail'),
111124
('Second exercise set', 2, None, 'second-exercise-set'),
112125
('Ex1: One-qubit basis and Pauli matrices',
113126
2,
@@ -130,10 +143,10 @@
130143
2,
131144
None,
132145
'ex6-reduced-density-operators-ii'),
133-
('The next lecture, February 5, 2025',
146+
('The next lecture, February 4, 2026',
134147
2,
135148
None,
136-
'the-next-lecture-february-5-2025')]}
149+
'the-next-lecture-february-4-2026')]}
137150
end of tocinfo -->
138151

139152
<body>
@@ -198,8 +211,11 @@
198211
<!-- navigation toc: --> <li><a href="#taking-the-trace" style="font-size: 80%;">Taking the trace</a></li>
199212
<!-- navigation toc: --> <li><a href="#outcome-probability" style="font-size: 80%;">Outcome probability</a></li>
200213
<!-- navigation toc: --> <li><a href="#extending-the-expressions" style="font-size: 80%;">Extending the expressions</a></li>
214+
<!-- navigation toc: --> <li><a href="#density-matrices" style="font-size: 80%;">Density Matrices</a></li>
201215
<!-- navigation toc: --> <li><a href="#density-matrices-operators" style="font-size: 80%;">Density matrices/operators</a></li>
202216
<!-- navigation toc: --> <li><a href="#properties-of-density-matrices" style="font-size: 80%;">Properties of density matrices</a></li>
217+
<!-- navigation toc: --> <li><a href="#important-properties-of-the-density-matrix" style="font-size: 80%;">Important properties of the density matrix</a></li>
218+
<!-- navigation toc: --> <li><a href="#more-on-the-density-matrix" style="font-size: 80%;">More on the density matrix</a></li>
203219
<!-- navigation toc: --> <li><a href="#first-entanglement-encounter-two-qubit-system" style="font-size: 80%;">First entanglement encounter, two qubit system</a></li>
204220
<!-- navigation toc: --> <li><a href="#computational-basis" style="font-size: 80%;">Computational basis</a></li>
205221
<!-- navigation toc: --> <li><a href="#bell-states" style="font-size: 80%;">Bell states</a></li>
@@ -213,14 +229,15 @@
213229
<!-- navigation toc: --> <li><a href="#examples-of-entanglement" style="font-size: 80%;">Examples of entanglement</a></li>
214230
<!-- navigation toc: --> <li><a href="#ground-state-of-helium" style="font-size: 80%;">Ground state of helium</a></li>
215231
<!-- navigation toc: --> <li><a href="#maximally-entangled" style="font-size: 80%;">Maximally entangled</a></li>
232+
<!-- navigation toc: --> <li><a href="#density-matrices-in-more-detail" style="font-size: 80%;">Density matrices in more detail</a></li>
216233
<!-- navigation toc: --> <li><a href="#second-exercise-set" style="font-size: 80%;">Second exercise set</a></li>
217234
<!-- navigation toc: --> <li><a href="#ex1-one-qubit-basis-and-pauli-matrices" style="font-size: 80%;">Ex1: One-qubit basis and Pauli matrices</a></li>
218235
<!-- navigation toc: --> <li><a href="#ex2-hadamard-and-phase-gates" style="font-size: 80%;">Ex2: Hadamard and Phase gates</a></li>
219236
<!-- navigation toc: --> <li><a href="#ex3-traces-of-operators" style="font-size: 80%;">Ex3: Traces of operators</a></li>
220237
<!-- navigation toc: --> <li><a href="#ex4-exponentiated-operators" style="font-size: 80%;">Ex4: Exponentiated operators</a></li>
221238
<!-- navigation toc: --> <li><a href="#ex5-reduced-density-operators-i" style="font-size: 80%;">Ex5: Reduced density operators I</a></li>
222239
<!-- navigation toc: --> <li><a href="#ex6-reduced-density-operators-ii" style="font-size: 80%;">Ex6: Reduced density operators II</a></li>
223-
<!-- navigation toc: --> <li><a href="#the-next-lecture-february-5-2025" style="font-size: 80%;">The next lecture, February 5, 2025</a></li>
240+
<!-- navigation toc: --> <li><a href="#the-next-lecture-february-4-2026" style="font-size: 80%;">The next lecture, February 4, 2026</a></li>
224241

225242
</ul>
226243
</li>
@@ -264,7 +281,6 @@ <h2 id="summary-from-last-week-and-plans-for-this-week" class="anchor">Summary f
264281
<li> introduced the inner product and showed how to calculate it in an orthonormal basis</li>
265282
<li> introduced outer products and projection operators</li>
266283
<li> introduced tensor products and showed how to construct state vectors for multiple qubits</li>
267-
<li> introduced the spectral decomposition of operators</li>
268284
</ol>
269285
</div>
270286
</div>
@@ -802,6 +818,21 @@ <h2 id="extending-the-expressions" class="anchor">Extending the expressions </h2
802818

803819
<p>With these prerequisites we are now ready to introduce the density matrices, or density operators.</p>
804820

821+
<!-- !split -->
822+
<h2 id="density-matrices" class="anchor">Density Matrices </h2>
823+
824+
<p>As opposed to the wavefunction (a so-called pure state) in closed
825+
(Hermitian) quantum mechanics, the density matrix uniquely describes
826+
the state of a quantum system in an open system, as well as in closed
827+
systems.
828+
</p>
829+
830+
<p>With pure states, the state of a quantum system is deterministic and
831+
leads to probabilities of outcomes of measurements. In contrast, what
832+
if the state itself is uncertain and therefore probabilistic? This is
833+
what density matrices describe.
834+
</p>
835+
805836
<!-- !split -->
806837
<h2 id="density-matrices-operators" class="anchor">Density matrices/operators </h2>
807838

@@ -844,6 +875,65 @@ <h2 id="properties-of-density-matrices" class="anchor">Properties of density mat
844875
$$
845876

846877

878+
<!-- !split -->
879+
<h2 id="important-properties-of-the-density-matrix" class="anchor">Important properties of the density matrix </h2>
880+
<div class="panel panel-default">
881+
<div class="panel-body">
882+
<!-- subsequent paragraphs come in larger fonts, so start with a paragraph -->
883+
<p>The density matrix of a pure state \( \vert\psi\rangle \) is \( \rho = \vert\psi\rangle\langle\psi\vert \).</p>
884+
</div>
885+
</div>
886+
887+
<div class="panel panel-default">
888+
<div class="panel-body">
889+
<!-- subsequent paragraphs come in larger fonts, so start with a paragraph -->
890+
$$
891+
\rho = \rho^\dagger, \quad \lambda(\rho) \ge 0, \quad \mathrm{Tr}(\rho) = 1.
892+
$$
893+
</div>
894+
</div>
895+
896+
<div class="panel panel-default">
897+
<div class="panel-body">
898+
<!-- subsequent paragraphs come in larger fonts, so start with a paragraph -->
899+
<p>Given a probabilistic mixture of states with probabilities \( \{p_i\} \) and states \( \{\vert\psi_i\rangle\} \),</p>
900+
$$
901+
\rho = \sum_i p_i \vert \psi_i\rangle\langle\psi_i\vert.
902+
$$
903+
</div>
904+
</div>
905+
906+
907+
<!-- !split -->
908+
<h2 id="more-on-the-density-matrix" class="anchor">More on the density matrix </h2>
909+
<div class="panel panel-default">
910+
<div class="panel-body">
911+
<!-- subsequent paragraphs come in larger fonts, so start with a paragraph -->
912+
<p>For a \( d \times d \) density matrix \( \rho \), there exists an orthonormal basis \( \{\vert b_i\rangle\} \) such that</p>
913+
$$
914+
\rho = \sum_i \lambda_i \vert b_i\rangle\langle b_i\vert,
915+
$$
916+
917+
<p>where \( \lambda_i \) are probabilities.</p>
918+
</div>
919+
</div>
920+
921+
<div class="panel panel-default">
922+
<div class="panel-body">
923+
<!-- subsequent paragraphs come in larger fonts, so start with a paragraph -->
924+
<p>The expectation value of an observable \( X \) is</p>
925+
$$
926+
\langle X \rangle = \mathrm{Tr}(\rho X) = \sum_i \lambda_i \langle b_i\vert X \vert b_i\rangle.
927+
$$
928+
929+
<p>The time evolution in a closed system with Hamiltonian \( H \) is</p>
930+
$$
931+
\rho(t) = \exp{-\imath Ht} \rho(0) \exp{\imath Ht}.
932+
$$
933+
</div>
934+
</div>
935+
936+
847937
<!-- !split -->
848938
<h2 id="first-entanglement-encounter-two-qubit-system" class="anchor">First entanglement encounter, two qubit system </h2>
849939

@@ -1056,6 +1146,9 @@ <h2 id="maximally-entangled" class="anchor">Maximally entangled </h2>
10561146
$$
10571147

10581148

1149+
<!-- !split -->
1150+
<h2 id="density-matrices-in-more-detail" class="anchor">Density matrices in more detail </h2>
1151+
10591152
<!-- !split -->
10601153
<h2 id="second-exercise-set" class="anchor">Second exercise set </h2>
10611154

@@ -1110,14 +1203,15 @@ <h2 id="ex6-reduced-density-operators-ii" class="anchor">Ex6: Reduced density op
11101203
</p>
11111204

11121205
<!-- !split -->
1113-
<h2 id="the-next-lecture-february-5-2025" class="anchor">The next lecture, February 5, 2025 </h2>
1206+
<h2 id="the-next-lecture-february-4-2026" class="anchor">The next lecture, February 4, 2026 </h2>
11141207

11151208
<p>In our next lecture, we will discuss</p>
11161209
<ol>
11171210
<li> Discussion of entropy and entanglement</li>
11181211
<li> Gates and circuits and how to perform operations on states</li>
11191212
</ol>
11201213
<a href="https://github.com/CompPhysics/QuantumComputingMachineLearning/blob/gh-pages/doc/Textbooks/Programming/chapter2.pdf" target="_self">Reading: Chapters 2.1-2.11 of Hundt's text</a>
1214+
11211215
<!-- ------------------- end of main content --------------- -->
11221216
</div> <!-- end container -->
11231217
<!-- include javascript, jQuery *first* -->
@@ -1129,7 +1223,7 @@ <h2 id="the-next-lecture-february-5-2025" class="anchor">The next lecture, Febru
11291223
</footer>
11301224
-->
11311225
<center style="font-size:80%">
1132-
<!-- copyright --> &copy; 1999-2025, Morten Hjorth-Jensen. Released under CC Attribution-NonCommercial 4.0 license
1226+
<!-- copyright --> &copy; 1999-2026, Morten Hjorth-Jensen. Released under CC Attribution-NonCommercial 4.0 license
11331227
</center>
11341228
</body>
11351229
</html>

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

Lines changed: 86 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ <h4>January 28, 2026</h4>
187187

188188

189189
<center style="font-size:80%">
190-
<!-- copyright --> &copy; 1999-2025, Morten Hjorth-Jensen. Released under CC Attribution-NonCommercial 4.0 license
190+
<!-- copyright --> &copy; 1999-2026, Morten Hjorth-Jensen. Released under CC Attribution-NonCommercial 4.0 license
191191
</center>
192192
</section>
193193

@@ -202,7 +202,6 @@ <h2 id="summary-from-last-week-and-plans-for-this-week">Summary from last week a
202202
<p><li> introduced the inner product and showed how to calculate it in an orthonormal basis</li>
203203
<p><li> introduced outer products and projection operators</li>
204204
<p><li> introduced tensor products and showed how to construct state vectors for multiple qubits</li>
205-
<p><li> introduced the spectral decomposition of operators</li>
206205
</ol>
207206
</div>
208207
</section>
@@ -851,6 +850,22 @@ <h2 id="extending-the-expressions">Extending the expressions </h2>
851850
<p>With these prerequisites we are now ready to introduce the density matrices, or density operators.</p>
852851
</section>
853852

853+
<section>
854+
<h2 id="density-matrices">Density Matrices </h2>
855+
856+
<p>As opposed to the wavefunction (a so-called pure state) in closed
857+
(Hermitian) quantum mechanics, the density matrix uniquely describes
858+
the state of a quantum system in an open system, as well as in closed
859+
systems.
860+
</p>
861+
862+
<p>With pure states, the state of a quantum system is deterministic and
863+
leads to probabilities of outcomes of measurements. In contrast, what
864+
if the state itself is uncertain and therefore probabilistic? This is
865+
what density matrices describe.
866+
</p>
867+
</section>
868+
854869
<section>
855870
<h2 id="density-matrices-operators">Density matrices/operators </h2>
856871

@@ -904,6 +919,70 @@ <h2 id="properties-of-density-matrices">Properties of density matrices </h2>
904919
<p>&nbsp;<br>
905920
</section>
906921

922+
<section>
923+
<h2 id="important-properties-of-the-density-matrix">Important properties of the density matrix </h2>
924+
<div class="alert alert-block alert-block alert-text-normal">
925+
<b></b>
926+
<p>
927+
<p>The density matrix of a pure state \( \vert\psi\rangle \) is \( \rho = \vert\psi\rangle\langle\psi\vert \).</p>
928+
</div>
929+
930+
<div class="alert alert-block alert-block alert-text-normal">
931+
<b>\( \rho \) is Hermitian, positive semi-definite (all eigenvalues non-negative), and has unit trace</b>
932+
<p>
933+
<p>&nbsp;<br>
934+
$$
935+
\rho = \rho^\dagger, \quad \lambda(\rho) \ge 0, \quad \mathrm{Tr}(\rho) = 1.
936+
$$
937+
<p>&nbsp;<br>
938+
</div>
939+
940+
<div class="alert alert-block alert-block alert-text-normal">
941+
<b></b>
942+
<p>
943+
<p>Given a probabilistic mixture of states with probabilities \( \{p_i\} \) and states \( \{\vert\psi_i\rangle\} \),</p>
944+
<p>&nbsp;<br>
945+
$$
946+
\rho = \sum_i p_i \vert \psi_i\rangle\langle\psi_i\vert.
947+
$$
948+
<p>&nbsp;<br>
949+
</div>
950+
</section>
951+
952+
<section>
953+
<h2 id="more-on-the-density-matrix">More on the density matrix </h2>
954+
<div class="alert alert-block alert-block alert-text-normal">
955+
<b></b>
956+
<p>
957+
<p>For a \( d \times d \) density matrix \( \rho \), there exists an orthonormal basis \( \{\vert b_i\rangle\} \) such that</p>
958+
<p>&nbsp;<br>
959+
$$
960+
\rho = \sum_i \lambda_i \vert b_i\rangle\langle b_i\vert,
961+
$$
962+
<p>&nbsp;<br>
963+
964+
<p>where \( \lambda_i \) are probabilities.</p>
965+
</div>
966+
967+
<div class="alert alert-block alert-block alert-text-normal">
968+
<b></b>
969+
<p>
970+
<p>The expectation value of an observable \( X \) is</p>
971+
<p>&nbsp;<br>
972+
$$
973+
\langle X \rangle = \mathrm{Tr}(\rho X) = \sum_i \lambda_i \langle b_i\vert X \vert b_i\rangle.
974+
$$
975+
<p>&nbsp;<br>
976+
977+
<p>The time evolution in a closed system with Hamiltonian \( H \) is</p>
978+
<p>&nbsp;<br>
979+
$$
980+
\rho(t) = \exp{-\imath Ht} \rho(0) \exp{\imath Ht}.
981+
$$
982+
<p>&nbsp;<br>
983+
</div>
984+
</section>
985+
907986
<section>
908987
<h2 id="first-entanglement-encounter-two-qubit-system">First entanglement encounter, two qubit system </h2>
909988

@@ -1166,6 +1245,10 @@ <h2 id="maximally-entangled">Maximally entangled </h2>
11661245
<p>&nbsp;<br>
11671246
</section>
11681247

1248+
<section>
1249+
<h2 id="density-matrices-in-more-detail">Density matrices in more detail </h2>
1250+
</section>
1251+
11691252
<section>
11701253
<h2 id="second-exercise-set">Second exercise set </h2>
11711254

@@ -1230,7 +1313,7 @@ <h2 id="ex6-reduced-density-operators-ii">Ex6: Reduced density operators II </h2
12301313
</section>
12311314

12321315
<section>
1233-
<h2 id="the-next-lecture-february-5-2025">The next lecture, February 5, 2025 </h2>
1316+
<h2 id="the-next-lecture-february-4-2026">The next lecture, February 4, 2026 </h2>
12341317

12351318
<p>In our next lecture, we will discuss</p>
12361319
<ol>

0 commit comments

Comments
 (0)