Skip to content

Commit 70b6df2

Browse files
committed
update first week
1 parent 3d54ef7 commit 70b6df2

File tree

8 files changed

+2469
-286
lines changed

8 files changed

+2469
-286
lines changed

doc/pub/week1/html/week1-bs.html

Lines changed: 344 additions & 8 deletions
Large diffs are not rendered by default.

doc/pub/week1/html/week1-reveal.html

Lines changed: 350 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ <h2 id="overview-of-first-week-basic-notions-of-quantum-mechanics">Overview of f
206206
<p><li> States in Hilbert space, pure and mixed states</li>
207207
<p><li> Operators and simple gates</li>
208208
<p><li> <a href="https://youtu.be/" target="_blank">Video of lecture to be added</a></li>
209-
<p><li> Test your background knowledge (to be added)</li>
210209
</ol>
211210
<p>
212211
<p><b>Reading recommendation</b>: <a href="https://link.springer.com/book/10.1007/978-3-030-12358-1" target="_blank">Scherer, Mathematics of Quantum Computations, chapter 2</a></p>
@@ -227,7 +226,7 @@ <h2 id="practicalities">Practicalities </h2>
227226
</ul>
228227
<p>
229228
<p><li> Two projects which count \( 50\% \) each for the final grade</li>
230-
<p><li> Deadline first project March 21</li>
229+
<p><li> Deadline first project March 21, see <a href="https://github.com/CompPhysics/QuantumComputingMachineLearning/tree/gh-pages/doc/Projects/2025/Project1" target="_blank"><tt>https://github.com/CompPhysics/QuantumComputingMachineLearning/tree/gh-pages/doc/Projects/2025/Project1</tt></a></li>
231230
<p><li> Deadline second project June 1</li>
232231
<p><li> All info at the GitHub address <a href="https://github.com/CompPhysics/QuantumComputingMachineLearning" target="_blank"><tt>https://github.com/CompPhysics/QuantumComputingMachineLearning</tt></a></li>
233232
</ol>
@@ -240,7 +239,6 @@ <h2 id="possible-textbooks">Possible textbooks </h2>
240239
<p><li> Wolfgang Scherer, Mathematics of Quantum Computing, see <a href="https://link.springer.com/book/10.1007/978-3-030-12358-1" target="_blank"><tt>https://link.springer.com/book/10.1007/978-3-030-12358-1</tt></a></li>
241240
<p><li> Robert Hundt, Quantum Computing for Programmers, <a href="https://www.cambridge.org/core/books/quantum-computing-for-programmers/BA1C887BE4AC0D0D5653E71FFBEF61C6" target="_blank"><tt>https://www.cambridge.org/core/books/quantum-computing-for-programmers/BA1C887BE4AC0D0D5653E71FFBEF61C6</tt></a></li>
242241
<p><li> Robert Loredo, Learn Quantum Computing with Python and IBM Quantum Experience, see <a href="https://github.com/PacktPublishing/Learn-Quantum-Computing-with-Python-and-IBM-Quantum-Experience" target="_blank"><tt>https://github.com/PacktPublishing/Learn-Quantum-Computing-with-Python-and-IBM-Quantum-Experience</tt></a></li>
243-
<p><li> More texts with links will be added.</li>
244242
</ol>
245243
</section>
246244

