diff --git a/_book/Introduction-to-Quantum-Computing.epub b/_book/Introduction-to-Quantum-Computing.epub index e1feede545c2dab063c59952dd0b96ec4d4fb403..458529850351a9dfa5d74dbb5d5d115cc181bef7 100644 Binary files a/_book/Introduction-to-Quantum-Computing.epub and b/_book/Introduction-to-Quantum-Computing.epub differ diff --git a/_book/Introduction-to-Quantum-Computing.pdf b/_book/Introduction-to-Quantum-Computing.pdf index 8c1536b2627a08dc5815b349161e968cf22368d6..47d35f44019b06d6e104c4270d038601f6a4a21f 100644 Binary files a/_book/Introduction-to-Quantum-Computing.pdf and b/_book/Introduction-to-Quantum-Computing.pdf differ diff --git a/_book/index.html b/_book/index.html index 62e0300c092e60ea2ce0d10e0c3a2eb1cdc29772..198927601937bdec852acc9e2964be5305fa552a 100644 --- a/_book/index.html +++ b/_book/index.html @@ -132,12 +132,35 @@ ul.task-list li input[type="checkbox"] { <span class="menu-text">Welcome</span></a> </div> </li> - <li class="sidebar-item"> + <li class="sidebar-item sidebar-item-section"> + <div class="sidebar-item-container"> + <a href="./quantumBasics.html" class="sidebar-item-text sidebar-link"> + <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" 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="./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="./quantumBasics.html" class="sidebar-item-text sidebar-link"> - <span class="menu-text"><span class="chapter-number">1</span> <span class="chapter-title">Quantum Basics</span></span></a> + <a href="./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="./quantumStates.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">3</span> <span class="chapter-title">Quantum States</span></span></a> + </div> +</li> + </ul> + </li> </ul> </div> </nav> @@ -158,7 +181,7 @@ ul.task-list li input[type="checkbox"] { <header id="title-block-header" class="quarto-title-block default"> <div class="quarto-title"> <h1 class="title">Introduction to Quantum Computing</h1> -<p class="subtitle lead">Summerterm 2024</p> +<p class="subtitle lead">Lecture notes for the summer term 2024</p> </div> @@ -184,8 +207,8 @@ 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 in the summer term 2024. The lecture notes are updated throughout the semester and should be viewed as an addition to the written notes and the lecture recordings.</p> -<p>If you prefer a <code>.pdf</code> or <code>.epub</code> file, there is a download available at the top left corner. Please note, that these files are autogenerated.</p> -<p>If you spot an error or have any suggestions, please send them to Jannik Hellenkamp.</p> +<p>If you prefer a <code>.pdf</code> or <code>.epub</code> file, there is a download available at the top left corner. Please note, that these files are autogenerated. Therefore there might be errors</p> +<p>If you spot an error or have any suggestions, please post them to the Moodle forum or send them to Jannik Hellenkamp. You can contact me by sending an e-mail to my firstname.lastname@rwth-aachen.de (please replace first and lastname with my name).</p> </section> @@ -605,7 +628,7 @@ window.document.addEventListener("DOMContentLoaded", function (event) { </div> <div class="nav-page nav-page-next"> <a href="./quantumBasics.html" class="pagination-link" aria-label="Quantum Basics"> - <span class="nav-page-text"><span class="chapter-number">1</span> <span class="chapter-title">Quantum Basics</span></span> <i class="bi bi-arrow-right-short"></i> + <span class="nav-page-text">Quantum Basics</span> <i class="bi bi-arrow-right-short"></i> </a> </div> </nav> diff --git a/_book/introduction.html b/_book/introduction.html new file mode 100644 index 0000000000000000000000000000000000000000..549109f8d517ddc21d9f4ba017d5c2cef63b6cf7 --- /dev/null +++ b/_book/introduction.html @@ -0,0 +1,701 @@ +<!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.4.553"> + +<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> + + +<title>Introduction to Quantum Computing - 1 Introduction</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="./probabilisticSystems.html" rel="next"> +<link href="./quantumBasics.html" rel="prev"> +<script src="site_libs/quarto-html/quarto.js"></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.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.min.css" rel="stylesheet" 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://polyfill.io/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"> + +<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" 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="./quantumBasics.html">Quantum Basics</a></li><li class="breadcrumb-item"><a href="./introduction.html"><span class="chapter-number">1</span> <span class="chapter-title">Introduction</span></a></li></ol></nav> + <a class="flex-grow-1" role="button" 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="" 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/j1/intro-qc/" title="Source Code" class="quarto-navigation-tool px-1" aria-label="Source Code"><i class="bi bi-git"></i></a> + <div class="dropdown"> + <a href="" title="Download" id="quarto-navigation-tool-dropdown-0" class="quarto-navigation-tool dropdown-toggle px-1" data-bs-toggle="dropdown" aria-expanded="false" aria-label="Download"><i class="bi bi-download"></i></a> + <ul class="dropdown-menu" aria-labelledby="quarto-navigation-tool-dropdown-0"> + <li> + <a class="dropdown-item sidebar-tools-main-item" href="./Introduction-to-Quantum-Computing.pdf"> + <i class="bi bi-bi-file-pdf pe-1"></i> + Download PDF + </a> + </li> + <li> + <a class="dropdown-item sidebar-tools-main-item" href="./Introduction-to-Quantum-Computing.epub"> + <i class="bi bi-bi-journal pe-1"></i> + Download ePub + </a> + </li> + </ul> + </div> +</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 href="./quantumBasics.html" class="sidebar-item-text sidebar-link"> + <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" 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="./introduction.html" class="sidebar-item-text sidebar-link active"> + <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="./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="./quantumStates.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">3</span> <span class="chapter-title">Quantum States</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="#double-slit-experiment" id="toc-double-slit-experiment" class="nav-link active" data-scroll-target="#double-slit-experiment"><span class="header-section-number">1.1</span> Double slit experiment</a></li> + <li><a href="#what-is-a-quantum-computer" id="toc-what-is-a-quantum-computer" class="nav-link" data-scroll-target="#what-is-a-quantum-computer"><span class="header-section-number">1.2</span> What is a quantum computer?</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="./quantumBasics.html">Quantum Basics</a></li><li class="breadcrumb-item"><a href="./introduction.html"><span class="chapter-number">1</span> <span class="chapter-title">Introduction</span></a></li></ol></nav> +<div class="quarto-title"> +<h1 class="title"><span class="chapter-number">1</span> <span class="chapter-title">Introduction</span></h1> +</div> + + + +<div class="quarto-title-meta"> + + + + + </div> + + + +</header> + + +<section id="double-slit-experiment" class="level2" data-number="1.1"> +<h2 data-number="1.1" class="anchored" data-anchor-id="double-slit-experiment"><span class="header-section-number">1.1</span> Double slit experiment</h2> +<p>This section will be updated later on, since there is quite a lot of graphical stuff.</p> +</section> +<section id="what-is-a-quantum-computer" class="level2" data-number="1.2"> +<h2 data-number="1.2" class="anchored" data-anchor-id="what-is-a-quantum-computer"><span class="header-section-number">1.2</span> What is a quantum computer?</h2> +<p>To start into the topic of quantum computing and to understand the differences from classical computers, we first need to look at some of the basics of such classical computers.</p> +<p>In a classical computer the information is stored in <em>bits</em> which can either have the state <span class="math inline">\(0\)</span> <em>or</em> the state <span class="math inline">\(1\)</span>. These bits can be manipulated through different classical operations and we can look at these bits and read them, without interfering with the system or changing any states.</p> +<p>In a quantum computer the information is stored in a <em>qubit</em> which is in a superposition <em>between</em> the state <span class="math inline">\(0\)</span> and <span class="math inline">\(1\)</span>. Just as with classical computers, we can construct variables from these qubits to store bigger numbers. For example a 64-<em>qu</em>bit integer would be described by 64 qubits is in a superposition between <span class="math inline">\(0\)</span> and <span class="math inline">\(2^{64}-1\)</span>. This can be imagined best as variable where the universe has not yet decided on its value and therefor the variable has all possible values at the same time.</p> +<p>We can now use this superposition and manipulate it with different quantum operations. Contrary to a classical computer, in a quantum computer these operations are “applied” at all possible input values at the same time and the result is a superposition of all possible results of the operation. We call this effect <em>quantum parallelism</em>.</p> +<div class="callout callout-style-default 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: Quantum parallelism +</div> +</div> +<div class="callout-body-container callout-body"> +<p>Let’s say you have a quantum variable <span class="math inline">\(x\)</span> in a superposition between <span class="math inline">\(0\)</span> and <span class="math inline">\(2^{64}-1\)</span> (all possible 64-bit values) and some function <span class="math inline">\(f(x)\)</span>. You program a quantum computer to compute <span class="math inline">\(f(x)\)</span>.</p> +<p>The quantum computer would compute <span class="math inline">\(f(x)\)</span> for <span class="math inline">\(x=0,x=1,x=2,...\)</span> at the the same time and the result of this computation is a superposition of all possible values <span class="math inline">\(f(x)\)</span>.</p> +</div> +</div> +<p>Reading this one might be tempted to utilize quantum parallelism run any algorithm on a quantum computer in order to optimize runtime. Unfortunately there is a big catch with quantum computers: If we try to look at the output of a qubit (also called <em>measuring</em>), the universe decides randomly on a outcome and therefore when measuring we only get the result of one computation and all the rest of the information is lost.</p> +<div class="callout callout-style-default 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 (continued): Quantum parallelism +</div> +</div> +<div class="callout-body-container callout-body"> +<p>After your quantum computer has calculated a superposition of all possible values <span class="math inline">\(f(x)\)</span>, you want to get some information on the output and therefore you do a measurement on the resulting quantum state.</p> +<p>You will receive one random <span class="math inline">\(f(x)\)</span> and all the other possible solutions are lost.</p> +</div> +</div> +<p>Due to this restriction, naively running established algorithms on a quantum computer will not work. Fortunately there are some clever tricks to create some “interference” between different computations before measuring. This will give use useful information in some cases.</p> + + +</section> + +</main> <!-- /main --> +<script id="quarto-html-after-body" type="application/javascript"> +window.document.addEventListener("DOMContentLoaded", function (event) { + const toggleBodyColorMode = (bsSheetEl) => { + const mode = bsSheetEl.getAttribute("data-mode"); + const bodyEl = window.document.querySelector("body"); + if (mode === "dark") { + bodyEl.classList.add("quarto-dark"); + bodyEl.classList.remove("quarto-light"); + } else { + bodyEl.classList.add("quarto-light"); + bodyEl.classList.remove("quarto-dark"); + } + } + const toggleBodyColorPrimary = () => { + const bsSheetEl = window.document.querySelector("link#quarto-bootstrap"); + if (bsSheetEl) { + toggleBodyColorMode(bsSheetEl); + } + } + toggleBodyColorPrimary(); + 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 clipboard = new window.ClipboardJS('.code-copy-button', { + text: function(trigger) { + const codeEl = trigger.previousElementSibling.cloneNode(true); + for (const childEl of codeEl.children) { + if (isCodeAnnotation(childEl)) { + childEl.remove(); + } + } + return codeEl.innerText; + } + }); + clipboard.on('success', 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(); + }); + var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//); + var mailtoRegex = new RegExp(/^mailto:/); + var filterRegex = new RegExp("http:\/\/qis\.rwth-aachen\.de\/"); + 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)'); + 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); + } + // TODO in 1.5, we should make sure this works without a callout special case + 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="./quantumBasics.html" class="pagination-link" aria-label="Quantum Basics"> + <i class="bi bi-arrow-left-short"></i> <span class="nav-page-text">Quantum Basics</span> + </a> + </div> + <div class="nav-page nav-page-next"> + <a href="./probabilisticSystems.html" class="pagination-link" aria-label="Probabilistic systems"> + <span class="nav-page-text"><span class="chapter-number">2</span> <span class="chapter-title">Probabilistic systems</span></span> <i class="bi bi-arrow-right-short"></i> + </a> + </div> +</nav> +</div> <!-- /content --> + + + + +</body></html> \ No newline at end of file diff --git a/_book/probabilisticSystems.html b/_book/probabilisticSystems.html new file mode 100644 index 0000000000000000000000000000000000000000..8c37793b621352e75b62964ce95b11251bbd9af5 --- /dev/null +++ b/_book/probabilisticSystems.html @@ -0,0 +1,641 @@ +<!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.4.553"> + +<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> + + +<title>Introduction to Quantum Computing - 2 Probabilistic systems</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="./quantumStates.html" rel="next"> +<link href="./introduction.html" rel="prev"> +<script src="site_libs/quarto-html/quarto.js"></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.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.min.css" rel="stylesheet" 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> + + +</head> + +<body class="nav-sidebar floating"> + +<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" 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="./quantumBasics.html">Quantum Basics</a></li><li class="breadcrumb-item"><a href="./probabilisticSystems.html"><span class="chapter-number">2</span> <span class="chapter-title">Probabilistic systems</span></a></li></ol></nav> + <a class="flex-grow-1" role="button" 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="" 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/j1/intro-qc/" title="Source Code" class="quarto-navigation-tool px-1" aria-label="Source Code"><i class="bi bi-git"></i></a> + <div class="dropdown"> + <a href="" title="Download" id="quarto-navigation-tool-dropdown-0" class="quarto-navigation-tool dropdown-toggle px-1" data-bs-toggle="dropdown" aria-expanded="false" aria-label="Download"><i class="bi bi-download"></i></a> + <ul class="dropdown-menu" aria-labelledby="quarto-navigation-tool-dropdown-0"> + <li> + <a class="dropdown-item sidebar-tools-main-item" href="./Introduction-to-Quantum-Computing.pdf"> + <i class="bi bi-bi-file-pdf pe-1"></i> + Download PDF + </a> + </li> + <li> + <a class="dropdown-item sidebar-tools-main-item" href="./Introduction-to-Quantum-Computing.epub"> + <i class="bi bi-bi-journal pe-1"></i> + Download ePub + </a> + </li> + </ul> + </div> +</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 href="./quantumBasics.html" class="sidebar-item-text sidebar-link"> + <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" 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="./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="./probabilisticSystems.html" class="sidebar-item-text sidebar-link active"> + <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="./quantumStates.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">3</span> <span class="chapter-title">Quantum States</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="#deterministic-possibilities" id="toc-deterministic-possibilities" class="nav-link active" data-scroll-target="#deterministic-possibilities"><span class="header-section-number">2.1</span> Deterministic possibilities</a></li> + <li><a href="#probability-distribution" id="toc-probability-distribution" class="nav-link" data-scroll-target="#probability-distribution"><span class="header-section-number">2.2</span> Probability distribution</a></li> + <li><a href="#probabilistic-processes" id="toc-probabilistic-processes" class="nav-link" data-scroll-target="#probabilistic-processes"><span class="header-section-number">2.3</span> Probabilistic processes</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="./quantumBasics.html">Quantum Basics</a></li><li class="breadcrumb-item"><a href="./probabilisticSystems.html"><span class="chapter-number">2</span> <span class="chapter-title">Probabilistic systems</span></a></li></ol></nav> +<div class="quarto-title"> +<h1 class="title"><span class="chapter-number">2</span> <span class="chapter-title">Probabilistic systems</span></h1> +</div> + + + +<div class="quarto-title-meta"> + + + + + </div> + + + +</header> + + +<section id="deterministic-possibilities" class="level2" data-number="2.1"> +<h2 data-number="2.1" class="anchored" data-anchor-id="deterministic-possibilities"><span class="header-section-number">2.1</span> Deterministic possibilities</h2> +</section> +<section id="probability-distribution" class="level2" data-number="2.2"> +<h2 data-number="2.2" class="anchored" data-anchor-id="probability-distribution"><span class="header-section-number">2.2</span> Probability distribution</h2> +</section> +<section id="probabilistic-processes" class="level2" data-number="2.3"> +<h2 data-number="2.3" class="anchored" data-anchor-id="probabilistic-processes"><span class="header-section-number">2.3</span> Probabilistic processes</h2> + + +</section> + +</main> <!-- /main --> +<script id="quarto-html-after-body" type="application/javascript"> +window.document.addEventListener("DOMContentLoaded", function (event) { + const toggleBodyColorMode = (bsSheetEl) => { + const mode = bsSheetEl.getAttribute("data-mode"); + const bodyEl = window.document.querySelector("body"); + if (mode === "dark") { + bodyEl.classList.add("quarto-dark"); + bodyEl.classList.remove("quarto-light"); + } else { + bodyEl.classList.add("quarto-light"); + bodyEl.classList.remove("quarto-dark"); + } + } + const toggleBodyColorPrimary = () => { + const bsSheetEl = window.document.querySelector("link#quarto-bootstrap"); + if (bsSheetEl) { + toggleBodyColorMode(bsSheetEl); + } + } + toggleBodyColorPrimary(); + 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 clipboard = new window.ClipboardJS('.code-copy-button', { + text: function(trigger) { + const codeEl = trigger.previousElementSibling.cloneNode(true); + for (const childEl of codeEl.children) { + if (isCodeAnnotation(childEl)) { + childEl.remove(); + } + } + return codeEl.innerText; + } + }); + clipboard.on('success', 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(); + }); + var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//); + var mailtoRegex = new RegExp(/^mailto:/); + var filterRegex = new RegExp("http:\/\/qis\.rwth-aachen\.de\/"); + 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)'); + 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); + } + // TODO in 1.5, we should make sure this works without a callout special case + 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="./introduction.html" class="pagination-link" aria-label="Introduction"> + <i class="bi bi-arrow-left-short"></i> <span class="nav-page-text"><span class="chapter-number">1</span> <span class="chapter-title">Introduction</span></span> + </a> + </div> + <div class="nav-page nav-page-next"> + <a href="./quantumStates.html" class="pagination-link" aria-label="Quantum States"> + <span class="nav-page-text"><span class="chapter-number">3</span> <span class="chapter-title">Quantum States</span></span> <i class="bi bi-arrow-right-short"></i> + </a> + </div> +</nav> +</div> <!-- /content --> + + + + +</body></html> \ No newline at end of file diff --git a/_book/quantumBasics.html b/_book/quantumBasics.html index bde6d87407e37de6281a161832c0256ba4d5e550..0b55b459d43013ac192411df835dd330c08a5151 100644 --- a/_book/quantumBasics.html +++ b/_book/quantumBasics.html @@ -7,7 +7,7 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> -<title>Introduction to Quantum Computing - 1 Quantum Basics</title> +<title>Introduction to Quantum Computing - Quantum Basics</title> <style> code{white-space: pre-wrap;} span.smallcaps{font-variant: small-caps;} @@ -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="./introduction.html" rel="next"> <link href="./index.html" rel="prev"> <script src="site_libs/quarto-html/quarto.js"></script> <script src="site_libs/quarto-html/popper.min.js"></script> @@ -68,35 +69,6 @@ ul.task-list li input[type="checkbox"] { } }</script> - <script src="https://polyfill.io/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> @@ -109,7 +81,7 @@ window.Quarto = { <button type="button" class="quarto-btn-toggle btn" 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(); }"> <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="./quantumBasics.html"><span class="chapter-number">1</span> <span class="chapter-title">Quantum Basics</span></a></li></ol></nav> + <nav class="quarto-page-breadcrumbs" aria-label="breadcrumb"><ol class="breadcrumb"><li class="breadcrumb-item"><a href="./quantumBasics.html">Quantum Basics</a></li></ol></nav> <a class="flex-grow-1" role="button" 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="" onclick="window.quartoOpenSearch();"> @@ -160,34 +132,49 @@ window.Quarto = { <span class="menu-text">Welcome</span></a> </div> </li> - <li class="sidebar-item"> + <li class="sidebar-item sidebar-item-section"> + <div class="sidebar-item-container"> + <a href="./quantumBasics.html" class="sidebar-item-text sidebar-link active"> + <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" 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="./quantumBasics.html" class="sidebar-item-text sidebar-link active"> - <span class="menu-text"><span class="chapter-number">1</span> <span class="chapter-title">Quantum Basics</span></span></a> + <a href="./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="./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="./quantumStates.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">3</span> <span class="chapter-title">Quantum States</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="#double-slit-experiment" id="toc-double-slit-experiment" class="nav-link active" data-scroll-target="#double-slit-experiment"><span class="header-section-number">1.1</span> Double slit experiment</a></li> - <li><a href="#what-is-a-quantum-computer" id="toc-what-is-a-quantum-computer" class="nav-link" data-scroll-target="#what-is-a-quantum-computer"><span class="header-section-number">1.2</span> What is a quantum computer?</a></li> - <li><a href="#quantum-states" id="toc-quantum-states" class="nav-link" data-scroll-target="#quantum-states"><span class="header-section-number">1.3</span> Quantum States</a></li> - </ul> -</nav> + </div> <!-- main --> <main class="content" id="quarto-document-content"> <header id="title-block-header" class="quarto-title-block default"> <div class="quarto-title"> -<h1 class="title"><span class="chapter-number">1</span> <span class="chapter-title">Quantum Basics</span></h1> +<h1 class="title">Quantum Basics</h1> </div> @@ -204,24 +191,8 @@ window.Quarto = { </header> -<section id="double-slit-experiment" class="level2" data-number="1.1"> -<h2 data-number="1.1" class="anchored" data-anchor-id="double-slit-experiment"><span class="header-section-number">1.1</span> Double slit experiment</h2> -<p>This section will be updated later on, since there is quite a lot of graphical stuff.</p> -</section> -<section id="what-is-a-quantum-computer" class="level2" data-number="1.2"> -<h2 data-number="1.2" class="anchored" data-anchor-id="what-is-a-quantum-computer"><span class="header-section-number">1.2</span> What is a quantum computer?</h2> -<p>To start into the topic of quantum computing and to understand the differences from classical computers, we first need to look at some of the basics of such classical computers.</p> -<p>In a classical computer the information is stored in <em>bits</em> which can either have the state <span class="math inline">\(0\)</span> <strong>or</strong> the state <span class="math inline">\(1\)</span>. These bits can be manipulated through different operations and we can look at these bits and read them, without interfering with the system or changing any states.</p> -<p>In a quantum computer the information is stored in a <em>qubit</em> which is in a superposition <strong>between</strong> the state <span class="math inline">\(0\)</span> and <span class="math inline">\(1\)</span>. Just as with classical computers, we can construct variables from these qubits to store bigger numbers. For example a 64-<em>qu</em>bit integer would be described by 64 qubits is in a superposition between <span class="math inline">\(0\)</span> and <span class="math inline">\(2^{64}-1\)</span>.</p> -</section> -<section id="quantum-states" class="level2" data-number="1.3"> -<h2 data-number="1.3" class="anchored" data-anchor-id="quantum-states"><span class="header-section-number">1.3</span> Quantum States</h2> -<div id="def-example" class="definition theorem"> -<p><span class="theorem-title"><strong>Definition 1.1 (Quantum State)</strong></span> A quantum state is a vector <span class="math inline">\(\ket{\psi} \in \mathbb{C}^n\)</span> with <span class="math inline">\(\sqrt{\sum |\psi|^2} = 1\)</span></p> -</div> -</section> </main> <!-- /main --> <script id="quarto-html-after-body" type="application/javascript"> @@ -640,6 +611,9 @@ window.document.addEventListener("DOMContentLoaded", function (event) { </a> </div> <div class="nav-page nav-page-next"> + <a href="./introduction.html" class="pagination-link" aria-label="Introduction"> + <span class="nav-page-text"><span class="chapter-number">1</span> <span class="chapter-title">Introduction</span></span> <i class="bi bi-arrow-right-short"></i> + </a> </div> </nav> </div> <!-- /content --> diff --git a/_book/quantumStates.html b/_book/quantumStates.html new file mode 100644 index 0000000000000000000000000000000000000000..eb806b7eb08a34b8e838ebfe4b24dbea07f32e4f --- /dev/null +++ b/_book/quantumStates.html @@ -0,0 +1,652 @@ +<!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.4.553"> + +<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> + + +<title>Introduction to Quantum Computing - 3 Quantum States</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="./probabilisticSystems.html" rel="prev"> +<script src="site_libs/quarto-html/quarto.js"></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.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.min.css" rel="stylesheet" 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://polyfill.io/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"> + +<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" 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="./quantumBasics.html">Quantum Basics</a></li><li class="breadcrumb-item"><a href="./quantumStates.html"><span class="chapter-number">3</span> <span class="chapter-title">Quantum States</span></a></li></ol></nav> + <a class="flex-grow-1" role="button" 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="" 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/j1/intro-qc/" title="Source Code" class="quarto-navigation-tool px-1" aria-label="Source Code"><i class="bi bi-git"></i></a> + <div class="dropdown"> + <a href="" title="Download" id="quarto-navigation-tool-dropdown-0" class="quarto-navigation-tool dropdown-toggle px-1" data-bs-toggle="dropdown" aria-expanded="false" aria-label="Download"><i class="bi bi-download"></i></a> + <ul class="dropdown-menu" aria-labelledby="quarto-navigation-tool-dropdown-0"> + <li> + <a class="dropdown-item sidebar-tools-main-item" href="./Introduction-to-Quantum-Computing.pdf"> + <i class="bi bi-bi-file-pdf pe-1"></i> + Download PDF + </a> + </li> + <li> + <a class="dropdown-item sidebar-tools-main-item" href="./Introduction-to-Quantum-Computing.epub"> + <i class="bi bi-bi-journal pe-1"></i> + Download ePub + </a> + </li> + </ul> + </div> +</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 href="./quantumBasics.html" class="sidebar-item-text sidebar-link"> + <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" 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="./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="./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="./quantumStates.html" class="sidebar-item-text sidebar-link active"> + <span class="menu-text"><span class="chapter-number">3</span> <span class="chapter-title">Quantum States</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"> + + </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="./quantumBasics.html">Quantum Basics</a></li><li class="breadcrumb-item"><a href="./quantumStates.html"><span class="chapter-number">3</span> <span class="chapter-title">Quantum States</span></a></li></ol></nav> +<div class="quarto-title"> +<h1 class="title"><span class="chapter-number">3</span> <span class="chapter-title">Quantum States</span></h1> +</div> + + + +<div class="quarto-title-meta"> + + + + + </div> + + + +</header> + + +<div id="def-quantum-state" class="definition theorem"> +<p><span class="theorem-title"><strong>Definition 3.1 (Quantum State)</strong></span> A quantum state is a vector <span class="math inline">\(\ket{\psi} \in \mathbb{C}^n\)</span> with <span class="math inline">\(\sqrt{\sum |\psi|^2} = 1\)</span></p> +</div> + + + +</main> <!-- /main --> +<script id="quarto-html-after-body" type="application/javascript"> +window.document.addEventListener("DOMContentLoaded", function (event) { + const toggleBodyColorMode = (bsSheetEl) => { + const mode = bsSheetEl.getAttribute("data-mode"); + const bodyEl = window.document.querySelector("body"); + if (mode === "dark") { + bodyEl.classList.add("quarto-dark"); + bodyEl.classList.remove("quarto-light"); + } else { + bodyEl.classList.add("quarto-light"); + bodyEl.classList.remove("quarto-dark"); + } + } + const toggleBodyColorPrimary = () => { + const bsSheetEl = window.document.querySelector("link#quarto-bootstrap"); + if (bsSheetEl) { + toggleBodyColorMode(bsSheetEl); + } + } + toggleBodyColorPrimary(); + 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 clipboard = new window.ClipboardJS('.code-copy-button', { + text: function(trigger) { + const codeEl = trigger.previousElementSibling.cloneNode(true); + for (const childEl of codeEl.children) { + if (isCodeAnnotation(childEl)) { + childEl.remove(); + } + } + return codeEl.innerText; + } + }); + clipboard.on('success', 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(); + }); + var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//); + var mailtoRegex = new RegExp(/^mailto:/); + var filterRegex = new RegExp("http:\/\/qis\.rwth-aachen\.de\/"); + 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)'); + 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); + } + // TODO in 1.5, we should make sure this works without a callout special case + 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="./probabilisticSystems.html" class="pagination-link" aria-label="Probabilistic systems"> + <i class="bi bi-arrow-left-short"></i> <span class="nav-page-text"><span class="chapter-number">2</span> <span class="chapter-title">Probabilistic 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/search.json b/_book/search.json index d92044e32a4ad81613ab395f511d8a6e052a3f08..0c0ca2ea1cc0a4222a2400c85884e45ec304854e 100644 --- a/_book/search.json +++ b/_book/search.json @@ -4,39 +4,75 @@ "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 in the summer term 2024. The lecture notes are updated throughout the semester and should be viewed as an addition to the written notes and the lecture recordings.\nIf you prefer a .pdf or .epub file, there is a download available at the top left corner. Please note, that these files are autogenerated.\nIf you spot an error or have any suggestions, please send them to Jannik Hellenkamp.", + "text": "Welcome\nThese are the lecture notes for the “Introduction to Quantum Computing” lecture held by Dominique Unruh in the summer term 2024. The lecture notes are updated throughout the semester and should be viewed as an addition to the written notes and the lecture recordings.\nIf you prefer a .pdf or .epub file, there is a download available at the top left corner. Please note, that these files are autogenerated. Therefore there might be errors\nIf you spot an error or have any suggestions, please post them to the Moodle forum or send them to Jannik Hellenkamp. You can contact me by sending an e-mail to my firstname.lastname@rwth-aachen.de (please replace first and lastname with my name).", "crumbs": [ "Welcome" ] }, { - "objectID": "quantumBasics.html", - "href": "quantumBasics.html", - "title": "1 Quantum Basics", + "objectID": "introduction.html", + "href": "introduction.html", + "title": "1 Introduction", "section": "", "text": "1.1 Double slit experiment\nThis section will be updated later on, since there is quite a lot of graphical stuff.", "crumbs": [ - "<span class='chapter-number'>1</span> <span class='chapter-title'>Quantum Basics</span>" + "Quantum Basics", + "<span class='chapter-number'>1</span> <span class='chapter-title'>Introduction</span>" ] }, { - "objectID": "quantumBasics.html#what-is-a-quantum-computer", - "href": "quantumBasics.html#what-is-a-quantum-computer", - "title": "1 Quantum Basics", + "objectID": "introduction.html#what-is-a-quantum-computer", + "href": "introduction.html#what-is-a-quantum-computer", + "title": "1 Introduction", "section": "1.2 What is a quantum computer?", - "text": "1.2 What is a quantum computer?\nTo start into the topic of quantum computing and to understand the differences from classical computers, we first need to look at some of the basics of such classical computers.\nIn a classical computer the information is stored in bits which can either have the state \\(0\\) or the state \\(1\\). These bits can be manipulated through different operations and we can look at these bits and read them, without interfering with the system or changing any states.\nIn a quantum computer the information is stored in a qubit which is in a superposition between the state \\(0\\) and \\(1\\). Just as with classical computers, we can construct variables from these qubits to store bigger numbers. For example a 64-qubit integer would be described by 64 qubits is in a superposition between \\(0\\) and \\(2^{64}-1\\).", + "text": "1.2 What is a quantum computer?\nTo start into the topic of quantum computing and to understand the differences from classical computers, we first need to look at some of the basics of such classical computers.\nIn a classical computer the information is stored in bits which can either have the state \\(0\\) or the state \\(1\\). These bits can be manipulated through different classical operations and we can look at these bits and read them, without interfering with the system or changing any states.\nIn a quantum computer the information is stored in a qubit which is in a superposition between the state \\(0\\) and \\(1\\). Just as with classical computers, we can construct variables from these qubits to store bigger numbers. For example a 64-qubit integer would be described by 64 qubits is in a superposition between \\(0\\) and \\(2^{64}-1\\). This can be imagined best as variable where the universe has not yet decided on its value and therefor the variable has all possible values at the same time.\nWe can now use this superposition and manipulate it with different quantum operations. Contrary to a classical computer, in a quantum computer these operations are “applied” at all possible input values at the same time and the result is a superposition of all possible results of the operation. We call this effect quantum parallelism.\n\n\n\n\n\n\nExample: Quantum parallelism\n\n\n\nLet’s say you have a quantum variable \\(x\\) in a superposition between \\(0\\) and \\(2^{64}-1\\) (all possible 64-bit values) and some function \\(f(x)\\). You program a quantum computer to compute \\(f(x)\\).\nThe quantum computer would compute \\(f(x)\\) for \\(x=0,x=1,x=2,...\\) at the the same time and the result of this computation is a superposition of all possible values \\(f(x)\\).\n\n\nReading this one might be tempted to utilize quantum parallelism run any algorithm on a quantum computer in order to optimize runtime. Unfortunately there is a big catch with quantum computers: If we try to look at the output of a qubit (also called measuring), the universe decides randomly on a outcome and therefore when measuring we only get the result of one computation and all the rest of the information is lost.\n\n\n\n\n\n\nExample (continued): Quantum parallelism\n\n\n\nAfter your quantum computer has calculated a superposition of all possible values \\(f(x)\\), you want to get some information on the output and therefore you do a measurement on the resulting quantum state.\nYou will receive one random \\(f(x)\\) and all the other possible solutions are lost.\n\n\nDue to this restriction, naively running established algorithms on a quantum computer will not work. Fortunately there are some clever tricks to create some “interference” between different computations before measuring. This will give use useful information in some cases.", "crumbs": [ - "<span class='chapter-number'>1</span> <span class='chapter-title'>Quantum Basics</span>" + "Quantum Basics", + "<span class='chapter-number'>1</span> <span class='chapter-title'>Introduction</span>" ] }, { - "objectID": "quantumBasics.html#quantum-states", - "href": "quantumBasics.html#quantum-states", - "title": "1 Quantum Basics", - "section": "1.3 Quantum States", - "text": "1.3 Quantum States\n\nDefinition 1.1 (Quantum State) A quantum state is a vector \\(\\ket{\\psi} \\in \\mathbb{C}^n\\) with \\(\\sqrt{\\sum |\\psi|^2} = 1\\)", + "objectID": "probabilisticSystems.html", + "href": "probabilisticSystems.html", + "title": "2 Probabilistic systems", + "section": "", + "text": "2.1 Deterministic possibilities", + "crumbs": [ + "Quantum Basics", + "<span class='chapter-number'>2</span> <span class='chapter-title'>Probabilistic systems</span>" + ] + }, + { + "objectID": "probabilisticSystems.html#probability-distribution", + "href": "probabilisticSystems.html#probability-distribution", + "title": "2 Probabilistic systems", + "section": "2.2 Probability distribution", + "text": "2.2 Probability distribution", + "crumbs": [ + "Quantum Basics", + "<span class='chapter-number'>2</span> <span class='chapter-title'>Probabilistic systems</span>" + ] + }, + { + "objectID": "probabilisticSystems.html#probabilistic-processes", + "href": "probabilisticSystems.html#probabilistic-processes", + "title": "2 Probabilistic systems", + "section": "2.3 Probabilistic processes", + "text": "2.3 Probabilistic processes", + "crumbs": [ + "Quantum Basics", + "<span class='chapter-number'>2</span> <span class='chapter-title'>Probabilistic systems</span>" + ] + }, + { + "objectID": "quantumStates.html", + "href": "quantumStates.html", + "title": "3 Quantum States", + "section": "", + "text": "Definition 3.1 (Quantum State) A quantum state is a vector \\(\\ket{\\psi} \\in \\mathbb{C}^n\\) with \\(\\sqrt{\\sum |\\psi|^2} = 1\\)", "crumbs": [ - "<span class='chapter-number'>1</span> <span class='chapter-title'>Quantum Basics</span>" + "Quantum Basics", + "<span class='chapter-number'>3</span> <span class='chapter-title'>Quantum States</span>" ] } ] \ No newline at end of file diff --git a/_book/sitemap.xml b/_book/sitemap.xml index 260219799aae8cfc918751b5e162427374fbf39e..c25f90abf64eec06f27e6a19eeae8c9feea588b2 100644 --- a/_book/sitemap.xml +++ b/_book/sitemap.xml @@ -2,18 +2,30 @@ <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>http://qis.rwth-aachen.de/index.html</loc> - <lastmod>2024-04-29T17:32:27.679Z</lastmod> + <lastmod>2024-04-29T22:45:27.798Z</lastmod> </url> <url> <loc>http://qis.rwth-aachen.de/quantumBasics.html</loc> - <lastmod>2024-04-29T17:26:34.262Z</lastmod> + <lastmod>2024-04-30T00:46:11.925Z</lastmod> + </url> + <url> + <loc>http://qis.rwth-aachen.de/introduction.html</loc> + <lastmod>2024-04-30T00:44:44.532Z</lastmod> + </url> + <url> + <loc>http://qis.rwth-aachen.de/probabilisticSystems.html</loc> + <lastmod>2024-04-30T00:45:41.056Z</lastmod> + </url> + <url> + <loc>http://qis.rwth-aachen.de/quantumStates.html</loc> + <lastmod>2024-04-30T00:46:10.383Z</lastmod> </url> <url> <loc>http://qis.rwth-aachen.de/Introduction-to-Quantum-Computing.pdf</loc> - <lastmod>2024-04-29T20:16:18.558Z</lastmod> + <lastmod>2024-04-30T00:50:32.284Z</lastmod> </url> <url> <loc>http://qis.rwth-aachen.de/Introduction-to-Quantum-Computing.epub</loc> - <lastmod>2024-04-29T20:16:19.092Z</lastmod> + <lastmod>2024-04-30T00:50:32.745Z</lastmod> </url> </urlset> diff --git a/_quarto.yml b/_quarto.yml index 6f5bec428f90787803e06e65e113a974289e670a..e7ff111773d4f2dc7cdab80fc4ab431091d3ea83 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -3,7 +3,7 @@ project: book: title: "Introduction to Quantum Computing" - subtitle: "Summerterm 2024" + subtitle: "Lecture notes for the summer term 2024" author: "Jannik Hellenkamp" downloads: [pdf, epub] search: true @@ -13,7 +13,11 @@ book: image: tmp-cover.png chapters: - index.qmd - - quantumBasics.qmd + - part: quantumBasics.qmd + chapters: + - introduction.qmd + - probabilisticSystems.qmd + - quantumStates.qmd bibliography: references.bib @@ -26,5 +30,4 @@ format: text: | \usepackage{physics} epub: - toc: true - html-math-method: gladtex \ No newline at end of file + toc: true \ No newline at end of file diff --git a/index.qmd b/index.qmd index 74353b1a7a4a3aa990a10963933a7951c087299f..a4e7589f49583937e6f22066a0921fcb0bc90fe1 100644 --- a/index.qmd +++ b/index.qmd @@ -3,7 +3,7 @@ These are the lecture notes for the "Introduction to Quantum Computing" lecture held by Dominique Unruh in the summer term 2024. The lecture notes are updated throughout the semester and should be viewed as an addition to the written notes and the lecture recordings. ::: {.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. +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. Therefore there might be errors ::: -If you spot an error or have any suggestions, please send them to Jannik Hellenkamp. +If you spot an error or have any suggestions, please post them to the Moodle forum or send them to Jannik Hellenkamp. You can contact me by sending an e-mail to my firstname.lastname\@rwth-aachen.de (please replace first and lastname with my name). diff --git a/introduction.qmd b/introduction.qmd new file mode 100644 index 0000000000000000000000000000000000000000..3b567d7f048a7b95ef87459e7895b12b3b68a02f --- /dev/null +++ b/introduction.qmd @@ -0,0 +1,39 @@ +# Introduction + +## Double slit experiment + +This section will be updated later on, since there is quite a lot of graphical stuff. + +## What is a quantum computer? + +To start into the topic of quantum computing and to understand the differences from classical computers, we first need to look at some of the basics of such classical computers. + +In a classical computer the information is stored in *bits* which can either have the state $0$ *or* the state $1$. These bits can be manipulated through different classical operations and we can look at these bits and read them, without interfering with the system or changing any states. + +In a quantum computer the information is stored in a *qubit* which is in a superposition *between* the state $0$ and $1$. Just as with classical computers, we can construct variables from these qubits to store bigger numbers. For example a 64-*qu*bit integer would be described by 64 qubits is in a superposition between $0$ and $2^{64}-1$. This can be imagined best as variable where the universe has not yet decided on its value and therefor the variable has all possible values at the same time. + +We can now use this superposition and manipulate it with different quantum operations. Contrary to a classical computer, in a quantum computer these operations are "applied" at all possible input values at the same time and the result is a superposition of all possible results of the operation. We call this effect *quantum parallelism*. + +::: {.callout-tip icon=false} + +## Example: Quantum parallelism + +Let's say you have a quantum variable $x$ in a superposition between $0$ and $2^{64}-1$ (all possible 64-bit values) and some function $f(x)$. You program a quantum computer to compute $f(x)$. + +The quantum computer would compute $f(x)$ for $x=0,x=1,x=2,...$ at the the same time and the result of this computation is a superposition of all possible values $f(x)$. + +::: + +Reading this one might be tempted to utilize quantum parallelism run any algorithm on a quantum computer in order to optimize runtime. Unfortunately there is a big catch with quantum computers: If we try to look at the output of a qubit (also called *measuring*), the universe decides randomly on a outcome and therefore when measuring we only get the result of one computation and all the rest of the information is lost. + +::: {.callout-tip icon=false} + +## Example (continued): Quantum parallelism + +After your quantum computer has calculated a superposition of all possible values $f(x)$, you want to get some information on the output and therefore you do a measurement on the resulting quantum state. + +You will receive one random $f(x)$ and all the other possible solutions are lost. + +::: + +Due to this restriction, naively running established algorithms on a quantum computer will not work. Fortunately there are some clever tricks to create some "interference" between different computations before measuring. This will give use useful information in some cases. diff --git a/probabilisticSystems.qmd b/probabilisticSystems.qmd new file mode 100644 index 0000000000000000000000000000000000000000..07e65ef4d2f43bd9eea775055b2f615357f96bb3 --- /dev/null +++ b/probabilisticSystems.qmd @@ -0,0 +1,7 @@ +# Probabilistic systems + +## Deterministic possibilities + +## Probability distribution + +## Probabilistic processes \ No newline at end of file diff --git a/quantumBasics.qmd b/quantumBasics.qmd index a4b4398b1f30e1b9e371c3293c07b9056bc6691b..80b942250958483ad2849d3a1401d06a79fe2c33 100644 --- a/quantumBasics.qmd +++ b/quantumBasics.qmd @@ -1,21 +1,4 @@ # Quantum Basics -## Double slit experiment -This section will be updated later on, since there is quite a lot of graphical stuff. -## What is a quantum computer? - -To start into the topic of quantum computing and to understand the differences from classical computers, we first need to look at some of the basics of such classical computers. - -In a classical computer the information is stored in *bits* which can either have the state $0$ **or** the state $1$. These bits can be manipulated through different operations and we can look at these bits and read them, without interfering with the system or changing any states. - -In a quantum computer the information is stored in a *qubit* which is in a superposition **between** the state $0$ and $1$. Just as with classical computers, we can construct variables from these qubits to store bigger numbers. For example a 64-*qu*bit integer would be described by 64 qubits is in a superposition between $0$ and $2^{64}-1$. - -## Quantum States -::: {.definition #def-example} - -## Quantum State - -A quantum state is a vector $\ket{\psi} \in \mathbb{C}^n$ with $\sqrt{\sum |\psi|^2} = 1$ -::: diff --git a/quantumStates.qmd b/quantumStates.qmd new file mode 100644 index 0000000000000000000000000000000000000000..f36ea566560cb68256b87dfdb9109a3d64cbd629 --- /dev/null +++ b/quantumStates.qmd @@ -0,0 +1,7 @@ +## Quantum States +::: {.definition #def-quantum-state} + +## Quantum State + +A quantum state is a vector $\ket{\psi} \in \mathbb{C}^n$ with $\sqrt{\sum |\psi|^2} = 1$ +::: \ No newline at end of file