diff --git a/_book/Introduction-to-Quantum-Computing.pdf b/_book/Introduction-to-Quantum-Computing.pdf index 724c9cde94584f801bddf395e91a37e04bfa92be..a921b54a4de8934ac4ecd7a2ea0db87849402fca 100644 Binary files a/_book/Introduction-to-Quantum-Computing.pdf and b/_book/Introduction-to-Quantum-Computing.pdf differ diff --git a/_book/content/compositeSystems.html b/_book/content/compositeSystems.html new file mode 100644 index 0000000000000000000000000000000000000000..3796d8e9ad8a198548d75c1eb8540d8921bf230a --- /dev/null +++ b/_book/content/compositeSystems.html @@ -0,0 +1,758 @@ +<!DOCTYPE html> +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head> + +<meta charset="utf-8"> +<meta name="generator" content="quarto-1.7.26"> + +<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> + + +<title>6 Composite Systems – Introduction to Quantum Computing</title> +<style> +code{white-space: pre-wrap;} +span.smallcaps{font-variant: small-caps;} +div.columns{display: flex; gap: min(4vw, 1.5em);} +div.column{flex: auto; overflow-x: auto;} +div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} +ul.task-list{list-style: none;} +ul.task-list li input[type="checkbox"] { + width: 0.8em; + margin: 0 0.8em 0.2em -1em; /* quarto-specific, see https://github.com/quarto-dev/quarto-cli/issues/4556 */ + vertical-align: middle; +} +</style> + + +<script src="../site_libs/quarto-nav/quarto-nav.js"></script> +<script src="../site_libs/quarto-nav/headroom.min.js"></script> +<script src="../site_libs/clipboard/clipboard.min.js"></script> +<script src="../site_libs/quarto-search/autocomplete.umd.js"></script> +<script src="../site_libs/quarto-search/fuse.min.js"></script> +<script src="../site_libs/quarto-search/quarto-search.js"></script> +<meta name="quarto:offset" content="../"> +<link href="../content/partialObserving.html" rel="prev"> +<script src="../site_libs/quarto-html/quarto.js" type="module"></script> +<script src="../site_libs/quarto-html/tabsets/tabsets.js" type="module"></script> +<script src="../site_libs/quarto-html/popper.min.js"></script> +<script src="../site_libs/quarto-html/tippy.umd.min.js"></script> +<script src="../site_libs/quarto-html/anchor.min.js"></script> +<link href="../site_libs/quarto-html/tippy.css" rel="stylesheet"> +<link href="../site_libs/quarto-html/quarto-syntax-highlighting-53f539a478d6ecd1be31ce9fd30fd81c.css" rel="stylesheet" id="quarto-text-highlighting-styles"> +<script src="../site_libs/bootstrap/bootstrap.min.js"></script> +<link href="../site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet"> +<link href="../site_libs/bootstrap/bootstrap-364982630eef5352dd1537128a8ed5cb.min.css" rel="stylesheet" append-hash="true" id="quarto-bootstrap" data-mode="light"> +<script id="quarto-search-options" type="application/json">{ + "location": "sidebar", + "copy-button": false, + "collapse-after": 3, + "panel-placement": "start", + "type": "textbox", + "limit": 50, + "keyboard-shortcut": [ + "f", + "/", + "s" + ], + "show-item-context": false, + "language": { + "search-no-results-text": "No results", + "search-matching-documents-text": "matching documents", + "search-copy-link-title": "Copy link to search", + "search-hide-matches-text": "Hide additional matches", + "search-more-match-text": "more match in this document", + "search-more-matches-text": "more matches in this document", + "search-clear-button-title": "Clear", + "search-text-placeholder": "", + "search-detached-cancel-button-title": "Cancel", + "search-submit-button-title": "Submit", + "search-label": "Search" + } +}</script> + + <script src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=es6"></script> + <script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js" type="text/javascript"></script> + +<script type="text/javascript"> +const typesetMath = (el) => { + if (window.MathJax) { + // MathJax Typeset + window.MathJax.typeset([el]); + } else if (window.katex) { + // KaTeX Render + var mathElements = el.getElementsByClassName("math"); + var macros = []; + for (var i = 0; i < mathElements.length; i++) { + var texText = mathElements[i].firstChild; + if (mathElements[i].tagName == "SPAN") { + window.katex.render(texText.data, mathElements[i], { + displayMode: mathElements[i].classList.contains('display'), + throwOnError: false, + macros: macros, + fleqn: false + }); + } + } + } +} +window.Quarto = { + typesetMath +}; +</script> + +</head> + +<body class="nav-sidebar floating quarto-light"> + +<div id="quarto-search-results"></div> + <header id="quarto-header" class="headroom fixed-top"> + <nav class="quarto-secondary-nav"> + <div class="container-fluid d-flex"> + <button type="button" class="quarto-btn-toggle btn" data-bs-toggle="collapse" role="button" data-bs-target=".quarto-sidebar-collapse-item" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }"> + <i class="bi bi-layout-text-sidebar-reverse"></i> + </button> + <nav class="quarto-page-breadcrumbs" aria-label="breadcrumb"><ol class="breadcrumb"><li class="breadcrumb-item"><a href="../content/introduction.html">Quantum basics</a></li><li class="breadcrumb-item"><a href="../content/compositeSystems.html"><span class="chapter-number">6</span> <span class="chapter-title">Composite Systems</span></a></li></ol></nav> + <a class="flex-grow-1" role="navigation" data-bs-toggle="collapse" data-bs-target=".quarto-sidebar-collapse-item" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }"> + </a> + <button type="button" class="btn quarto-search-button" aria-label="Search" onclick="window.quartoOpenSearch();"> + <i class="bi bi-search"></i> + </button> + </div> + </nav> +</header> +<!-- content --> +<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article"> +<!-- sidebar --> + <nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation floating overflow-auto"> + <div class="pt-lg-2 mt-2 text-left sidebar-header"> + <div class="sidebar-title mb-0 py-0"> + <a href="../">Introduction to Quantum Computing</a> + <div class="sidebar-tools-main"> + <a href="https://git.rwth-aachen.de/unruh/script-intro-qc/" title="Source Code" class="quarto-navigation-tool px-1" aria-label="Source Code"><i class="bi bi-git"></i></a> + <a href="../Introduction-to-Quantum-Computing.pdf" title="Download PDF" class="quarto-navigation-tool px-1" aria-label="Download PDF"><i class="bi bi-file-pdf"></i></a> +</div> + </div> + </div> + <div class="mt-2 flex-shrink-0 align-items-center"> + <div class="sidebar-search"> + <div id="quarto-search" class="" title="Search"></div> + </div> + </div> + <div class="sidebar-menu-container"> + <ul class="list-unstyled mt-1"> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="../index.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text">Welcome</span></a> + </div> +</li> + <li class="sidebar-item sidebar-item-section"> + <div class="sidebar-item-container"> + <a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" role="navigation" aria-expanded="true"> + <span class="menu-text">Quantum basics</span></a> + <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" role="navigation" aria-expanded="true" aria-label="Toggle section"> + <i class="bi bi-chevron-right ms-2"></i> + </a> + </div> + <ul id="quarto-sidebar-section-1" class="collapse list-unstyled sidebar-section depth1 show"> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="../content/introduction.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">1</span> <span class="chapter-title">Introduction</span></span></a> + </div> +</li> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="../content/probabilisticSystems.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">2</span> <span class="chapter-title">Probabilistic systems</span></span></a> + </div> +</li> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="../content/quantumSystems.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">3</span> <span class="chapter-title">Quantum systems</span></span></a> + </div> +</li> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="../content/observingSystems.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">4</span> <span class="chapter-title">Observing probabilistic and measuring quantum systems</span></span></a> + </div> +</li> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="../content/partialObserving.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">5</span> <span class="chapter-title">Partial observing and measuring systems</span></span></a> + </div> +</li> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="../content/compositeSystems.html" class="sidebar-item-text sidebar-link active"> + <span class="menu-text"><span class="chapter-number">6</span> <span class="chapter-title">Composite Systems</span></span></a> + </div> +</li> + </ul> + </li> + </ul> + </div> +</nav> +<div id="quarto-sidebar-glass" class="quarto-sidebar-collapse-item" data-bs-toggle="collapse" data-bs-target=".quarto-sidebar-collapse-item"></div> +<!-- margin-sidebar --> + <div id="quarto-margin-sidebar" class="sidebar margin-sidebar"> + <nav id="TOC" role="doc-toc" class="toc-active"> + <h2 id="toc-title">Table of contents</h2> + + <ul> + <li><a href="#constructing-composite-systems" id="toc-constructing-composite-systems" class="nav-link active" data-scroll-target="#constructing-composite-systems"><span class="header-section-number">6.1</span> Constructing composite systems</a></li> + <li><a href="#measuring-composite-systems" id="toc-measuring-composite-systems" class="nav-link" data-scroll-target="#measuring-composite-systems"><span class="header-section-number">6.2</span> Measuring composite systems</a></li> + </ul> +</nav> + </div> +<!-- main --> +<main class="content" id="quarto-document-content"> + +<header id="title-block-header" class="quarto-title-block default"><nav class="quarto-page-breadcrumbs quarto-title-breadcrumbs d-none d-lg-block" aria-label="breadcrumb"><ol class="breadcrumb"><li class="breadcrumb-item"><a href="../content/introduction.html">Quantum basics</a></li><li class="breadcrumb-item"><a href="../content/compositeSystems.html"><span class="chapter-number">6</span> <span class="chapter-title">Composite Systems</span></a></li></ol></nav> +<div class="quarto-title"> +<h1 class="title"><span class="chapter-number">6</span> <span class="chapter-title">Composite Systems</span></h1> +</div> + + + +<div class="quarto-title-meta"> + + + + + </div> + + + +</header> + + +<p>So far our probabilistic and quantum systems consist of only one single distribution/state. In the real world, quantum computers often have several different registers (variables).</p> +<p>In theory, we could use a single very big distribution/state to model multiple qubits. For example a 10 qubit system could be modeled with the classical possibilities <span class="math inline">\(0000000000, 0000000001, \dots, 1111111110, 1111111111\)</span>.</p> +<p>Unfortunately the vector for these states gets really big, for 10 qubits, the vector would have the dimension of <span class="math inline">\(1024\)</span>. Since this is very inconvenient to write down, we need to look at a different solution. For this, we compose different probabilistic or quantum systems with each other.</p> +<section id="constructing-composite-systems" class="level2" data-number="6.1"> +<h2 data-number="6.1" class="anchored" data-anchor-id="constructing-composite-systems"><span class="header-section-number">6.1</span> Constructing composite systems</h2> +<div class="callout callout-style-simple callout-note no-icon"> +<div class="callout-body d-flex"> +<div class="callout-icon-container"> +<i class="callout-icon no-icon"></i> +</div> +<div class="callout-body-container"> +<div id="def-composite-systems" class="definition theorem"> +<p><span class="theorem-title"><strong>Definition 6.1 (Composite systems / Tensor product)</strong></span> Given two probabilistic or quantum systems <span class="math inline">\(A\)</span> and <span class="math inline">\(B\)</span> with the possibilities of <span class="math inline">\(A\)</span> given by <span class="math inline">\(1,\dots,N\)</span><a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a> and a distribution/state <span class="math inline">\(\mu_a\)</span> and with the possibilities of <span class="math inline">\(B\)</span> given by <span class="math inline">\(1,\dots,M\)</span> and a distribution/state <span class="math inline">\(\mu_b\)</span>, the <em>composite</em> system called <span class="math inline">\(AB\)</span> has the possibilities <span class="math display">\[ +11,12,\dots,1M,21,22,\dots,2M,\dots,N1,N2,\dots,NM +\]</span> and the distribution/state <span class="math inline">\(ab\)</span> of <span class="math inline">\(AB\)</span> is given by the <em>tensor product</em> <span class="math display">\[ +\mu_{ab} += \sqrt{2} \otimes \mu_b += \begin{pmatrix} \mu_{a_1} \cdot \mu_b\\ \vdots \\ \mu_{a_N} \cdot \mu_b \end{pmatrix}. +\]</span> This vector has the size <span class="math inline">\(NM\)</span>.</p> +</div> +</div> +</div> +</div> +<p>Note that the definition of combining a probabilistic and a quantum system are the same.</p> +<div class="callout callout-style-simple callout-tip no-icon callout-titled"> +<div class="callout-header d-flex align-content-center"> +<div class="callout-icon-container"> +<i class="callout-icon no-icon"></i> +</div> +<div class="callout-title-container flex-fill"> +Example: Composite system +</div> +</div> +<div class="callout-body-container callout-body"> +<p>Let the distributions for the system <span class="math inline">\(A\)</span> with the possibilities <span class="math inline">\(1,2\)</span> and the system <span class="math inline">\(B\)</span> with the possibilities <span class="math inline">\(A,B,C\)</span> be given by <span class="math display">\[ +\begin{aligned} +\mu_a &= \begin{pmatrix} \frac{1}{\sqrt{2}} \\ -\frac{1}{\sqrt{2}} \end{pmatrix},& +\mu_b &= \begin{pmatrix} \frac{1}{2} \\ 0 \\ \frac{\sqrt{3}}{2} \end{pmatrix}. +\end{aligned} +\]</span> Then the composite system <span class="math inline">\(AB\)</span> has the possibilities <span class="math inline">\(1A, 1B, 1C, 2A, 2B, 2C\)</span> and the distribution <span class="math display">\[ +\mu_{ab} += \mu_a \otimes \mu_b += \begin{pmatrix} \frac{1}{\sqrt{2}} \\ -\frac{1}{\sqrt{2}} \end{pmatrix} \otimes \begin{pmatrix} \frac{1}{\sqrt{2}} \\ 0 \\ \frac{1}{\sqrt{2}} \end{pmatrix} += \begin{pmatrix} \frac{1}{\sqrt{2}} \cdot \frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} \cdot 0 \\ \frac{1}{\sqrt{2}} \cdot \frac{1}{\sqrt{2}} \\ -\frac{1}{\sqrt{2}} \cdot \frac{1}{\sqrt{2}} \\ -\frac{1}{\sqrt{2}} \cdot 0 \\ -\frac{1}{\sqrt{2}} \cdot \frac{1}{\sqrt{2}} \end{pmatrix}. += \begin{pmatrix} \frac{1}{2} \\ 0 \\ \frac{1}{2} \\ -\frac{1}{2} \\ 0 \\ -\frac{1}{2} \end{pmatrix}. +\]</span></p> +</div> +</div> +<p>We now need a way to apply operators on these combined systems. For this we can also construct the tensor product of either two probabilistic processes or two unitary transformations by using the tensor product of two matrices.</p> +<div class="callout callout-style-simple callout-note no-icon"> +<div class="callout-body d-flex"> +<div class="callout-icon-container"> +<i class="callout-icon no-icon"></i> +</div> +<div class="callout-body-container"> +<div id="def-composite-systems-matrix" class="definition theorem"> +<p><span class="theorem-title"><strong>Definition 6.2 (Composite matrices / Tensor product)</strong></span> Given two matrices <span class="math inline">\(S\)</span> and <span class="math inline">\(T\)</span> with <span class="math inline">\(S\)</span> of the size <span class="math inline">\(N\times N\)</span> and <span class="math inline">\(T\)</span> of the size <span class="math inline">\(M\times M\)</span>. The tensor product <span class="math inline">\(S\otimes T\)</span> of is given by <span class="math display">\[ +S \otimes T += \begin{pmatrix} + S_{11}T & \dots & S_{1N} T\\ + \vdots & \ddots & \vdots\\ + S_{N1} T & \dots & S_{NN}T + \end{pmatrix}. +\]</span></p> +</div> +</div> +</div> +</div> +<p>Overall we can say: If we apply <span class="math inline">\(S\)</span> to the system <span class="math inline">\(A\)</span> and <span class="math inline">\(T\)</span> to the system <span class="math inline">\(B\)</span>, we apply <span class="math inline">\(S\otimes T\)</span> to the composite system <span class="math inline">\(AB\)</span>.</p> +<p>If the distribution <span class="math inline">\(d_{AB}\)</span> of a given probabilistic system <span class="math inline">\(AB\)</span> can be written as a composite of two distributions <span class="math inline">\(d_A\)</span> and <span class="math inline">\(d_B\)</span>, we know that <span class="math inline">\(A\)</span> and <span class="math inline">\(B\)</span> are independent of each other. If we cannot write <span class="math inline">\(d_{AB}\)</span> as two separate distributions, the probabilities are depended on each other.</p> +<p>If the quantum state <span class="math inline">\(\psi_{AB}\)</span> of a given quantum system <span class="math inline">\(AB\)</span> can be written as a composite of two different quantum states <span class="math inline">\(\psi_A\)</span> and <span class="math inline">\(\psi_B\)</span>, the quantum states of <span class="math inline">\(A\)</span> and <span class="math inline">\(B\)</span> are independent of each other. If we can not write <span class="math inline">\(\psi_{AB}\)</span> as a tensor product of two quantum systems, the quantum states depend on each other. We call this <em>entangled</em>.</p> +<div class="callout callout-style-simple callout-note no-icon"> +<div class="callout-body d-flex"> +<div class="callout-icon-container"> +<i class="callout-icon no-icon"></i> +</div> +<div class="callout-body-container"> +<div id="lem-unitary-matrix" class="lemma theorem"> +<p><span class="theorem-title"><strong>Lemma 6.1</strong></span> For two (unitary) matrices <span class="math inline">\(A \in \mathbb{C}^{n\times n}\)</span> and <span class="math inline">\(B \in \mathbb{C}^{m \times m}\)</span> and two vectors (quantum states) <span class="math inline">\(\psi \in \mathbb{C}^n\)</span> and <span class="math inline">\(\phi \in \mathbb{C}^m\)</span>, the following applies <span class="math display">\[ +(A \otimes B)(\psi \otimes \phi) = A\psi \otimes B\phi. +\]</span></p> +</div> +</div> +</div> +</div> +</section> +<section id="measuring-composite-systems" class="level2" data-number="6.2"> +<h2 data-number="6.2" class="anchored" data-anchor-id="measuring-composite-systems"><span class="header-section-number">6.2</span> Measuring composite systems</h2> +<p>To perform a (partial) observation or (partial) measurement on a composite system <span class="math inline">\(AB\)</span>, we can compose two separate measurements on the systems <span class="math inline">\(A\)</span> and <span class="math inline">\(B\)</span> similar as we constructed the tensor product.</p> +<div class="callout callout-style-simple callout-note no-icon"> +<div class="callout-body d-flex"> +<div class="callout-icon-container"> +<i class="callout-icon no-icon"></i> +</div> +<div class="callout-body-container"> +<div id="def-composite-systems-measure" class="definition theorem"> +<p><span class="theorem-title"><strong>Definition 6.3 (Composite measurements)</strong></span> Given two systems <span class="math inline">\(A\)</span> and <span class="math inline">\(B\)</span> with possibilities <span class="math inline">\(1,\dots, N\)</span> and <span class="math inline">\(1,\dots, M\)</span> and two partial measurements <span class="math inline">\(M_A\)</span> and <span class="math inline">\(M_B\)</span> on systems <span class="math inline">\(A\)</span> and <span class="math inline">\(B\)</span> with alternatives <span class="math inline">\(A_1,\dots,A_N \subseteq \{1,\dots,N\}\)</span> and <span class="math inline">\(B_1,\dots,B_M \subseteq \{1,\dots,M\}\)</span>. The measurement <span class="math inline">\(M_A \otimes M_B\)</span> on <span class="math inline">\(AB\)</span> is a measurement with the alternatives <span class="math inline">\(C_{11},C_{12},\dots,C_{NM}\)</span> where <span class="math inline">\(C_{ij} = A_i \times B_j\)</span>.</p> +<p>If we only have a set of alternatives for system <span class="math inline">\(A\)</span>, we can do a measurement <span class="math inline">\(M_A \otimes I\)</span> with alternatives <span class="math inline">\(C_1, \dots ,C_N := A \otimes \{1,\dots, M \}\)</span>.</p> +</div> +</div> +</div> +</div> + + +</section> +<section id="footnotes" class="footnotes footnotes-end-of-document" role="doc-endnotes"> +<hr> +<ol> +<li id="fn1"><p>Note that the possibilities are labels <span class="math inline">\(1,\dots,N\)</span> and do not have be the numbers <span class="math inline">\(1,\dots,N\)</span>. We could also label these e.g. <em>red</em>, <em>green</em> and <em>blue</em> (or any other label).<a href="#fnref1" class="footnote-back" role="doc-backlink">↩︎</a></p></li> +</ol> +</section> + +</main> <!-- /main --> +<script id="quarto-html-after-body" type="application/javascript"> + window.document.addEventListener("DOMContentLoaded", function (event) { + const icon = ""; + const anchorJS = new window.AnchorJS(); + anchorJS.options = { + placement: 'right', + icon: icon + }; + anchorJS.add('.anchored'); + const isCodeAnnotation = (el) => { + for (const clz of el.classList) { + if (clz.startsWith('code-annotation-')) { + return true; + } + } + return false; + } + const onCopySuccess = function(e) { + // button target + const button = e.trigger; + // don't keep focus + button.blur(); + // flash "checked" + button.classList.add('code-copy-button-checked'); + var currentTitle = button.getAttribute("title"); + button.setAttribute("title", "Copied!"); + let tooltip; + if (window.bootstrap) { + button.setAttribute("data-bs-toggle", "tooltip"); + button.setAttribute("data-bs-placement", "left"); + button.setAttribute("data-bs-title", "Copied!"); + tooltip = new bootstrap.Tooltip(button, + { trigger: "manual", + customClass: "code-copy-button-tooltip", + offset: [0, -8]}); + tooltip.show(); + } + setTimeout(function() { + if (tooltip) { + tooltip.hide(); + button.removeAttribute("data-bs-title"); + button.removeAttribute("data-bs-toggle"); + button.removeAttribute("data-bs-placement"); + } + button.setAttribute("title", currentTitle); + button.classList.remove('code-copy-button-checked'); + }, 1000); + // clear code selection + e.clearSelection(); + } + const getTextToCopy = function(trigger) { + const codeEl = trigger.previousElementSibling.cloneNode(true); + for (const childEl of codeEl.children) { + if (isCodeAnnotation(childEl)) { + childEl.remove(); + } + } + return codeEl.innerText; + } + const clipboard = new window.ClipboardJS('.code-copy-button:not([data-in-quarto-modal])', { + text: getTextToCopy + }); + clipboard.on('success', onCopySuccess); + if (window.document.getElementById('quarto-embedded-source-code-modal')) { + const clipboardModal = new window.ClipboardJS('.code-copy-button[data-in-quarto-modal]', { + text: getTextToCopy, + container: window.document.getElementById('quarto-embedded-source-code-modal') + }); + clipboardModal.on('success', onCopySuccess); + } + var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//); + var mailtoRegex = new RegExp(/^mailto:/); + var filterRegex = new RegExp("https:\/\/qis\.rwth-aachen\.de\/teaching\/25ss\/intro-quantum-computing\/script\/"); + var isInternal = (href) => { + return filterRegex.test(href) || localhostRegex.test(href) || mailtoRegex.test(href); + } + // Inspect non-navigation links and adorn them if external + var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool):not(.about-link)'); + for (var i=0; i<links.length; i++) { + const link = links[i]; + if (!isInternal(link.href)) { + // undo the damage that might have been done by quarto-nav.js in the case of + // links that we want to consider external + if (link.dataset.originalHref !== undefined) { + link.href = link.dataset.originalHref; + } + } + } + function tippyHover(el, contentFn, onTriggerFn, onUntriggerFn) { + const config = { + allowHTML: true, + maxWidth: 500, + delay: 100, + arrow: false, + appendTo: function(el) { + return el.parentElement; + }, + interactive: true, + interactiveBorder: 10, + theme: 'quarto', + placement: 'bottom-start', + }; + if (contentFn) { + config.content = contentFn; + } + if (onTriggerFn) { + config.onTrigger = onTriggerFn; + } + if (onUntriggerFn) { + config.onUntrigger = onUntriggerFn; + } + window.tippy(el, config); + } + const noterefs = window.document.querySelectorAll('a[role="doc-noteref"]'); + for (var i=0; i<noterefs.length; i++) { + const ref = noterefs[i]; + tippyHover(ref, function() { + // use id or data attribute instead here + let href = ref.getAttribute('data-footnote-href') || ref.getAttribute('href'); + try { href = new URL(href).hash; } catch {} + const id = href.replace(/^#\/?/, ""); + const note = window.document.getElementById(id); + if (note) { + return note.innerHTML; + } else { + return ""; + } + }); + } + const xrefs = window.document.querySelectorAll('a.quarto-xref'); + const processXRef = (id, note) => { + // Strip column container classes + const stripColumnClz = (el) => { + el.classList.remove("page-full", "page-columns"); + if (el.children) { + for (const child of el.children) { + stripColumnClz(child); + } + } + } + stripColumnClz(note) + if (id === null || id.startsWith('sec-')) { + // Special case sections, only their first couple elements + const container = document.createElement("div"); + if (note.children && note.children.length > 2) { + container.appendChild(note.children[0].cloneNode(true)); + for (let i = 1; i < note.children.length; i++) { + const child = note.children[i]; + if (child.tagName === "P" && child.innerText === "") { + continue; + } else { + container.appendChild(child.cloneNode(true)); + break; + } + } + if (window.Quarto?.typesetMath) { + window.Quarto.typesetMath(container); + } + return container.innerHTML + } else { + if (window.Quarto?.typesetMath) { + window.Quarto.typesetMath(note); + } + return note.innerHTML; + } + } else { + // Remove any anchor links if they are present + const anchorLink = note.querySelector('a.anchorjs-link'); + if (anchorLink) { + anchorLink.remove(); + } + if (window.Quarto?.typesetMath) { + window.Quarto.typesetMath(note); + } + if (note.classList.contains("callout")) { + return note.outerHTML; + } else { + return note.innerHTML; + } + } + } + for (var i=0; i<xrefs.length; i++) { + const xref = xrefs[i]; + tippyHover(xref, undefined, function(instance) { + instance.disable(); + let url = xref.getAttribute('href'); + let hash = undefined; + if (url.startsWith('#')) { + hash = url; + } else { + try { hash = new URL(url).hash; } catch {} + } + if (hash) { + const id = hash.replace(/^#\/?/, ""); + const note = window.document.getElementById(id); + if (note !== null) { + try { + const html = processXRef(id, note.cloneNode(true)); + instance.setContent(html); + } finally { + instance.enable(); + instance.show(); + } + } else { + // See if we can fetch this + fetch(url.split('#')[0]) + .then(res => res.text()) + .then(html => { + const parser = new DOMParser(); + const htmlDoc = parser.parseFromString(html, "text/html"); + const note = htmlDoc.getElementById(id); + if (note !== null) { + const html = processXRef(id, note); + instance.setContent(html); + } + }).finally(() => { + instance.enable(); + instance.show(); + }); + } + } else { + // See if we can fetch a full url (with no hash to target) + // This is a special case and we should probably do some content thinning / targeting + fetch(url) + .then(res => res.text()) + .then(html => { + const parser = new DOMParser(); + const htmlDoc = parser.parseFromString(html, "text/html"); + const note = htmlDoc.querySelector('main.content'); + if (note !== null) { + // This should only happen for chapter cross references + // (since there is no id in the URL) + // remove the first header + if (note.children.length > 0 && note.children[0].tagName === "HEADER") { + note.children[0].remove(); + } + const html = processXRef(null, note); + instance.setContent(html); + } + }).finally(() => { + instance.enable(); + instance.show(); + }); + } + }, function(instance) { + }); + } + let selectedAnnoteEl; + const selectorForAnnotation = ( cell, annotation) => { + let cellAttr = 'data-code-cell="' + cell + '"'; + let lineAttr = 'data-code-annotation="' + annotation + '"'; + const selector = 'span[' + cellAttr + '][' + lineAttr + ']'; + return selector; + } + const selectCodeLines = (annoteEl) => { + const doc = window.document; + const targetCell = annoteEl.getAttribute("data-target-cell"); + const targetAnnotation = annoteEl.getAttribute("data-target-annotation"); + const annoteSpan = window.document.querySelector(selectorForAnnotation(targetCell, targetAnnotation)); + const lines = annoteSpan.getAttribute("data-code-lines").split(","); + const lineIds = lines.map((line) => { + return targetCell + "-" + line; + }) + let top = null; + let height = null; + let parent = null; + if (lineIds.length > 0) { + //compute the position of the single el (top and bottom and make a div) + const el = window.document.getElementById(lineIds[0]); + top = el.offsetTop; + height = el.offsetHeight; + parent = el.parentElement.parentElement; + if (lineIds.length > 1) { + const lastEl = window.document.getElementById(lineIds[lineIds.length - 1]); + const bottom = lastEl.offsetTop + lastEl.offsetHeight; + height = bottom - top; + } + if (top !== null && height !== null && parent !== null) { + // cook up a div (if necessary) and position it + let div = window.document.getElementById("code-annotation-line-highlight"); + if (div === null) { + div = window.document.createElement("div"); + div.setAttribute("id", "code-annotation-line-highlight"); + div.style.position = 'absolute'; + parent.appendChild(div); + } + div.style.top = top - 2 + "px"; + div.style.height = height + 4 + "px"; + div.style.left = 0; + let gutterDiv = window.document.getElementById("code-annotation-line-highlight-gutter"); + if (gutterDiv === null) { + gutterDiv = window.document.createElement("div"); + gutterDiv.setAttribute("id", "code-annotation-line-highlight-gutter"); + gutterDiv.style.position = 'absolute'; + const codeCell = window.document.getElementById(targetCell); + const gutter = codeCell.querySelector('.code-annotation-gutter'); + gutter.appendChild(gutterDiv); + } + gutterDiv.style.top = top - 2 + "px"; + gutterDiv.style.height = height + 4 + "px"; + } + selectedAnnoteEl = annoteEl; + } + }; + const unselectCodeLines = () => { + const elementsIds = ["code-annotation-line-highlight", "code-annotation-line-highlight-gutter"]; + elementsIds.forEach((elId) => { + const div = window.document.getElementById(elId); + if (div) { + div.remove(); + } + }); + selectedAnnoteEl = undefined; + }; + // Handle positioning of the toggle + window.addEventListener( + "resize", + throttle(() => { + elRect = undefined; + if (selectedAnnoteEl) { + selectCodeLines(selectedAnnoteEl); + } + }, 10) + ); + function throttle(fn, ms) { + let throttle = false; + let timer; + return (...args) => { + if(!throttle) { // first call gets through + fn.apply(this, args); + throttle = true; + } else { // all the others get throttled + if(timer) clearTimeout(timer); // cancel #2 + timer = setTimeout(() => { + fn.apply(this, args); + timer = throttle = false; + }, ms); + } + }; + } + // Attach click handler to the DT + const annoteDls = window.document.querySelectorAll('dt[data-target-cell]'); + for (const annoteDlNode of annoteDls) { + annoteDlNode.addEventListener('click', (event) => { + const clickedEl = event.target; + if (clickedEl !== selectedAnnoteEl) { + unselectCodeLines(); + const activeEl = window.document.querySelector('dt[data-target-cell].code-annotation-active'); + if (activeEl) { + activeEl.classList.remove('code-annotation-active'); + } + selectCodeLines(clickedEl); + clickedEl.classList.add('code-annotation-active'); + } else { + // Unselect the line + unselectCodeLines(); + clickedEl.classList.remove('code-annotation-active'); + } + }); + } + const findCites = (el) => { + const parentEl = el.parentElement; + if (parentEl) { + const cites = parentEl.dataset.cites; + if (cites) { + return { + el, + cites: cites.split(' ') + }; + } else { + return findCites(el.parentElement) + } + } else { + return undefined; + } + }; + var bibliorefs = window.document.querySelectorAll('a[role="doc-biblioref"]'); + for (var i=0; i<bibliorefs.length; i++) { + const ref = bibliorefs[i]; + const citeInfo = findCites(ref); + if (citeInfo) { + tippyHover(citeInfo.el, function() { + var popup = window.document.createElement('div'); + citeInfo.cites.forEach(function(cite) { + var citeDiv = window.document.createElement('div'); + citeDiv.classList.add('hanging-indent'); + citeDiv.classList.add('csl-entry'); + var biblioDiv = window.document.getElementById('ref-' + cite); + if (biblioDiv) { + citeDiv.innerHTML = biblioDiv.innerHTML; + } + popup.appendChild(citeDiv); + }); + return popup.innerHTML; + }); + } + } + }); + </script> +<nav class="page-navigation"> + <div class="nav-page nav-page-previous"> + <a href="../content/partialObserving.html" class="pagination-link" aria-label="Partial observing and measuring systems"> + <i class="bi bi-arrow-left-short"></i> <span class="nav-page-text"><span class="chapter-number">5</span> <span class="chapter-title">Partial observing and measuring systems</span></span> + </a> + </div> + <div class="nav-page nav-page-next"> + </div> +</nav> +</div> <!-- /content --> + + + + +</body></html> \ No newline at end of file diff --git a/_book/content/introduction.html b/_book/content/introduction.html index 73392c0b2f77d65de1b64fc1ca945e82baf88409..307de003e9c6dbf5594a053276f318f4ca29a573 100644 --- a/_book/content/introduction.html +++ b/_book/content/introduction.html @@ -184,6 +184,12 @@ window.Quarto = { <a href="../content/partialObserving.html" class="sidebar-item-text sidebar-link"> <span class="menu-text"><span class="chapter-number">5</span> <span class="chapter-title">Partial observing and measuring systems</span></span></a> </div> +</li> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="../content/compositeSystems.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">6</span> <span class="chapter-title">Composite Systems</span></span></a> + </div> </li> </ul> </li> diff --git a/_book/content/observingSystems.html b/_book/content/observingSystems.html index d14b09dc4892efde11dfc03b3e64fb160c91db67..5525919ef80aaafb3ace871d7ba194350ae60f90 100644 --- a/_book/content/observingSystems.html +++ b/_book/content/observingSystems.html @@ -184,6 +184,12 @@ window.Quarto = { <a href="../content/partialObserving.html" class="sidebar-item-text sidebar-link"> <span class="menu-text"><span class="chapter-number">5</span> <span class="chapter-title">Partial observing and measuring systems</span></span></a> </div> +</li> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="../content/compositeSystems.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">6</span> <span class="chapter-title">Composite Systems</span></span></a> + </div> </li> </ul> </li> diff --git a/_book/content/partialObserving.html b/_book/content/partialObserving.html index 7d04b06134cbdfac2b93afdaa73d9a51f39407ed..917b5dffa30bba6a8561f866e9bf75637f631507 100644 --- a/_book/content/partialObserving.html +++ b/_book/content/partialObserving.html @@ -30,6 +30,7 @@ ul.task-list li input[type="checkbox"] { <script src="../site_libs/quarto-search/fuse.min.js"></script> <script src="../site_libs/quarto-search/quarto-search.js"></script> <meta name="quarto:offset" content="../"> +<link href="../content/compositeSystems.html" rel="next"> <link href="../content/observingSystems.html" rel="prev"> <script src="../site_libs/quarto-html/quarto.js" type="module"></script> <script src="../site_libs/quarto-html/tabsets/tabsets.js" type="module"></script> @@ -183,6 +184,12 @@ window.Quarto = { <a href="../content/partialObserving.html" class="sidebar-item-text sidebar-link active"> <span class="menu-text"><span class="chapter-number">5</span> <span class="chapter-title">Partial observing and measuring systems</span></span></a> </div> +</li> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="../content/compositeSystems.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">6</span> <span class="chapter-title">Composite Systems</span></span></a> + </div> </li> </ul> </li> @@ -743,6 +750,9 @@ Example: Partially measuring a quantum system </a> </div> <div class="nav-page nav-page-next"> + <a href="../content/compositeSystems.html" class="pagination-link" aria-label="Composite Systems"> + <span class="nav-page-text"><span class="chapter-number">6</span> <span class="chapter-title">Composite Systems</span></span> <i class="bi bi-arrow-right-short"></i> + </a> </div> </nav> </div> <!-- /content --> diff --git a/_book/content/probabilisticSystems.html b/_book/content/probabilisticSystems.html index c78acbdc44b2aac4da843cf63345f418ab62017a..c852c68286702fda434bbb6915180955f1da114c 100644 --- a/_book/content/probabilisticSystems.html +++ b/_book/content/probabilisticSystems.html @@ -184,6 +184,12 @@ window.Quarto = { <a href="../content/partialObserving.html" class="sidebar-item-text sidebar-link"> <span class="menu-text"><span class="chapter-number">5</span> <span class="chapter-title">Partial observing and measuring systems</span></span></a> </div> +</li> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="../content/compositeSystems.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">6</span> <span class="chapter-title">Composite Systems</span></span></a> + </div> </li> </ul> </li> diff --git a/_book/content/quantumSystems.html b/_book/content/quantumSystems.html index 9d7dfab6f98c0ab5f2815498219e0f2a5a28c30b..0504ce2a810c3965668e99f0a0b0ff3a88d92e0f 100644 --- a/_book/content/quantumSystems.html +++ b/_book/content/quantumSystems.html @@ -184,6 +184,12 @@ window.Quarto = { <a href="../content/partialObserving.html" class="sidebar-item-text sidebar-link"> <span class="menu-text"><span class="chapter-number">5</span> <span class="chapter-title">Partial observing and measuring systems</span></span></a> </div> +</li> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="../content/compositeSystems.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">6</span> <span class="chapter-title">Composite Systems</span></span></a> + </div> </li> </ul> </li> diff --git a/_book/index.html b/_book/index.html index 8974c33b6429b739a71e617a2eaea749dc7b4152..30abe1f3a3fc994754a855388a3d1203389d9e50 100644 --- a/_book/index.html +++ b/_book/index.html @@ -9,7 +9,7 @@ <meta name="author" content="Jannik Hellenkamp"> <meta name="author" content="Stefan Stump"> <meta name="author" content="Dominique Unruh"> -<meta name="dcterms.date" content="2025-04-28"> +<meta name="dcterms.date" content="2025-04-29"> <title>Introduction to Quantum Computing</title> <style> @@ -158,6 +158,12 @@ ul.task-list li input[type="checkbox"] { <a href="./content/partialObserving.html" class="sidebar-item-text sidebar-link"> <span class="menu-text"><span class="chapter-number">5</span> <span class="chapter-title">Partial observing and measuring systems</span></span></a> </div> +</li> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="./content/compositeSystems.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">6</span> <span class="chapter-title">Composite Systems</span></span></a> + </div> </li> </ul> </li> @@ -203,7 +209,7 @@ ul.task-list li input[type="checkbox"] { <div> <div class="quarto-title-meta-heading">Published</div> <div class="quarto-title-meta-contents"> - <p class="date">April 28, 2025</p> + <p class="date">April 29, 2025</p> </div> </div> @@ -218,7 +224,7 @@ ul.task-list li input[type="checkbox"] { <section id="welcome" class="level1 unnumbered"> <h1 class="unnumbered">Welcome</h1> <p>These are the lecture notes for the “Introduction to Quantum Computing” lecture held by Dominique Unruh at RWTH Aachen in the summer term 2025. They should be viewed as an addition to the handwritten notes and the lecture recordings.</p> -<p>The lecture notes will be updated progressively throughout the semester, following the pace of the lectures. Last year’s lecture notes can be found <a href="https://qis.rwth-aachen.de/teaching/24ss/intro-quantum-computing/script">here</a>, but please note that they are incomplete and may differ from this years content.</p> +<p>The lecture notes will be updated progressively throughout the semester, following the pace of the lectures. Last year’s lecture notes can be found <a href="https://qis.rwth-aachen.de/teaching/24ss/intro-quantum-computing/script">here</a>, but note that they are incomplete and may differ from this years content.</p> <!--If you prefer a `.pdf` or `.epub` file, there is a download available at the top left corner. Please note that these files are autogenerated and some of the ebook readers have difficulties with the formulas. We are still working on a universal solution. You can also find the source code in the top left corner.--> <p>If you prefer a <code>.pdf</code> file, there is a download available at the top left corner. An <code>.epub</code> version is being worked on.</p> <!--If you spot an error, please send Stefan Stump an e-mail (stefan.stump\@rwth-aachen.de). If you have a question of understanding, please ask it in the Moodle forum.--> @@ -226,10 +232,10 @@ ul.task-list li input[type="checkbox"] { <section id="changelog" class="level2 unnumbered"> <h2 class="unnumbered anchored" data-anchor-id="changelog">Changelog</h2> <section id="section" class="level4"> -<h4 class="anchored" data-anchor-id="section">28.04.2025</h4> +<h4 class="anchored" data-anchor-id="section">30.04.2025</h4> <ul> -<li>started the lecture notes for summer 2025</li> -<li>added chapters 1 to 5 (except 4.3)</li> +<li>started the lecture notes for the summer term 2025</li> +<li>added chapters 1 to 6 (except 4.3)</li> </ul> diff --git a/_book/search.json b/_book/search.json index 13569aae928ddb8d36a05f2688a284b64e3a5340..3392ee74fd9ef0c93678fb08895c27c473150bdd 100644 --- a/_book/search.json +++ b/_book/search.json @@ -4,7 +4,7 @@ "href": "index.html", "title": "Introduction to Quantum Computing", "section": "", - "text": "Welcome\nThese are the lecture notes for the “Introduction to Quantum Computing” lecture held by Dominique Unruh at RWTH Aachen in the summer term 2025. They should be viewed as an addition to the handwritten notes and the lecture recordings.\nThe lecture notes will be updated progressively throughout the semester, following the pace of the lectures. Last year’s lecture notes can be found here, but please note that they are incomplete and may differ from this years content.\nIf you prefer a .pdf file, there is a download available at the top left corner. An .epub version is being worked on.\nThese lecture notes are released under the CC BY-NC 4.0 license, which can be found here.", + "text": "Welcome\nThese are the lecture notes for the “Introduction to Quantum Computing” lecture held by Dominique Unruh at RWTH Aachen in the summer term 2025. They should be viewed as an addition to the handwritten notes and the lecture recordings.\nThe lecture notes will be updated progressively throughout the semester, following the pace of the lectures. Last year’s lecture notes can be found here, but note that they are incomplete and may differ from this years content.\nIf you prefer a .pdf file, there is a download available at the top left corner. An .epub version is being worked on.\nThese lecture notes are released under the CC BY-NC 4.0 license, which can be found here.", "crumbs": [ "Welcome" ] @@ -14,7 +14,7 @@ "href": "index.html#changelog", "title": "Introduction to Quantum Computing", "section": "Changelog", - "text": "Changelog\n\n28.04.2025\n\nstarted the lecture notes for summer 2025\nadded chapters 1 to 5 (except 4.3)", + "text": "Changelog\n\n30.04.2025\n\nstarted the lecture notes for the summer term 2025\nadded chapters 1 to 6 (except 4.3)", "crumbs": [ "Welcome" ] @@ -205,5 +205,49 @@ "Quantum basics", "<span class='chapter-number'>5</span> <span class='chapter-title'>Partial observing and measuring systems</span>" ] + }, + { + "objectID": "content/compositeSystems.html", + "href": "content/compositeSystems.html", + "title": "6 Composite Systems", + "section": "", + "text": "6.1 Constructing composite systems\nSo far our probabilistic and quantum systems consist of only one single distribution/state. In the real world, quantum computers often have several different registers (variables).\nIn theory, we could use a single very big distribution/state to model multiple qubits. For example a 10 qubit system could be modeled with the classical possibilities \\(0000000000, 0000000001, \\dots, 1111111110, 1111111111\\).\nUnfortunately the vector for these states gets really big, for 10 qubits, the vector would have the dimension of \\(1024\\). Since this is very inconvenient to write down, we need to look at a different solution. For this, we compose different probabilistic or quantum systems with each other.\nNote that the definition of combining a probabilistic and a quantum system are the same.\nWe now need a way to apply operators on these combined systems. For this we can also construct the tensor product of either two probabilistic processes or two unitary transformations by using the tensor product of two matrices.\nOverall we can say: If we apply \\(S\\) to the system \\(A\\) and \\(T\\) to the system \\(B\\), we apply \\(S\\otimes T\\) to the composite system \\(AB\\).\nIf the distribution \\(d_{AB}\\) of a given probabilistic system \\(AB\\) can be written as a composite of two distributions \\(d_A\\) and \\(d_B\\), we know that \\(A\\) and \\(B\\) are independent of each other. If we cannot write \\(d_{AB}\\) as two separate distributions, the probabilities are depended on each other.\nIf the quantum state \\(\\psi_{AB}\\) of a given quantum system \\(AB\\) can be written as a composite of two different quantum states \\(\\psi_A\\) and \\(\\psi_B\\), the quantum states of \\(A\\) and \\(B\\) are independent of each other. If we can not write \\(\\psi_{AB}\\) as a tensor product of two quantum systems, the quantum states depend on each other. We call this entangled.", + "crumbs": [ + "Quantum basics", + "<span class='chapter-number'>6</span> <span class='chapter-title'>Composite Systems</span>" + ] + }, + { + "objectID": "content/compositeSystems.html#constructing-composite-systems", + "href": "content/compositeSystems.html#constructing-composite-systems", + "title": "6 Composite Systems", + "section": "", + "text": "Definition 6.1 (Composite systems / Tensor product) Given two probabilistic or quantum systems \\(A\\) and \\(B\\) with the possibilities of \\(A\\) given by \\(1,\\dots,N\\)1 and a distribution/state \\(\\mu_a\\) and with the possibilities of \\(B\\) given by \\(1,\\dots,M\\) and a distribution/state \\(\\mu_b\\), the composite system called \\(AB\\) has the possibilities \\[\n11,12,\\dots,1M,21,22,\\dots,2M,\\dots,N1,N2,\\dots,NM\n\\] and the distribution/state \\(ab\\) of \\(AB\\) is given by the tensor product \\[\n\\mu_{ab}\n= \\sqrt{2} \\otimes \\mu_b\n= \\begin{pmatrix} \\mu_{a_1} \\cdot \\mu_b\\\\ \\vdots \\\\ \\mu_{a_N} \\cdot \\mu_b \\end{pmatrix}.\n\\] This vector has the size \\(NM\\).\n\n\n\n\n\n\n\n\n\n\n\nExample: Composite system\n\n\n\nLet the distributions for the system \\(A\\) with the possibilities \\(1,2\\) and the system \\(B\\) with the possibilities \\(A,B,C\\) be given by \\[\n\\begin{aligned}\n\\mu_a &= \\begin{pmatrix} \\frac{1}{\\sqrt{2}} \\\\ -\\frac{1}{\\sqrt{2}} \\end{pmatrix},&\n\\mu_b &= \\begin{pmatrix} \\frac{1}{2} \\\\ 0 \\\\ \\frac{\\sqrt{3}}{2} \\end{pmatrix}.\n\\end{aligned}\n\\] Then the composite system \\(AB\\) has the possibilities \\(1A, 1B, 1C, 2A, 2B, 2C\\) and the distribution \\[\n\\mu_{ab}\n= \\mu_a \\otimes \\mu_b\n= \\begin{pmatrix} \\frac{1}{\\sqrt{2}} \\\\ -\\frac{1}{\\sqrt{2}} \\end{pmatrix} \\otimes \\begin{pmatrix} \\frac{1}{\\sqrt{2}} \\\\ 0 \\\\ \\frac{1}{\\sqrt{2}} \\end{pmatrix}\n= \\begin{pmatrix} \\frac{1}{\\sqrt{2}} \\cdot \\frac{1}{\\sqrt{2}} \\\\ \\frac{1}{\\sqrt{2}} \\cdot 0 \\\\ \\frac{1}{\\sqrt{2}} \\cdot \\frac{1}{\\sqrt{2}} \\\\ -\\frac{1}{\\sqrt{2}} \\cdot \\frac{1}{\\sqrt{2}} \\\\ -\\frac{1}{\\sqrt{2}} \\cdot 0 \\\\ -\\frac{1}{\\sqrt{2}} \\cdot \\frac{1}{\\sqrt{2}} \\end{pmatrix}.\n= \\begin{pmatrix} \\frac{1}{2} \\\\ 0 \\\\ \\frac{1}{2} \\\\ -\\frac{1}{2} \\\\ 0 \\\\ -\\frac{1}{2} \\end{pmatrix}.\n\\]\n\n\n\n\n\n\n\n\n\n\nDefinition 6.2 (Composite matrices / Tensor product) Given two matrices \\(S\\) and \\(T\\) with \\(S\\) of the size \\(N\\times N\\) and \\(T\\) of the size \\(M\\times M\\). The tensor product \\(S\\otimes T\\) of is given by \\[\nS \\otimes T\n= \\begin{pmatrix}\n S_{11}T & \\dots & S_{1N} T\\\\\n \\vdots & \\ddots & \\vdots\\\\\n S_{N1} T & \\dots & S_{NN}T\n \\end{pmatrix}.\n\\]\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nLemma 6.1 For two (unitary) matrices \\(A \\in \\mathbb{C}^{n\\times n}\\) and \\(B \\in \\mathbb{C}^{m \\times m}\\) and two vectors (quantum states) \\(\\psi \\in \\mathbb{C}^n\\) and \\(\\phi \\in \\mathbb{C}^m\\), the following applies \\[\n(A \\otimes B)(\\psi \\otimes \\phi) = A\\psi \\otimes B\\phi.\n\\]", + "crumbs": [ + "Quantum basics", + "<span class='chapter-number'>6</span> <span class='chapter-title'>Composite Systems</span>" + ] + }, + { + "objectID": "content/compositeSystems.html#measuring-composite-systems", + "href": "content/compositeSystems.html#measuring-composite-systems", + "title": "6 Composite Systems", + "section": "6.2 Measuring composite systems", + "text": "6.2 Measuring composite systems\nTo perform a (partial) observation or (partial) measurement on a composite system \\(AB\\), we can compose two separate measurements on the systems \\(A\\) and \\(B\\) similar as we constructed the tensor product.\n\n\n\n\n\n\n\nDefinition 6.3 (Composite measurements) Given two systems \\(A\\) and \\(B\\) with possibilities \\(1,\\dots, N\\) and \\(1,\\dots, M\\) and two partial measurements \\(M_A\\) and \\(M_B\\) on systems \\(A\\) and \\(B\\) with alternatives \\(A_1,\\dots,A_N \\subseteq \\{1,\\dots,N\\}\\) and \\(B_1,\\dots,B_M \\subseteq \\{1,\\dots,M\\}\\). The measurement \\(M_A \\otimes M_B\\) on \\(AB\\) is a measurement with the alternatives \\(C_{11},C_{12},\\dots,C_{NM}\\) where \\(C_{ij} = A_i \\times B_j\\).\nIf we only have a set of alternatives for system \\(A\\), we can do a measurement \\(M_A \\otimes I\\) with alternatives \\(C_1, \\dots ,C_N := A \\otimes \\{1,\\dots, M \\}\\).", + "crumbs": [ + "Quantum basics", + "<span class='chapter-number'>6</span> <span class='chapter-title'>Composite Systems</span>" + ] + }, + { + "objectID": "content/compositeSystems.html#footnotes", + "href": "content/compositeSystems.html#footnotes", + "title": "6 Composite Systems", + "section": "", + "text": "Note that the possibilities are labels \\(1,\\dots,N\\) and do not have be the numbers \\(1,\\dots,N\\). We could also label these e.g. red, green and blue (or any other label).↩︎", + "crumbs": [ + "Quantum basics", + "<span class='chapter-number'>6</span> <span class='chapter-title'>Composite Systems</span>" + ] } ] \ No newline at end of file diff --git a/_book/sitemap.xml b/_book/sitemap.xml index 374b99d6981a0e676fe565df2f3867902a738745..ae19559a5bff7f44780415f43bdf12b6c5836670 100644 --- a/_book/sitemap.xml +++ b/_book/sitemap.xml @@ -2,30 +2,34 @@ <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>https://qis.rwth-aachen.de/teaching/25ss/intro-quantum-computing/script/index.html</loc> - <lastmod>2025-04-27T23:33:02.624Z</lastmod> + <lastmod>2025-04-28T21:28:08.000Z</lastmod> </url> <url> <loc>https://qis.rwth-aachen.de/teaching/25ss/intro-quantum-computing/script/content/introduction.html</loc> - <lastmod>2025-04-27T23:05:03.486Z</lastmod> + <lastmod>2025-04-28T11:42:14.344Z</lastmod> </url> <url> <loc>https://qis.rwth-aachen.de/teaching/25ss/intro-quantum-computing/script/content/probabilisticSystems.html</loc> - <lastmod>2025-04-27T23:05:03.487Z</lastmod> + <lastmod>2025-04-28T11:42:14.344Z</lastmod> </url> <url> <loc>https://qis.rwth-aachen.de/teaching/25ss/intro-quantum-computing/script/content/quantumSystems.html</loc> - <lastmod>2025-04-27T23:05:03.487Z</lastmod> + <lastmod>2025-04-28T21:22:20.793Z</lastmod> </url> <url> <loc>https://qis.rwth-aachen.de/teaching/25ss/intro-quantum-computing/script/content/observingSystems.html</loc> - <lastmod>2025-04-27T23:13:16.637Z</lastmod> + <lastmod>2025-04-28T11:42:14.344Z</lastmod> </url> <url> <loc>https://qis.rwth-aachen.de/teaching/25ss/intro-quantum-computing/script/content/partialObserving.html</loc> - <lastmod>2025-04-27T23:48:51.577Z</lastmod> + <lastmod>2025-04-28T11:42:14.344Z</lastmod> + </url> + <url> + <loc>https://qis.rwth-aachen.de/teaching/25ss/intro-quantum-computing/script/content/compositeSystems.html</loc> + <lastmod>2025-04-29T10:37:40.514Z</lastmod> </url> <url> <loc>https://qis.rwth-aachen.de/teaching/25ss/intro-quantum-computing/script/Introduction-to-Quantum-Computing.pdf</loc> - <lastmod>2025-04-27T23:49:19.626Z</lastmod> + <lastmod>2025-04-29T10:38:10.900Z</lastmod> </url> </urlset> diff --git a/_quarto.yml b/_quarto.yml index 7a77967ac0a17251d2b7e9c85ca766e6b55e8981..984461d3c28983f6d9752a6fe4cd93de8512d186 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -25,8 +25,8 @@ book: - content/quantumSystems.qmd - content/observingSystems.qmd - content/partialObserving.qmd - # - content/compositeSystems.qmd - # - content/quantumCircutsKetNotation.qmd + - content/compositeSystems.qmd + # - content/quantumCircuitsKetNotation.qmd #- part: "Quantum algorithms" # chapters: # - content/bernsteinVazirani.qmd diff --git a/content/compositeSystems.qmd b/content/compositeSystems.qmd index d3376d8aca6302379f5694c9549e9132b508ea7c..a1b7abe3c35a62b0dd0a19809ad93fc7691b23a5 100644 --- a/content/compositeSystems.qmd +++ b/content/compositeSystems.qmd @@ -7,21 +7,22 @@ In theory, we could use a single very big distribution/state to model multiple q Unfortunately the vector for these states gets really big, for 10 qubits, the vector would have the dimension of $1024$. Since this is very inconvenient to write down, we need to look at a different solution. For this, we compose different probabilistic or quantum systems with each other. -## Constructing composite systems +## Constructing composite systems ::: {.callout-note appearance="minimal" icon=false} ::: {.definition #def-composite-systems} ## Composite systems / Tensor product -Given two probabilistic or quantum systems $A$ and $B$ with the possibilities of $A$ given by $1,\dots,N$[^1] and a distribution/state $a$ and with the possibilities of $B$ given by $1,\dots,M$ and a distribution/state $b$, the *composite* system called $AB$ has the possibilities +Given two probabilistic or quantum systems $A$ and $B$ with the possibilities of $A$ given by $1,\dots,N$[^1] and a distribution/state $\mu_a$ and with the possibilities of $B$ given by $1,\dots,M$ and a distribution/state $\mu_b$, the *composite* system called $AB$ has the possibilities $$ 11,12,\dots,1M,21,22,\dots,2M,\dots,N1,N2,\dots,NM $$ - and the distribution/state $ab$ of $AB$ is given by the *tensor product* $$ -ab= a \otimes b = \begin{pmatrix} a_1 \cdot b\\ \vdots \\ a_N \cdot b \end{pmatrix} +\mu_{ab} += \sqrt{2} \otimes \mu_b += \begin{pmatrix} \mu_{a_1} \cdot \mu_b\\ \vdots \\ \mu_{a_N} \cdot \mu_b \end{pmatrix}. $$ This vector has the size $NM$. ::: @@ -31,16 +32,22 @@ Note that the definition of combining a probabilistic and a quantum system are t ::: {.callout-tip icon=false} -## Example: Tensor product -Given two vectors $a$ and $b$, with +## Example: Composite system + +Let the distributions for the system $A$ with the possibilities $1,2$ and the system $B$ with the possibilities $A,B,C$ be given by $$ \begin{aligned} -a &= \begin{pmatrix} 1 \\ 2 \\ 4 \end{pmatrix} & b &= \begin{pmatrix} 10 \\ 100 \end{pmatrix} +\mu_a &= \begin{pmatrix} \frac{1}{\sqrt{2}} \\ -\frac{1}{\sqrt{2}} \end{pmatrix},& +\mu_b &= \begin{pmatrix} \frac{1}{2} \\ 0 \\ \frac{\sqrt{3}}{2} \end{pmatrix}. \end{aligned} $$ -the tensor product of those vectors is given by +Then the composite system $AB$ has the possibilities $1A, 1B, 1C, 2A, 2B, 2C$ and the distribution $$ -a\otimes b = \begin{pmatrix} 1 \\ 2 \\ 4 \end{pmatrix} \otimes \begin{pmatrix} 10 \\ 100 \end{pmatrix} = \begin{pmatrix} 1\cdot 10 \\ 1 \cdot 100 \\ 2\cdot 10 \\ 2 \cdot 100 \\ 4\cdot 10 \\ 4 \cdot 100 \end{pmatrix} = \begin{pmatrix} 10 \\ 100 \\ 20 \\ 200 \\ 40 \\ 400 \end{pmatrix} +\mu_{ab} += \mu_a \otimes \mu_b += \begin{pmatrix} \frac{1}{\sqrt{2}} \\ -\frac{1}{\sqrt{2}} \end{pmatrix} \otimes \begin{pmatrix} \frac{1}{\sqrt{2}} \\ 0 \\ \frac{1}{\sqrt{2}} \end{pmatrix} += \begin{pmatrix} \frac{1}{\sqrt{2}} \cdot \frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} \cdot 0 \\ \frac{1}{\sqrt{2}} \cdot \frac{1}{\sqrt{2}} \\ -\frac{1}{\sqrt{2}} \cdot \frac{1}{\sqrt{2}} \\ -\frac{1}{\sqrt{2}} \cdot 0 \\ -\frac{1}{\sqrt{2}} \cdot \frac{1}{\sqrt{2}} \end{pmatrix}. += \begin{pmatrix} \frac{1}{2} \\ 0 \\ \frac{1}{2} \\ -\frac{1}{2} \\ 0 \\ -\frac{1}{2} \end{pmatrix}. $$ ::: @@ -53,18 +60,33 @@ We now need a way to apply operators on these combined systems. For this we can ## Composite matrices / Tensor product Given two matrices $S$ and $T$ with $S$ of the size $N\times N$ and $T$ of the size $M\times M$. The tensor product $S\otimes T$ of is given by $$ -S\otimes T = \begin{pmatrix} S_{11}T & \dots & S_{1N} T\\ \vdots & \ddots & \vdots\\ S_{N1} T & \dots & S_{NN}T \end{pmatrix} +S \otimes T += \begin{pmatrix} + S_{11}T & \dots & S_{1N} T\\ + \vdots & \ddots & \vdots\\ + S_{N1} T & \dots & S_{NN}T + \end{pmatrix}. $$ ::: ::: Overall we can say: If we apply $S$ to the system $A$ and $T$ to the system $B$, we apply $S\otimes T$ to the composite system $AB$. - -If the distribution $d_{AB}$ of a given probabilistic system $AB$ can be written as a composite of two distributions $d_A$ and $d_B$, we know that $A$ and $B$ are independent of each other. If we can not write $d_{AB}$ as two septate systems, the probabilities are depended on each other. +If the distribution $d_{AB}$ of a given probabilistic system $AB$ can be written as a composite of two distributions $d_A$ and $d_B$, we know that $A$ and $B$ are independent of each other. If we cannot write $d_{AB}$ as two separate distributions, the probabilities are depended on each other. If the quantum state $\psi_{AB}$ of a given quantum system $AB$ can be written as a composite of two different quantum states $\psi_A$ and $\psi_B$, the quantum states of $A$ and $B$ are independent of each other. If we can not write $\psi_{AB}$ as a tensor product of two quantum systems, the quantum states depend on each other. We call this *entangled*. +::: {.callout-note appearance="minimal" icon=false} +::: {.lemma #lem-unitary-matrix} + +For two (unitary) matrices $A \in \mathbb{C}^{n\times n}$ and $B \in \mathbb{C}^{m \times m}$ and two vectors (quantum states) $\psi \in \mathbb{C}^n$ and $\phi \in \mathbb{C}^m$, the following applies +$$ +(A \otimes B)(\psi \otimes \phi) = A\psi \otimes B\phi. +$$ +::: +::: + + ## Measuring composite systems To perform a (partial) observation or (partial) measurement on a composite system $AB$, we can compose two separate measurements on the systems $A$ and $B$ similar as we constructed the tensor product. diff --git a/content/quantumCircutsKetNotation.qmd b/content/quantumCircuitsKetNotation.qmd similarity index 100% rename from content/quantumCircutsKetNotation.qmd rename to content/quantumCircuitsKetNotation.qmd diff --git a/index.qmd b/index.qmd index 67514afe9bafb145fb5c50df81e993b8c3524512..b8d763cb910c602b4e373deaa67cdf0ba04c874b 100644 --- a/index.qmd +++ b/index.qmd @@ -2,7 +2,7 @@ These are the lecture notes for the "Introduction to Quantum Computing" lecture held by Dominique Unruh at RWTH Aachen in the summer term 2025. They should be viewed as an addition to the handwritten notes and the lecture recordings. -The lecture notes will be updated progressively throughout the semester, following the pace of the lectures. Last year's lecture notes can be found [here](https://qis.rwth-aachen.de/teaching/24ss/intro-quantum-computing/script), but please note that they are incomplete and may differ from this years content. +The lecture notes will be updated progressively throughout the semester, following the pace of the lectures. Last year's lecture notes can be found [here](https://qis.rwth-aachen.de/teaching/24ss/intro-quantum-computing/script), but note that they are incomplete and may differ from this years content. ::: {.content-visible when-format="html:js"} <!--If you prefer a `.pdf` or `.epub` file, there is a download available at the top left corner. Please note that these files are autogenerated and some of the ebook readers have difficulties with the formulas. We are still working on a universal solution. You can also find the source code in the top left corner.--> @@ -15,6 +15,6 @@ These lecture notes are released under the CC BY-NC 4.0 license, which can be fo ## Changelog {.unnumbered} -#### 28.04.2025 -- started the lecture notes for summer 2025 -- added chapters 1 to 5 (except 4.3) +#### 30.04.2025 +- started the lecture notes for the summer term 2025 +- added chapters 1 to 6 (except 4.3)