@@ -1403,11 +1401,358 @@ <h2 id="more-on-orthogonality">More on orthogonality </h2>
14031401
<p>Unitary transformations are rotations in state space which preserve the
14041402
length (the square root of the inner product) of the state vector.
14051403
</p>
1404+
1405+
<p>gates discussed below are examples of operations we can perform on
1406+
specific states.
1407+
</p>
1408+
1409+
<p>We consider the state</p>
1410+
<p>&nbsp;<br>
1411+
$$
1412+
\vert \psi\rangle = \alpha \vert 0 \rangle +\beta \vert 1 \rangle
1413+
$$
1414+
<p>&nbsp;<br>
1415+
</section>
1416+
1417+
<section>
1418+
<h2 id="entanglement">Entanglement </h2>
1419+
1420+
<p>In order to study entanglement and why it is so important for quantum
1421+
computing, we need to introduce some basic measures and useful
1422+
quantities. These quantities are the spectral decomposition of
1423+
hermitian operators, how these are then used to define measurements
1424+
and how we can define so-called density operators (matrices). These
1425+
are all quantities which will become very useful when we discuss
1426+
entanglement and in particular how to quantify it. In order to define
1427+
these quantities we need first to remind ourselves about some basic linear
1428+
algebra properties of hermitian operators and matrices.
1429+
</p>
1430+
</section>
1431+
1432+
<section>
1433+
<h2 id="basic-properties-of-hermitian-operators">Basic properties of hermitian operators </h2>
1434+
1435+
<p>The operators we typically encounter in quantum mechanical studies are</p>
1436+
<ol>
1437+
<p><li> Hermitian (self-adjoint) meaning that for example the elements of a Hermitian matrix \( \boldsymbol{U} \) obey \( u_{ij}=u_{ji}^* \).</li>
1438+
<p><li> Unitary \( \boldsymbol{U}\boldsymbol{U}^{\dagger}=\boldsymbol{U}^{\dagger}\boldsymbol{U}=\boldsymbol{I} \), where \( \boldsymbol{I} \) is the unit matrix</li>
1439+
<p><li> The oparator \( \boldsymbol{U} \) and its self-adjoint commute (often labeled as normal operators), that is \( [\boldsymbol{U},\boldsymbol{U}^{\dagger}]=0 \). An operator is <b>normal</b> if and only if it is diagonalizable. A Hermitian operator is normal.</li>
1440+
</ol>
1441+
<p>
1442+
<p>Unitary operators in a Hilbert space preserve the norm and orthogonality. If \( \boldsymbol{U} \) is a unitary operator acting on a state \( \vert \psi_j\rangle \), the action of</p>
1443+
1444+
<p>&nbsp;<br>
1445+
$$
1446+
\vert \phi_i\rangle=\boldsymbol{U}\vert \psi_j\rangle,
1447+
$$
1448+
<p>&nbsp;<br>
1449+
1450+
<p>preserves both the norm and orthogonality, that is \( \langle \phi_i \vert \phi_j\rangle=\langle \psi_i \vert \psi_j\rangle=\delta_{ij} \), as discussed earlier.</p>
1451+
</section>
1452+
1453+
<section>
1454+
<h2 id="the-pauli-matrices-again">The Pauli matrices again </h2>
1455+
1456+
<p>As example, consider the Pauli matrix \( \sigma_x \). We have already seen that this matrix is a unitary matrix. Consider then an orthogonal and normalized basis \( \vert 0\rangle^{\dagger} =\begin{bmatrix} 1 &amp; 0\end{bmatrix} \) and \( \vert 1\rangle^{\dagger} =\begin{bmatrix} 0 &amp; 1\end{bmatrix} \) and a state which is a linear superposition of these two basis states</p>
1457+
1458+
<p>&nbsp;<br>
1459+
$$
1460+
\vert \psi_a\rangle=\alpha_0\vert 0\rangle +\alpha_1\vert 1\rangle.
1461+
$$
1462+
<p>&nbsp;<br>
1463+
1464+
<p>A new state \( \vert \psi_b\rangle \) is given by</p>
1465+
<p>&nbsp;<br>
1466+
$$
1467+
\vert \psi_b\rangle=\sigma_x\vert \psi_a\rangle=\alpha_0\vert 1\rangle +\alpha_1\vert 0\rangle.
1468+
$$
1469+
<p>&nbsp;<br>
1470+
</section>
1471+
1472+
<section>
1473+
<h2 id="spectral-decomposition">Spectral Decomposition </h2>
1474+
1475+
<p>An important technicality which we will use in the discussion of
1476+
density matrices, entanglement, quantum entropies and other properties
1477+
is the so-called spectral decomposition of an operator.
1478+
</p>
1479+
1480+
<p>Let \( \vert \psi\rangle \) be a vector in a Hilbert space of dimension \( n \) and a hermitian operator \( \boldsymbol{A} \) defined in this
1481+
space. Assume \( \vert \psi\rangle \) is an eigenvector of \( \boldsymbol{A} \) with eigenvalue \( \lambda \), that is
1482+
</p>
1483+
1484+
<p>&nbsp;<br>
1485+
$$
1486+
\boldsymbol{A}\vert \psi\rangle = \lambda\vert \psi\rangle = \lambda \boldsymbol{I}\vert \psi \rangle,
1487+
$$
1488+
<p>&nbsp;<br>
1489+
1490+
<p>where we used \( \boldsymbol{I}\vert \psi \rangle = 1 \vert \psi \rangle \).
1491+
Subtracting the right hand side from the left hand side gives
1492+
</p>
1493+
<p>&nbsp;<br>
1494+
$$
1495+
\left[\boldsymbol{A}-\lambda \boldsymbol{I}\right]\vert \psi \rangle=0,
1496+
$$
1497+
<p>&nbsp;<br>
1498+
1499+
<p>which has a nontrivial solution only if the determinant
1500+
\( \mathrm{det}(\boldsymbol{A}-\lambda\boldsymbol{I})=0 \).
1501+
</p>
14061502
</section>
14071503

14081504
<section>
1409-
<h2 id="exercises-to-test-yourself">Exercises to test yourself </h2>
1410-
<p>To be added</p>
1505+
<h2 id="onb-again-and-again">ONB again and again </h2>
1506+
1507+
<p>We define now an orthonormal basis \( \vert i \rangle =\{\vert 0
1508+
\rangle, \vert 1\rangle, \dots, \vert n-1\rangle \) in the same Hilbert
1509+
space. We will assume that this basis is an eigenbasis of \( \boldsymbol{A} \) with eigenvalues \( \lambda_i \)
1510+
</p>
1511+
1512+
<p>We expand a new vector using this eigenbasis of \( \boldsymbol{A} \)</p>
1513+
<p>&nbsp;<br>
1514+
$$
1515+
\vert \psi \rangle = \sum_{i=0}^{n-1}\alpha_i\vert i\rangle,
1516+
$$
1517+
<p>&nbsp;<br>
1518+
1519+
<p>with the normalization condition \( \sum_{i=0}^{n-1}\vert \alpha_i\vert^2 \).
1520+
Acting with \( \boldsymbol{A} \) on this new state results in
1521+
</p>
1522+
1523+
<p>&nbsp;<br>
1524+
$$
1525+
\boldsymbol{A}\vert \psi \rangle = \sum_{i=0}^{n-1}\alpha_i\boldsymbol{A}\vert i\rangle=\sum_{i=0}^{n-1}\alpha_i\lambda_i\vert i\rangle.
1526+
$$
1527+
<p>&nbsp;<br>
1528+
</section>
1529+
1530+
<section>
1531+
<h2 id="projection-operators">Projection operators </h2>
1532+
1533+
<p>If we then use that the outer product of any state with itself defines a projection operator we have the projection operators</p>
1534+
<p>&nbsp;<br>
1535+
$$
1536+
\boldsymbol{P}_{\psi} = \vert \psi\rangle\langle \psi\vert,
1537+
$$
1538+
<p>&nbsp;<br>
1539+
1540+
<p>and</p>
1541+
<p>&nbsp;<br>
1542+
$$
1543+
\boldsymbol{P}_{j} = \vert j\rangle\langle j\vert,
1544+
$$
1545+
<p>&nbsp;<br>
1546+
1547+
<p>we have that </p>
1548+
<p>&nbsp;<br>
1549+
$$
1550+
\boldsymbol{P}_{j}\vert \psi\rangle=\vert j\rangle\langle j\vert\sum_{i=0}^{n-1}\alpha_i\vert i\rangle=\sum_{i=0}^{n-1}\alpha_i\vert j\rangle\langle j\vert i\rangle.
1551+
$$
1552+
<p>&nbsp;<br>
1553+
</section>
1554+
1555+
<section>
1556+
<h2 id="further-manipulations">Further manipulations </h2>
1557+
1558+
<p>This results in</p>
1559+
<p>&nbsp;<br>
1560+
$$
1561+
\boldsymbol{P}_{j}\vert \psi\rangle=\alpha_j\vert j\rangle,
1562+
$$
1563+
<p>&nbsp;<br>
1564+
1565+
<p>since \( \langle j\vert i\rangle \).
1566+
With the last equation we can rewrite
1567+
</p>
1568+
<p>&nbsp;<br>
1569+
$$
1570+
\boldsymbol{A}\vert \psi \rangle = \sum_{i=0}^{n-1}\alpha_i\lambda_i\vert i\rangle=\sum_{i=0}^{n-1}\lambda_i\boldsymbol{P}_i\vert \psi\rangle,
1571+
$$
1572+
<p>&nbsp;<br>
1573+
1574+
<p>from which we conclude that</p>
1575+
<p>&nbsp;<br>
1576+
$$
1577+
\boldsymbol{A}=\sum_{i=0}^{n-1}\lambda_i\boldsymbol{P}_i.
1578+
$$
1579+
<p>&nbsp;<br>
1580+
</section>
1581+
1582+
<section>
1583+
<h2 id="spectral-decomposition">Spectral decomposition </h2>
1584+
1585+
<p>This is the spectral decomposition of a hermitian and normal
1586+
operator. It is true for any state and it is independent of the
1587+
basis. The spectral decomposition can in turn be used to exhaustively
1588+
specify a measurement, as we will see in the next section.
1589+
</p>
1590+
1591+
<p>As an example, consider two states \( \vert \psi_a\rangle \) and \( \vert
1592+
\psi_b\rangle \) that are eigenstates of \( \boldsymbol{A} \) with eigenvalues
1593+
\( \lambda_a \) and \( \lambda_b \), respectively. In the diagonalization
1594+
process we have obtained the coefficients \( \alpha_0 \), \( \alpha_1 \),
1595+
\( \beta_0 \) and \( \beta_1 \) using an expansion in terms of the orthogonal
1596+
basis \( \vert 0\rangle \) and \( \vert 1\rangle \).
1597+
</p>
1598+
</section>
1599+
1600+
<section>
1601+
<h2 id="explicit-results">Explicit results </h2>
1602+
1603+
<p>We have then</p>
1604+
1605+
<p>&nbsp;<br>
1606+
$$
1607+
\vert \psi_a\rangle = \alpha_0\vert 0\rangle+\alpha_1\vert 1\rangle,
1608+
$$
1609+
<p>&nbsp;<br>
1610+
1611+
<p>and</p>
1612+
<p>&nbsp;<br>
1613+
$$
1614+
\vert \psi_b\rangle = \beta_0\vert 0\rangle+\beta_1\vert 1\rangle,
1615+
$$
1616+
<p>&nbsp;<br>
1617+
1618+
<p>with corresponding projection operators</p>
1619+
1620+
<p>&nbsp;<br>
1621+
$$
1622+
\boldsymbol{P}_a=\vert \psi_a\rangle \langle \psi_a\vert = \begin{bmatrix} \vert \alpha_0\vert^2 &\alpha_0\alpha_1^* \\
1623+
\alpha_1\alpha_0^* & \vert \alpha_1\vert^* \end{bmatrix},
1624+
$$
1625+
<p>&nbsp;<br>
1626+
1627+
<p>and</p>
1628+
<p>&nbsp;<br>
1629+
$$
1630+
\boldsymbol{P}_b=\vert \psi_b\rangle \langle \psi_b\vert = \begin{bmatrix} \vert \beta_0\vert^2 &\beta_0\beta_1^* \\
1631+
\beta_1\beta_0^* & \vert \beta_1\vert^* \end{bmatrix}.
1632+
$$
1633+
<p>&nbsp;<br>
1634+
</section>
1635+
1636+
<section>
1637+
<h2 id="the-spectral-decomposition">The spectral decomposition </h2>
1638+
<p>The results from the previous slide gives us
1639+
the following spectral decomposition of \( \boldsymbol{A} \)
1640+
</p>
1641+
<p>&nbsp;<br>
1642+
$$
1643+
\boldsymbol{A}=\lambda_a \vert \psi_a\rangle \langle \psi_a\vert+\lambda_b \vert \psi_b\rangle \langle \psi_b\vert,
1644+
$$
1645+
<p>&nbsp;<br>
1646+
1647+
<p>which written out in all its details reads</p>
1648+
<p>&nbsp;<br>
1649+
$$
1650+
\boldsymbol{A}=\lambda_a\begin{bmatrix} \vert \alpha_0\vert^2 &\alpha_0\alpha_1^* \\
1651+
\alpha_1\alpha_0^* & \vert \alpha_1\vert^* \end{bmatrix} +\lambda_b\begin{bmatrix} \vert \beta_0\vert^2 &\beta_0\beta_1^* \\
1652+
\beta_1\beta_0^* & \vert \beta_1\vert^* \end{bmatrix}.
1653+
$$
1654+
<p>&nbsp;<br>
1655+
</section>
1656+
1657+
<section>
1658+
<h2 id="first-exercise-set">First exercise set </h2>
1659+
1660+
<p>The last two exercises are meant to build the basis for
1661+
the two projects we will work on during the semester. The first
1662+
project deals with implementing the so-called
1663+
<b>Variational Quantum Eigensolver</b> algorithm for finding the eigenvalues and eigenvectors of selected Hamiltonians.
1664+
</p>
1665+
</section>
1666+
1667+
<section>
1668+
1669+
<!-- --- begin exercise --- -->
1670+
<h2 id="exercise-1-bell-states">Exercise 1: Bell states </h2>
1671+
1672+
<p>Show that the so-called Bell states listed here (and to be encountered many times in this course) form an orthogonal basis</p>
1673+
<p>&nbsp;<br>
1674+
$$
1675+
\vert \Phi^+\rangle = \frac{1}{\sqrt{2}}\left[\vert 00\rangle +\vert 11\rangle\right]=\frac{1}{\sqrt{2}}\begin{bmatrix} 1 \\ 0 \\ 0 \\ 1\end{bmatrix},
1676+
$$
1677+
<p>&nbsp;<br>
1678+
1679+
<p>&nbsp;<br>
1680+
$$
1681+
\vert \Phi^-\rangle = \frac{1}{\sqrt{2}}\left[\vert 00\rangle -\vert 11\rangle\right]=\frac{1}{\sqrt{2}}\begin{bmatrix} 1 \\ 0 \\ 0 \\ -1\end{bmatrix},
1682+
$$
1683+
<p>&nbsp;<br>
1684+
1685+
1686+
<!-- --- end exercise --- -->
1687+
</section>
1688+
1689+
<section>
1690+
<h2 id="and-the-next-two">And the next two </h2>
1691+
<p>&nbsp;<br>
1692+
$$
1693+
\vert \Psi^+\rangle = \frac{1}{\sqrt{2}}\left[\vert 10\rangle +\vert 01\rangle\right]=\frac{1}{\sqrt{2}}\begin{bmatrix} 0 \\ 1 \\ 1 \\ 0\end{bmatrix},
1694+
$$
1695+
<p>&nbsp;<br>
1696+
1697+
<p>and</p>
1698+
1699+
<p>&nbsp;<br>
1700+
$$
1701+
\vert \Psi^-\rangle = \frac{1}{\sqrt{2}}\left[\vert 10\rangle -\vert 01\rangle\right]=\frac{1}{\sqrt{2}}\begin{bmatrix} 0 \\ 1 \\ -1 \\ 0\end{bmatrix}.
1702+
$$
1703+
<p>&nbsp;<br>
1704+
</section>
1705+
1706+
<section>
1707+
1708+
<!-- --- begin exercise --- -->
1709+
<h2 id="exercise-2-entangled-state">Exercise 2: Entangled state </h2>
1710+
1711+
<p>Show that the state \( \alpha \vert 00\rangle+\beta\vert 11\rangle \) cannot be written as the product of the tensor product of two states and is thus entangle. The constants \( \alpha \) and \( \beta \) are both nonzero.</p>
1712+
1713+
<p>Write a function which sets up a one-qubit basis and apply the various Pauli matrices to these basis states.</p>
1714+
1715+
<!-- --- end exercise --- -->
1716+
</section>
1717+
1718+
<section>
1719+
1720+
<!-- --- begin exercise --- -->
1721+
<h2 id="exercise-3-commutator-identies">Exercise 3: Commutator identies </h2>
1722+
1723+
<p>Prove the following commutator relations for different operators (marked with a hat)</p>
1724+
<ol>
1725+
<p><li> \( [\hat{A}+\hat{B},\hat{C}]= [\hat{A},\hat{C}]+[\hat{B},\hat{C}] \);</li>
1726+
<p><li> \( [\hat{A},\hat{B}\hat{C}]= [\hat{A},\hat{B}]\hat{C}+\hat{B}[\hat{A},\hat{C}] \); and</li>
1727+
<p><li> \( [\hat{A},[\hat{B}\hat{C}]]= [\hat{B},[\hat{C},\hat{A}]]+[\hat{C},[\hat{A},\hat{B}]]=0 \) (the so-called Jacobi identity).</li>
1728+
</ol>
1729+
<p>
1730+
<!-- --- end exercise --- -->
1731+
</section>
1732+
1733+
<section>
1734+
<h2 id="shared-eigenvectors">Shared eigenvectors </h2>
1735+
<p>Prove that if two operators \( \hat{A} \) and \( \hat{B} \) commute they will share a basis of eigenstates</p>
1736+
</section>
1737+
1738+
<section>
1739+
1740+
<!-- --- begin exercise --- -->
1741+
<h2 id="exercise-4-one-qubit-basis-and-pauli-matrices">Exercise 4: One-qubit basis and Pauli matrices </h2>
1742+
1743+
<p>Write a function which sets up a one-qubit basis and apply the various Pauli matrices to these basis states.</p>
1744+
1745+
<!-- --- end exercise --- -->
1746+
</section>
1747+
1748+
<section>
1749+
1750+
<!-- --- begin exercise --- -->
1751+
<h2 id="exercise-5-hadamard-and-phase-gates">Exercise 5: Hadamard and Phase gates </h2>
1752+
1753+
<p>Apply the Hadamard and Phase gates to the same one-qubit basis states and study their actions on these states.</p>
1754+
1755+
<!-- --- end exercise --- -->
14111756
</section>
14121757

14131758

0 commit comments

Comments
 (0)