diff --git a/_book/Introduction-to-Quantum-Computing.epub b/_book/Introduction-to-Quantum-Computing.epub
deleted file mode 100644
index 52f85e6cd739967f40d7f3f80e69530ae4c49d8e..0000000000000000000000000000000000000000
Binary files a/_book/Introduction-to-Quantum-Computing.epub and /dev/null differ
diff --git a/_book/Introduction-to-Quantum-Computing.pdf b/_book/Introduction-to-Quantum-Computing.pdf
deleted file mode 100644
index 5f2166183103d62f4c0e23370b6864c911d79021..0000000000000000000000000000000000000000
Binary files a/_book/Introduction-to-Quantum-Computing.pdf and /dev/null differ
diff --git a/_book/robots.txt b/_book/robots.txt
deleted file mode 100644
index 44431c1463cc93536fe57776b8ae8129d1fb2448..0000000000000000000000000000000000000000
--- a/_book/robots.txt
+++ /dev/null
@@ -1 +0,0 @@
-Sitemap: https://qis.rwth-aachen.de/teaching/24ss/intro-quantum-computing/script/sitemap.xml
diff --git a/_book/search.json b/_book/search.json
deleted file mode 100644
index 9da50d9c4301dc5487fab2de2099a076e53a9efa..0000000000000000000000000000000000000000
--- a/_book/search.json
+++ /dev/null
@@ -1,88 +0,0 @@
-[
-  {
-    "objectID": "index.html",
-    "href": "index.html",
-    "title": "Introduction to Quantum Computing",
-    "section": "",
-    "text": "Welcome\nThese are the lecture notes for the “Introduction to Quantum Computing” lecture held by Dominique Unruh at RWTH Aachen in the summer term 2024. The lecture notes are updated throughout the semester and should be viewed as an addition to the handwritten 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 and some of the ebook readers have difficulties with the formulas. We are still working on a universal solution. You can also find the source code in the top left corner.\nIf you spot an error, please send Jannik Hellenkamp an e-mail. You can contact Jannik by sending an e-mail to firstname.lastname@rwth-aachen.de (please replace first and lastname with Jannik’s full name). If you have a question of understanding, please ask it in the Moodle forum.\nThese lecture notes are released under the CC BY-NC 4.0 license, which can be found here.",
-    "crumbs": [
-      "Welcome"
-    ]
-  },
-  {
-    "objectID": "index.html#changelog",
-    "href": "index.html#changelog",
-    "title": "Introduction to Quantum Computing",
-    "section": "Changelog",
-    "text": "Changelog\n\nVersion 0.1.1 (16.05.2024)\n\nStarted the lecture notes.",
-    "crumbs": [
-      "Welcome"
-    ]
-  },
-  {
-    "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": [
-      "Quantum Basics",
-      "<span class='chapter-number'>1</span>  <span class='chapter-title'>Introduction</span>"
-    ]
-  },
-  {
-    "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 be in 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 can be 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 which are in a superposition between \\(0\\) and \\(2^{64}-1\\). This can be imagined best as a variable where the universe has not yet decided on its value and therefore 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 of numbers 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 to 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 state of a qubit (also called measuring), the universe decides randomly on an 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 us useful information in some cases.",
-    "crumbs": [
-      "Quantum Basics",
-      "<span class='chapter-number'>1</span>  <span class='chapter-title'>Introduction</span>"
-    ]
-  },
-  {
-    "objectID": "probabilisticSystems.html",
-    "href": "probabilisticSystems.html",
-    "title": "2  Probabilistic systems",
-    "section": "",
-    "text": "2.1 Deterministic possibilities\nAt first we need to define all the different possible outcomes of our system. For example, for a coin flip this could be heads or tails and for a dice this could be the labels of the different sides. We call these possibilities deterministic possibilities. Note that we will only be using a finite number of possibilities.",
-    "crumbs": [
-      "Quantum Basics",
-      "<span class='chapter-number'>2</span>  <span class='chapter-title'>Probabilistic systems</span>"
-    ]
-  },
-  {
-    "objectID": "probabilisticSystems.html#deterministic-possibilities",
-    "href": "probabilisticSystems.html#deterministic-possibilities",
-    "title": "2  Probabilistic systems",
-    "section": "",
-    "text": "Example: Random 2-bit number\n\n\n\nImagine you have a random number generator, which outputs 2-bit numbers. The deterministic possibilities of this generator are \\(00\\), \\(01\\), \\(10\\) and \\(11\\).",
-    "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\nNext, we need to assign each possibility a probability. We write this as \\(\\Pr[x]=p\\) where \\(p \\in [0,1]\\) is the probability of the deterministic possibility \\(x\\).\n\n\n\n\n\n\nExample: Coin flip\n\n\n\nFor a coin flip the probability of heads would be \\(\\Pr[\\text{heads}] = \\frac{1}{2}\\) and the probability for tails would be \\(\\Pr[\\text{tails}] = \\frac{1}{2}\\).\n\n\nIf we combine all probabilities for all the possible outcomes and write them as a vector, we get a probability distribution.\n\n\n\n\n\n\n\nDefinition 2.1 (Probability distribution) A vector \\(d \\in \\mathbb{R}^n\\) is a valid probability distribution iff \\(\\sum d_i = 1\\) and \\(\\forall i\\) \\(d_i \\geq 0\\)\n\n\n\n\nThis vector has \\(n\\) entries, where each entry corresponds to a deterministic possibility \\(X\\) and the probability of \\(X\\) is \\(\\Pr[X] = d_i\\). The sum over all probabilities has to be \\(1\\) and each entry needs to be nonnegative in order to be a valid probability.\n\n\n\n\n\n\nExample (continued): Coin flip\n\n\n\nFor a coin flip the probability distribution would be \\(d_{\\text{coin}} \\in \\mathbb{R}^2\\) with \\(d = \\begin{pmatrix}\\frac{1}{2}\\\\ \\frac{1}{2} \\end{pmatrix}\\)\n\n\n\n\n\n\n\n\nExample (continued): Random 2-bit number\n\n\n\nRecall your random 2-bit number generator from above. Imagine your generator outputs each deterministic possibility with equal probability, except for the possibility \\(00\\), which is never generated. The corresponding probability distribution would be \\[\nd_{\\text{2-bit}} = \\begin{pmatrix} 0 \\\\ \\frac{1}{3}\\\\ \\frac{1}{3} \\\\ \\frac{1}{3} \\end{pmatrix}\n\\]",
-    "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\nWith a probability distribution, we can only describe the probabilities of possibilities without any knowledge of a prior state. We therefore add another element to our toolbox of probabilistic systems called a probabilistic process.\nA probabilistic process is a collection of \\(n\\) probability distributions, where for each deterministic possibility \\(i\\) there is a probability distribution \\(a_i\\). This means, that if the system is in deterministic possibility \\(i\\) before the process is applied, the system will afterwards be distributed according to \\(a_i\\). We can write this as a matrix, where each column is a probability distribution \\(a_i\\).\n\n\n\n\n\n\n\nDefinition 2.2 (Probabilistic process) A matrix \\(A \\in \\mathbb{R}^{n\\times n}\\) is a valid probabilistic process iff for every column \\(a\\) of \\(A\\), \\(a\\) is a valid probability distribution.\n\n\n\n\nFrom Definition 2.1 we know that a valid probability distribution \\(a\\) has the properties \\(\\sum a_i = 1\\) and \\(\\forall i\\) \\(a_i \\geq 0\\), therefore a matrix \\(A\\) is a probabilistic process iff \\(A \\in \\mathbb{R}^{n \\times n}\\) with \\(\\sum a_i = 1\\) and \\(\\forall i\\) \\(a_i \\geq 0\\) . Such a matrix is also called a stochastic matrix.\n\n\n\n\n\n\nExample (continued): Random 2-bit number\n\n\n\nImagine a second device, which receives a 2-bit number as an input and flips both bits at the same time with a probability of \\(\\frac{1}{3}\\). The probability distributions for each of the deterministic possibility would then be \\[\na_{00} = \\begin{pmatrix} \\frac{2}{3} \\\\ 0 \\\\ 0 \\\\ \\frac{1}{3} \\end{pmatrix}, a_{01} =\\begin{pmatrix} 0 \\\\ \\frac{2}{3} \\\\ \\frac{1}{3} \\\\ 0  \\end{pmatrix}, a_{10} =\\begin{pmatrix} 0 \\\\ \\frac{1}{3} \\\\ \\frac{2}{3} \\\\ 0  \\end{pmatrix}, a_{11} = \\begin{pmatrix} \\frac{1}{3} \\\\ 0 \\\\ 0 \\\\ \\frac{2}{3} \\end{pmatrix}\n\\] From this we can construct the process as a matrix from these processes as follows: \\[\nA_{\\text{flip}} = \\begin{pmatrix} a_{00} & a_{01} & a_{10} & a_{11} \\end{pmatrix} = \\begin{pmatrix} \\frac{2}{3} & 0 & 0 &  \\frac{1}{3} \\\\ 0 &  \\frac{2}{3} &  \\frac{1}{3} & 0 \\\\ 0 &  \\frac{1}{3} &  \\frac{2}{3} & 0 \\\\  \\frac{1}{3} & 0 & 0 &  \\frac{2}{3} \\end{pmatrix}\n\\]\n\n\n\nApplying a probabilistic process\nHaving defined probability distributions and probabilistic processes, we can now combine these two elements and apply a probabilistic process on a probability distribution.\n\n\n\n\n\n\n\nDefinition 2.3 (Applying a probabilistic process) Given an initial probability distribution \\(x\\) and a probabilistic process \\(A\\), the result \\(y\\) of applying the process \\(A\\) is defined as \\[\ny = Ax\n\\]\n\n\n\n\n\n\n\n\n\n\nExample (continued): Random 2-bit number\n\n\n\nRecall the 2-bit number generator and the bit flip from above. Imagine you would first draw a random 2-bit number from the generator and then run the bit flip device. We already know that the probability distribution of the generator is \\(M_\\text{2-bit}\\). Using \\(A_\\text{flip}\\) we can calculate the final probability distribution: \\[\nA_\\text{flip} \\cdot d_\\text{2-bit} = \\begin{pmatrix} \\frac{2}{3} & 0 & 0 &  \\frac{1}{3} \\\\ 0 &  \\frac{2}{3} &  \\frac{1}{3} & 0 \\\\ 0 &  \\frac{1}{3} &  \\frac{2}{3} & 0 \\\\  \\frac{1}{3} & 0 & 0 &  \\frac{2}{3} \\end{pmatrix}\\begin{pmatrix} 0 \\\\ \\frac{1}{3}\\\\ \\frac{1}{3} \\\\ \\frac{1}{3} \\end{pmatrix} = \\begin{pmatrix} \\frac{1}{9} \\\\ \\frac{1}{3}\\\\ \\frac{1}{3} \\\\ \\frac{2}{9} \\end{pmatrix}\n\\]",
-    "crumbs": [
-      "Quantum Basics",
-      "<span class='chapter-number'>2</span>  <span class='chapter-title'>Probabilistic systems</span>"
-    ]
-  }
-]
\ No newline at end of file
diff --git a/_book/sitemap.xml b/_book/sitemap.xml
deleted file mode 100644
index 324f12b10f3a0de868c304f118da228ae250915e..0000000000000000000000000000000000000000
--- a/_book/sitemap.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
-  <url>
-    <loc>https://qis.rwth-aachen.de/teaching/24ss/intro-quantum-computing/script/index.html</loc>
-    <lastmod>2024-05-21T10:35:50.245Z</lastmod>
-  </url>
-  <url>
-    <loc>https://qis.rwth-aachen.de/teaching/24ss/intro-quantum-computing/script/quantumBasics.html</loc>
-    <lastmod>2024-05-06T10:45:40.810Z</lastmod>
-  </url>
-  <url>
-    <loc>https://qis.rwth-aachen.de/teaching/24ss/intro-quantum-computing/script/introduction.html</loc>
-    <lastmod>2024-05-16T20:35:45.192Z</lastmod>
-  </url>
-  <url>
-    <loc>https://qis.rwth-aachen.de/teaching/24ss/intro-quantum-computing/script/probabilisticSystems.html</loc>
-    <lastmod>2024-05-21T12:51:48.377Z</lastmod>
-  </url>
-  <url>
-    <loc>https://qis.rwth-aachen.de/teaching/24ss/intro-quantum-computing/script/Introduction-to-Quantum-Computing.pdf</loc>
-    <lastmod>2024-05-21T12:52:36.889Z</lastmod>
-  </url>
-  <url>
-    <loc>https://qis.rwth-aachen.de/teaching/24ss/intro-quantum-computing/script/Introduction-to-Quantum-Computing.epub</loc>
-    <lastmod>2024-05-21T12:53:04.707Z</lastmod>
-  </url>
-</urlset>
diff --git a/_extensions/jmgirard/embedpdf/.DS_Store b/_extensions/jmgirard/embedpdf/.DS_Store
new file mode 100644
index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6
Binary files /dev/null and b/_extensions/jmgirard/embedpdf/.DS_Store differ
diff --git a/_extensions/jmgirard/embedpdf/_extension.yml b/_extensions/jmgirard/embedpdf/_extension.yml
new file mode 100644
index 0000000000000000000000000000000000000000..eefa3d03182e13a70a5b7ab8fecf72bb4b43d483
--- /dev/null
+++ b/_extensions/jmgirard/embedpdf/_extension.yml
@@ -0,0 +1,8 @@
+title: embedpdf
+author: Jeffrey Girard
+version: 0.4.1
+quarto-required: ">=1.3.0"
+contributes:
+  shortcodes:
+    - embedpdf.lua
+
diff --git a/_extensions/jmgirard/embedpdf/embedpdf.lua b/_extensions/jmgirard/embedpdf/embedpdf.lua
new file mode 100644
index 0000000000000000000000000000000000000000..f9f2bbb919ff09702818e873870de1a089afc8a0
--- /dev/null
+++ b/_extensions/jmgirard/embedpdf/embedpdf.lua
@@ -0,0 +1,65 @@
+function pdf(args, kwargs)
+  local data = pandoc.utils.stringify(args[1]) or pandoc.utils.stringify(kwargs['file'])
+  local width = pandoc.utils.stringify(kwargs['width'])
+  local height = pandoc.utils.stringify(kwargs['height'])
+  local border = pandoc.utils.stringify(kwargs['border'])
+  local class = pandoc.utils.stringify(kwargs['class'])
+  local image = pandoc.utils.stringify(kwargs['image'])
+  local image_force = pandoc.utils.stringify(kwargs['image_force'])
+  local image_width = pandoc.utils.stringify(kwargs['image_width'])
+  local image_height = pandoc.utils.stringify(kwargs['image_height'])
+  local image_border = pandoc.utils.stringify(kwargs['image_border'])
+  local image_class = pandoc.utils.stringify(kwargs['image_class'])
+  
+  if width ~= '' then
+    width = 'width="' .. width .. '" '
+  end
+  
+  if height ~= '' then
+    height = 'height="' .. height .. '" '
+  end
+  
+  if border ~= '' then
+    border = 'border="' .. border .. '" '
+  end
+  
+  if class ~= '' then
+    class = 'class="' .. class .. '" '
+  end
+  
+  if image_width ~= '' then
+    image_width = 'width="' .. image_width .. '" '
+  end
+  
+  if image_height ~= '' then
+    image_height = 'height="' .. image_height .. '" '
+  end
+  
+  if image_border ~= '' then
+    image_border = 'border="' .. image_border .. '" '
+  end
+  
+  if image_class ~= '' then
+    image_class = 'class="' .. image_class .. '" '
+  end
+  
+  -- detect html
+  if quarto.doc.isFormat("html:js") then
+    if image_force == 'TRUE' then
+      return pandoc.RawInline('html', '<a href="' .. data .. '" download><img src="' .. image .. '" ' .. image_width .. image_height .. image_class .. image_border .. ' /></a>')
+    end
+    if image ~= '' then
+      return pandoc.RawInline('html', '<object data="' .. data .. '" type="application/pdf"' .. width .. height .. class .. border .. '><a href="' .. data .. '" download><img src="' .. image .. '" ' .. image_width .. image_height .. image_class .. image_border .. ' /></a></object>')
+    else
+      return pandoc.RawInline('html', '<object data="' .. data .. '" type="application/pdf"' .. width .. height .. class .. border .. '><a href="' .. data .. '" download>Download PDF file.</a></object>')
+    end
+  else
+    return pandoc.Null()
+  end
+
+end
+
+-- Add alias shortcode
+function embedpdf(...)
+  return pdf(...)
+end
diff --git a/_quarto.yml b/_quarto.yml
index abeb049e027df4d4954496e4814ec358da00b330..a6b3664c6b38e9ec6624c1b46dfa07fd76654ae1 100644
--- a/_quarto.yml
+++ b/_quarto.yml
@@ -8,7 +8,7 @@ book:
     - name: Jannik Hellenkamp
     - name: Dominique Unruh
   downloads: [pdf, epub]
-  version: 0.1.1
+  version: 0.1.2
   search: true
   page-navigation: true
   site-url: https://qis.rwth-aachen.de/teaching/24ss/intro-quantum-computing/script/
@@ -22,6 +22,15 @@ book:
       chapters:  
         - introduction.qmd
         - probabilisticSystems.qmd
+        - quantumSystems.qmd
+        - observingSystems.qmd
+        - partialObserving.qmd
+        - compositeSystems.qmd
+        - quantumCircutsKetNotation.qmd
+    - part: quantumAlgorithms.qmd
+      chapters:
+        - bernsteinVazirani.qmd
+        - shorsAlgorithm.qmd
 
 bibliography: references.bib
 
@@ -29,17 +38,21 @@ format:
   html:
     theme: cosmo
     callout-appearance: simple
+    default-image-extension: svg
   pdf:
     documentclass: scrreprt
     papersize: letter # Necessary for scrreprt!
+    default-image-extension: pdf
     include-in-header: 
      text: |
         \usepackage{physics}
         \RedeclareSectionCommand[style=section]{chapter}
         \renewcommand{\part}[1]{\empty}
+        \usepackage{tikz}
+        \usetikzlibrary{quantikz2}
 
 
   epub: 
     callout-appearance: simple
     toc: true
-    html-math-method: webtex # Requires an internet connection to compile
\ No newline at end of file
+    html-math-method: mathml # Requires an internet connection to compile
\ No newline at end of file
diff --git a/bernsteinVazirani.html b/bernsteinVazirani.html
new file mode 100644
index 0000000000000000000000000000000000000000..977e67ef7a12c1245123e0eb3bdc52d26246f42f
--- /dev/null
+++ b/bernsteinVazirani.html
@@ -0,0 +1,671 @@
+<!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 - 8&nbsp; Bernstein-Vazirani Algorithm</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="./shorsAlgorithm.html" rel="next">
+<link href="./quantumAlgorithms.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="./quantumAlgorithms.html">Quantum Algorithms</a></li><li class="breadcrumb-item"><a href="./bernsteinVazirani.html"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Bernstein-Vazirani Algorithm</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>&nbsp; <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>&nbsp; <span class="chapter-title">Probabilistic systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./quantumSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Quantum systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./observingSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Observing probabilistic and measuring quantum systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./partialObserving.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Partial observing and measuring systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./compositeSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Composite Systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./quantumCircutsKetNotation.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Quantum Circuits</span></span></a>
+  </div>
+</li>
+      </ul>
+  </li>
+        <li class="sidebar-item sidebar-item-section">
+      <div class="sidebar-item-container"> 
+            <a href="./quantumAlgorithms.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text">Quantum Algorithms</span></a>
+          <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true" aria-label="Toggle section">
+            <i class="bi bi-chevron-right ms-2"></i>
+          </a> 
+      </div>
+      <ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 show">  
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./bernsteinVazirani.html" class="sidebar-item-text sidebar-link active">
+ <span class="menu-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Bernstein-Vazirani Algorithm</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./shorsAlgorithm.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">9</span>&nbsp; <span class="chapter-title">Shor’s Algorithm</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="./quantumAlgorithms.html">Quantum Algorithms</a></li><li class="breadcrumb-item"><a href="./bernsteinVazirani.html"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Bernstein-Vazirani Algorithm</span></a></li></ol></nav>
+<div class="quarto-title">
+<h1 class="title"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Bernstein-Vazirani Algorithm</span></h1>
+</div>
+
+
+
+<div class="quarto-title-meta">
+
+    
+  
+    
+  </div>
+  
+
+
+</header>
+
+
+
+
+
+</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("https:\/\/qis\.rwth-aachen\.de\/teaching\/24ss\/intro-quantum-computing\/script\/");
+    var isInternal = (href) => {
+        return filterRegex.test(href) || localhostRegex.test(href) || mailtoRegex.test(href);
+    }
+    // Inspect non-navigation links and adorn them if external
+ 	var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool)');
+    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="./quantumAlgorithms.html" class="pagination-link" aria-label="Quantum Algorithms">
+        <i class="bi bi-arrow-left-short"></i> <span class="nav-page-text">Quantum Algorithms</span>
+      </a>          
+  </div>
+  <div class="nav-page nav-page-next">
+      <a href="./shorsAlgorithm.html" class="pagination-link" aria-label="Shor's Algorithm">
+        <span class="nav-page-text"><span class="chapter-number">9</span>&nbsp; <span class="chapter-title">Shor’s Algorithm</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/bernsteinVazirani.qmd b/bernsteinVazirani.qmd
new file mode 100644
index 0000000000000000000000000000000000000000..ba9b4c4db83b81105cf7145f9ffea4def2d0e878
--- /dev/null
+++ b/bernsteinVazirani.qmd
@@ -0,0 +1 @@
+# Bernstein-Vazirani Algorithm
\ No newline at end of file
diff --git a/compositeSystems.html b/compositeSystems.html
new file mode 100644
index 0000000000000000000000000000000000000000..87feaa32fb4146346bd5302c9abdcc0b9e51c477
--- /dev/null
+++ b/compositeSystems.html
@@ -0,0 +1,671 @@
+<!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 - 6&nbsp; Composite 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="./quantumCircutsKetNotation.html" rel="next">
+<link href="./partialObserving.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="./compositeSystems.html"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Composite 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>&nbsp; <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>&nbsp; <span class="chapter-title">Probabilistic systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./quantumSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Quantum systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./observingSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Observing probabilistic and measuring quantum systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./partialObserving.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Partial observing and measuring systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./compositeSystems.html" class="sidebar-item-text sidebar-link active">
+ <span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Composite Systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./quantumCircutsKetNotation.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Quantum Circuits</span></span></a>
+  </div>
+</li>
+      </ul>
+  </li>
+        <li class="sidebar-item sidebar-item-section">
+      <div class="sidebar-item-container"> 
+            <a href="./quantumAlgorithms.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text">Quantum Algorithms</span></a>
+          <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true" aria-label="Toggle section">
+            <i class="bi bi-chevron-right ms-2"></i>
+          </a> 
+      </div>
+      <ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 show">  
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./bernsteinVazirani.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Bernstein-Vazirani Algorithm</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./shorsAlgorithm.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">9</span>&nbsp; <span class="chapter-title">Shor’s Algorithm</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="./compositeSystems.html"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Composite Systems</span></a></li></ol></nav>
+<div class="quarto-title">
+<h1 class="title"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Composite Systems</span></h1>
+</div>
+
+
+
+<div class="quarto-title-meta">
+
+    
+  
+    
+  </div>
+  
+
+
+</header>
+
+
+
+
+
+</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("https:\/\/qis\.rwth-aachen\.de\/teaching\/24ss\/intro-quantum-computing\/script\/");
+    var isInternal = (href) => {
+        return filterRegex.test(href) || localhostRegex.test(href) || mailtoRegex.test(href);
+    }
+    // Inspect non-navigation links and adorn them if external
+ 	var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool)');
+    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="./partialObserving.html" class="pagination-link" aria-label="Partial observing and measuring systems">
+        <i class="bi bi-arrow-left-short"></i> <span class="nav-page-text"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Partial observing and measuring systems</span></span>
+      </a>          
+  </div>
+  <div class="nav-page nav-page-next">
+      <a href="./quantumCircutsKetNotation.html" class="pagination-link" aria-label="Quantum Circuits">
+        <span class="nav-page-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Quantum Circuits</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/compositeSystems.qmd b/compositeSystems.qmd
new file mode 100644
index 0000000000000000000000000000000000000000..e580d699b8d3d8d34dfb28a7579350fed5f6e3a7
--- /dev/null
+++ b/compositeSystems.qmd
@@ -0,0 +1 @@
+# Composite Systems
diff --git a/_book/index.html b/index.html
similarity index 89%
rename from _book/index.html
rename to index.html
index f8c1e98f2c731b500f53572fdddaf6cb15d4c517..18b279a1d0143379e0feaa752a4affe3a5bc8e3f 100644
--- a/_book/index.html
+++ b/index.html
@@ -8,7 +8,7 @@
 
 <meta name="author" content="Jannik Hellenkamp">
 <meta name="author" content="Dominique Unruh">
-<meta name="dcterms.date" content="2024-05-21">
+<meta name="dcterms.date" content="2024-05-31">
 
 <title>Introduction to Quantum Computing</title>
 <style>
@@ -154,6 +154,59 @@ ul.task-list li input[type="checkbox"] {
   <a href="./probabilisticSystems.html" class="sidebar-item-text sidebar-link">
  <span class="menu-text"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Probabilistic systems</span></span></a>
   </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./quantumSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Quantum systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./observingSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Observing probabilistic and measuring quantum systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./partialObserving.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Partial observing and measuring systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./compositeSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Composite Systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./quantumCircutsKetNotation.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Quantum Circuits</span></span></a>
+  </div>
+</li>
+      </ul>
+  </li>
+        <li class="sidebar-item sidebar-item-section">
+      <div class="sidebar-item-container"> 
+            <a href="./quantumAlgorithms.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text">Quantum Algorithms</span></a>
+          <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true" aria-label="Toggle section">
+            <i class="bi bi-chevron-right ms-2"></i>
+          </a> 
+      </div>
+      <ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 show">  
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./bernsteinVazirani.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Bernstein-Vazirani Algorithm</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./shorsAlgorithm.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">9</span>&nbsp; <span class="chapter-title">Shor’s Algorithm</span></span></a>
+  </div>
 </li>
       </ul>
   </li>
@@ -198,7 +251,7 @@ ul.task-list li input[type="checkbox"] {
     <div>
     <div class="quarto-title-meta-heading">Published</div>
     <div class="quarto-title-meta-contents">
-      <p class="date">May 21, 2024</p>
+      <p class="date">May 31, 2024</p>
     </div>
   </div>
   
@@ -218,6 +271,13 @@ ul.task-list li input[type="checkbox"] {
 <p>These lecture notes are released under the CC BY-NC 4.0 license, which can be found <a href="https://creativecommons.org/licenses/by-nc/4.0/">here</a>.</p>
 <section id="changelog" class="level2 unnumbered">
 <h2 class="unnumbered anchored" data-anchor-id="changelog">Changelog</h2>
+<section id="version-0.1.2-31.05.2024" class="level4">
+<h4 class="anchored" data-anchor-id="version-0.1.2-31.05.2024">Version 0.1.2 (31.05.2024)</h4>
+<ul>
+<li>minor changes to chapter 2</li>
+<li>added chapter 9</li>
+</ul>
+</section>
 <section id="version-0.1.1-16.05.2024" class="level4">
 <h4 class="anchored" data-anchor-id="version-0.1.1-16.05.2024">Version 0.1.1 (16.05.2024)</h4>
 <ul>
diff --git a/index.log b/index.log
new file mode 100644
index 0000000000000000000000000000000000000000..135760b73e4587a15730105747f87d35fcbadb7f
--- /dev/null
+++ b/index.log
@@ -0,0 +1,615 @@
+This is XeTeX, Version 3.141592653-2.6-0.999996 (TeX Live 2024) (preloaded format=xelatex 2024.5.16)  31 MAY 2024 19:22
+entering extended mode
+ restricted \write18 enabled.
+ %&-line parsing enabled.
+**index.tex
+(./index.tex
+LaTeX2e <2023-11-01> patch level 1
+L3 programming layer <2024-04-11>
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/koma-script/scrreprt.cls
+Document Class: scrreprt 2023/07/07 v3.41 KOMA-Script document class (report)
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/koma-script/scrkbase.sty
+Package: scrkbase 2023/07/07 v3.41 KOMA-Script package (KOMA-Script-dependent basics and keyval usage)
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/koma-script/scrbase.sty
+Package: scrbase 2023/07/07 v3.41 KOMA-Script package (KOMA-Script-independent basics and keyval usage)
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/koma-script/scrlfile.sty
+Package: scrlfile 2023/07/07 v3.41 KOMA-Script package (file load hooks)
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/koma-script/scrlfile-hook.sty
+Package: scrlfile-hook 2023/07/07 v3.41 KOMA-Script package (using LaTeX hooks)
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/koma-script/scrlogo.sty
+Package: scrlogo 2023/07/07 v3.41 KOMA-Script package (logo)
+))) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics/keyval.sty
+Package: keyval 2022/05/29 v1.15 key=value parser (DPC)
+\KV@toks@=\toks17
+)
+Applying: [2021/05/01] Usage of raw or classic option list on input line 252.
+Already applied: [0000/00/00] Usage of raw or classic option list on input line 368.
+)) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/koma-script/tocbasic.sty
+Package: tocbasic 2023/07/07 v3.41 KOMA-Script package (handling toc-files)
+\scr@dte@tocline@numberwidth=\skip48
+\scr@dte@tocline@numbox=\box51
+)
+Package tocbasic Info: omitting babel extension for `toc'
+(tocbasic)             because of feature `nobabel' available
+(tocbasic)             for `toc' on input line 135.
+Class scrreprt Info: File `scrsize11pt.clo' used instead of
+(scrreprt)           file `scrsize11.clo' to setup font sizes on input line 2688.
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/koma-script/scrsize11pt.clo
+File: scrsize11pt.clo 2023/07/07 v3.41 KOMA-Script font size class option (11pt)
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/koma-script/typearea.sty
+Package: typearea 2023/07/07 v3.41 KOMA-Script package (type area)
+\ta@bcor=\skip49
+\ta@div=\count185
+Package typearea Info: You've used standard option `letterpaper'.
+(typearea)             This is correct!
+(typearea)             Internally I'm using `paper=letter'.
+(typearea)             If you'd like to set the option with \KOMAoptions,
+(typearea)             you'd have to use `paper=letter' there
+(typearea)             instead of `letterpaper', too.
+\ta@hblk=\skip50
+\ta@vblk=\skip51
+\ta@temp=\skip52
+\footheight=\skip53
+Package typearea Info: These are the values describing the layout:
+(typearea)             DIV  = 11
+(typearea)             BCOR = 0.0pt
+(typearea)             \paperwidth      = 614.295pt
+(typearea)              \textwidth      = 446.76004pt
+(typearea)              DIV departure   = -14%
+(typearea)              \evensidemargin = 11.49748pt
+(typearea)              \oddsidemargin  = 11.49748pt
+(typearea)             \paperheight     = 794.96999pt
+(typearea)              \textheight     = 582.20026pt
+(typearea)              \topmargin      = -37.40001pt
+(typearea)              \headheight     = 17.0pt
+(typearea)              \headsep        = 20.40001pt
+(typearea)              \topskip        = 11.0pt
+(typearea)              \footskip       = 47.6pt
+(typearea)              \baselineskip   = 13.6pt
+(typearea)              on input line 1799.
+)
+\c@part=\count186
+\c@chapter=\count187
+\c@section=\count188
+\c@subsection=\count189
+\c@subsubsection=\count190
+\c@paragraph=\count191
+\c@subparagraph=\count192
+\scr@dte@chapter@maxnumwidth=\skip54
+Class scrreprt Info: using compatibility default `afterindent=bysign'
+(scrreprt)           for `\chapter on input line 5994.
+\scr@dte@section@maxnumwidth=\skip55
+Class scrreprt Info: using compatibility default `runin=bysign'
+(scrreprt)           for `\section on input line 6005.
+Class scrreprt Info: using compatibility default `afterindent=bysign'
+(scrreprt)           for `\section on input line 6005.
+\scr@dte@part@maxnumwidth=\skip56
+Class scrreprt Info: using compatibility default `afterindent=true'
+(scrreprt)           for `\part on input line 6014.
+\scr@dte@subsection@maxnumwidth=\skip57
+Class scrreprt Info: using compatibility default `runin=bysign'
+(scrreprt)           for `\subsection on input line 6024.
+Class scrreprt Info: using compatibility default `afterindent=bysign'
+(scrreprt)           for `\subsection on input line 6024.
+\scr@dte@subsubsection@maxnumwidth=\skip58
+Class scrreprt Info: using compatibility default `runin=bysign'
+(scrreprt)           for `\subsubsection on input line 6034.
+Class scrreprt Info: using compatibility default `afterindent=bysign'
+(scrreprt)           for `\subsubsection on input line 6034.
+\scr@dte@paragraph@maxnumwidth=\skip59
+Class scrreprt Info: using compatibility default `runin=bysign'
+(scrreprt)           for `\paragraph on input line 6045.
+Class scrreprt Info: using compatibility default `afterindent=bysign'
+(scrreprt)           for `\paragraph on input line 6045.
+\scr@dte@subparagraph@maxnumwidth=\skip60
+Class scrreprt Info: using compatibility default `runin=bysign'
+(scrreprt)           for `\subparagraph on input line 6055.
+Class scrreprt Info: using compatibility default `afterindent=bysign'
+(scrreprt)           for `\subparagraph on input line 6055.
+\abovecaptionskip=\skip61
+\belowcaptionskip=\skip62
+\c@pti@nb@sid@b@x=\box52
+Package tocbasic Info: omitting babel extension for `lof'
+(tocbasic)             because of feature `nobabel' available
+(tocbasic)             for `lof' on input line 7240.
+\scr@dte@figure@maxnumwidth=\skip63
+\c@figure=\count193
+Package tocbasic Info: omitting babel extension for `lot'
+(tocbasic)             because of feature `nobabel' available
+(tocbasic)             for `lot' on input line 7257.
+\scr@dte@table@maxnumwidth=\skip64
+\c@table=\count194
+Class scrreprt Info: Redefining `\numberline' on input line 7428.
+\bibindent=\dimen140
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/amsmath/amsmath.sty
+Package: amsmath 2023/05/13 v2.17o AMS math features
+\@mathmargin=\skip65
+For additional information on amsmath, use the `?' option.
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/amsmath/amstext.sty
+Package: amstext 2021/08/26 v2.01 AMS text
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/amsmath/amsgen.sty
+File: amsgen.sty 1999/11/30 v2.0 generic functions
+\@emptytoks=\toks18
+\ex@=\dimen141
+)) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/amsmath/amsbsy.sty
+Package: amsbsy 1999/11/29 v1.2d Bold Symbols
+\pmbraise@=\dimen142
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/amsmath/amsopn.sty
+Package: amsopn 2022/04/08 v2.04 operator names
+)
+\inf@bad=\count195
+LaTeX Info: Redefining \frac on input line 234.
+\uproot@=\count196
+\leftroot@=\count197
+LaTeX Info: Redefining \overline on input line 399.
+LaTeX Info: Redefining \colon on input line 410.
+\classnum@=\count198
+\DOTSCASE@=\count199
+LaTeX Info: Redefining \ldots on input line 496.
+LaTeX Info: Redefining \dots on input line 499.
+LaTeX Info: Redefining \cdots on input line 620.
+\Mathstrutbox@=\box53
+\strutbox@=\box54
+LaTeX Info: Redefining \big on input line 722.
+LaTeX Info: Redefining \Big on input line 723.
+LaTeX Info: Redefining \bigg on input line 724.
+LaTeX Info: Redefining \Bigg on input line 725.
+\big@size=\dimen143
+LaTeX Font Info:    Redeclaring font encoding OML on input line 743.
+LaTeX Font Info:    Redeclaring font encoding OMS on input line 744.
+\macc@depth=\count266
+LaTeX Info: Redefining \bmod on input line 905.
+LaTeX Info: Redefining \pmod on input line 910.
+LaTeX Info: Redefining \smash on input line 940.
+LaTeX Info: Redefining \relbar on input line 970.
+LaTeX Info: Redefining \Relbar on input line 971.
+\c@MaxMatrixCols=\count267
+\dotsspace@=\muskip16
+\c@parentequation=\count268
+\dspbrk@lvl=\count269
+\tag@help=\toks19
+\row@=\count270
+\column@=\count271
+\maxfields@=\count272
+\andhelp@=\toks20
+\eqnshift@=\dimen144
+\alignsep@=\dimen145
+\tagshift@=\dimen146
+\tagwidth@=\dimen147
+\totwidth@=\dimen148
+\lineht@=\dimen149
+\@envbody=\toks21
+\multlinegap=\skip66
+\multlinetaggap=\skip67
+\mathdisplay@stack=\toks22
+LaTeX Info: Redefining \[ on input line 2953.
+LaTeX Info: Redefining \] on input line 2954.
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/amsfonts/amssymb.sty
+Package: amssymb 2013/01/14 v3.01 AMS font symbols
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/amsfonts/amsfonts.sty
+Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support
+\symAMSa=\mathgroup4
+\symAMSb=\mathgroup5
+LaTeX Font Info:    Redeclaring math symbol \hbar on input line 98.
+LaTeX Font Info:    Overwriting math alphabet `\mathfrak' in version `bold'
+(Font)                  U/euf/m/n --> U/euf/b/n on input line 106.
+)) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/iftex/iftex.sty
+Package: iftex 2022/02/03 v1.0f TeX engine tests
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/unicode-math/unicode-math.sty (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/l3kernel/expl3.sty
+Package: expl3 2024-04-11 L3 programming layer (loader) 
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/l3backend/l3backend-xetex.def
+File: l3backend-xetex.def 2024-04-11 L3 backend support: XeTeX
+\g__graphics_track_int=\count273
+\l__pdf_internal_box=\box55
+\g__pdf_backend_annotation_int=\count274
+\g__pdf_backend_link_int=\count275
+))
+Package: unicode-math 2023/08/13 v0.8r Unicode maths in XeLaTeX and LuaLaTeX
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/unicode-math/unicode-math-xetex.sty
+Package: unicode-math-xetex 2023/08/13 v0.8r Unicode maths in XeLaTeX and LuaLaTeX
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
+Package: xparse 2024-03-14 L3 Experimental document command parser
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty
+Package: l3keys2e 2024-03-14 LaTeX2e option processing using LaTeX3 keys
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/fontspec/fontspec.sty
+Package: fontspec 2024/05/11 v2.9e Font selection for XeLaTeX and LuaLaTeX
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
+Package: fontspec-xetex 2024/05/11 v2.9e Font selection for XeLaTeX and LuaLaTeX
+\l__fontspec_script_int=\count276
+\l__fontspec_language_int=\count277
+\l__fontspec_strnum_int=\count278
+\l__fontspec_tmp_int=\count279
+\l__fontspec_tmpa_int=\count280
+\l__fontspec_tmpb_int=\count281
+\l__fontspec_tmpc_int=\count282
+\l__fontspec_em_int=\count283
+\l__fontspec_emdef_int=\count284
+\l__fontspec_strong_int=\count285
+\l__fontspec_strongdef_int=\count286
+\l__fontspec_tmpa_dim=\dimen150
+\l__fontspec_tmpb_dim=\dimen151
+\l__fontspec_tmpc_dim=\dimen152
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/base/fontenc.sty
+Package: fontenc 2021/04/29 v2.0v Standard LaTeX package
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/fontspec/fontspec.cfg))) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/base/fix-cm.sty
+Package: fix-cm 2020/11/24 v1.1t fixes to LaTeX
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/base/ts1enc.def
+File: ts1enc.def 2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file
+LaTeX Font Info:    Redeclaring font encoding TS1 on input line 47.
+))
+\g__um_fam_int=\count287
+\g__um_fonts_used_int=\count288
+\l__um_primecount_int=\count289
+\g__um_primekern_muskip=\muskip17
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/unicode-math/unicode-math-table.tex))) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/lm/lmodern.sty
+Package: lmodern 2015/05/01 v1.6.1 Latin Modern Fonts
+LaTeX Font Info:    Overwriting symbol font `operators' in version `normal'
+(Font)                  OT1/cmr/m/n --> OT1/lmr/m/n on input line 22.
+LaTeX Font Info:    Overwriting symbol font `letters' in version `normal'
+(Font)                  OML/cmm/m/it --> OML/lmm/m/it on input line 23.
+LaTeX Font Info:    Overwriting symbol font `symbols' in version `normal'
+(Font)                  OMS/cmsy/m/n --> OMS/lmsy/m/n on input line 24.
+LaTeX Font Info:    Overwriting symbol font `largesymbols' in version `normal'
+(Font)                  OMX/cmex/m/n --> OMX/lmex/m/n on input line 25.
+LaTeX Font Info:    Overwriting symbol font `operators' in version `bold'
+(Font)                  OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 26.
+LaTeX Font Info:    Overwriting symbol font `letters' in version `bold'
+(Font)                  OML/cmm/b/it --> OML/lmm/b/it on input line 27.
+LaTeX Font Info:    Overwriting symbol font `symbols' in version `bold'
+(Font)                  OMS/cmsy/b/n --> OMS/lmsy/b/n on input line 28.
+LaTeX Font Info:    Overwriting symbol font `largesymbols' in version `bold'
+(Font)                  OMX/cmex/m/n --> OMX/lmex/m/n on input line 29.
+LaTeX Font Info:    Overwriting math alphabet `\mathbf' in version `normal'
+(Font)                  OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 31.
+LaTeX Font Info:    Overwriting math alphabet `\mathsf' in version `normal'
+(Font)                  OT1/cmss/m/n --> OT1/lmss/m/n on input line 32.
+LaTeX Font Info:    Overwriting math alphabet `\mathit' in version `normal'
+(Font)                  OT1/cmr/m/it --> OT1/lmr/m/it on input line 33.
+LaTeX Font Info:    Overwriting math alphabet `\mathtt' in version `normal'
+(Font)                  OT1/cmtt/m/n --> OT1/lmtt/m/n on input line 34.
+LaTeX Font Info:    Overwriting math alphabet `\mathbf' in version `bold'
+(Font)                  OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 35.
+LaTeX Font Info:    Overwriting math alphabet `\mathsf' in version `bold'
+(Font)                  OT1/cmss/bx/n --> OT1/lmss/bx/n on input line 36.
+LaTeX Font Info:    Overwriting math alphabet `\mathit' in version `bold'
+(Font)                  OT1/cmr/bx/it --> OT1/lmr/bx/it on input line 37.
+LaTeX Font Info:    Overwriting math alphabet `\mathtt' in version `bold'
+(Font)                  OT1/cmtt/m/n --> OT1/lmtt/m/n on input line 38.
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/upquote/upquote.sty
+Package: upquote 2012/04/19 v1.3 upright-quote and grave-accent glyphs in verbatim
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/base/textcomp.sty
+Package: textcomp 2020/02/02 v2.0n Standard LaTeX package
+)) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/microtype/microtype.sty
+Package: microtype 2024/03/29 v3.1b Micro-typographical refinements (RS)
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/etoolbox/etoolbox.sty
+Package: etoolbox 2020/10/05 v2.5k e-TeX tools for LaTeX (JAW)
+\etb@tempcnta=\count290
+)
+\MT@toks=\toks23
+\MT@tempbox=\box56
+\MT@count=\count291
+LaTeX Info: Redefining \noprotrusionifhmode on input line 1061.
+LaTeX Info: Redefining \leftprotrusion on input line 1062.
+\MT@prot@toks=\toks24
+LaTeX Info: Redefining \rightprotrusion on input line 1081.
+LaTeX Info: Redefining \textls on input line 1392.
+\MT@outer@kern=\dimen153
+LaTeX Info: Redefining \textmicrotypecontext on input line 2013.
+\MT@listname@count=\count292
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/microtype/microtype-xetex.def
+File: microtype-xetex.def 2024/03/29 v3.1b Definitions specific to xetex (RS)
+LaTeX Info: Redefining \lsstyle on input line 238.
+)
+Package microtype Info: Loading configuration file microtype.cfg.
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/microtype/microtype.cfg
+File: microtype.cfg 2024/03/29 v3.1b microtype main configuration file (RS)
+)) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/xcolor/xcolor.sty
+Package: xcolor 2023/11/15 v3.01 LaTeX color extensions (UK)
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics-cfg/color.cfg
+File: color.cfg 2016/01/02 v1.6 sample color configuration
+)
+Package xcolor Info: Driver file: xetex.def on input line 274.
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics-def/xetex.def
+File: xetex.def 2022/09/22 v5.0n Graphics/color driver for xetex
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics/mathcolor.ltx)
+Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1350.
+Package xcolor Info: Model `RGB' extended on input line 1366.
+Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1368.
+Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1369.
+Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1370.
+Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1371.
+Package xcolor Info: Model `Gray' substituted by `gray' on input line 1372.
+Package xcolor Info: Model `wave' substituted by `hsb' on input line 1373.
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics/dvipsnam.def
+File: dvipsnam.def 2016/06/17 v3.0m Driver-dependent file (DPC,SPQR)
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/xcolor/svgnam.def
+File: svgnam.def 2023/11/15 v3.01 Predefined colors according to SVG 1.1 (UK)
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/xcolor/x11nam.def
+File: x11nam.def 2023/11/15 v3.01 Predefined colors according to Unix/X11 (UK)
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/tools/longtable.sty
+Package: longtable 2023-11-01 v4.19 Multi-page Table package (DPC)
+\LTleft=\skip68
+\LTright=\skip69
+\LTpre=\skip70
+\LTpost=\skip71
+\LTchunksize=\count293
+\LTcapwidth=\dimen154
+\LT@head=\box57
+\LT@firsthead=\box58
+\LT@foot=\box59
+\LT@lastfoot=\box60
+\LT@gbox=\box61
+\LT@cols=\count294
+\LT@rows=\count295
+\c@LT@tables=\count296
+\c@LT@chunks=\count297
+\LT@p@ftn=\toks25
+)
+Class scrreprt Info: longtable captions redefined on input line 58.
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/booktabs/booktabs.sty
+Package: booktabs 2020/01/12 v1.61803398 Publication quality tables
+\heavyrulewidth=\dimen155
+\lightrulewidth=\dimen156
+\cmidrulewidth=\dimen157
+\belowrulesep=\dimen158
+\belowbottomsep=\dimen159
+\aboverulesep=\dimen160
+\abovetopsep=\dimen161
+\cmidrulesep=\dimen162
+\cmidrulekern=\dimen163
+\defaultaddspace=\dimen164
+\@cmidla=\count298
+\@cmidlb=\count299
+\@aboverulesep=\dimen165
+\@belowrulesep=\dimen166
+\@thisruleclass=\count300
+\@lastruleclass=\count301
+\@thisrulewidth=\dimen167
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/tools/array.sty
+Package: array 2023/10/16 v2.5g Tabular extension package (FMi)
+\col@sep=\dimen168
+\ar@mcellbox=\box62
+\extrarowheight=\dimen169
+\NC@list=\toks26
+\extratabsurround=\skip72
+\backup@length=\skip73
+\ar@cellbox=\box63
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/tools/calc.sty
+Package: calc 2023/07/08 v4.3 Infix arithmetic (KKT,FJ)
+\calc@Acount=\count302
+\calc@Bcount=\count303
+\calc@Adimen=\dimen170
+\calc@Bdimen=\dimen171
+\calc@Askip=\skip74
+\calc@Bskip=\skip75
+LaTeX Info: Redefining \setlength on input line 80.
+LaTeX Info: Redefining \addtolength on input line 81.
+\calc@Ccount=\count304
+\calc@Cskip=\skip76
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/mdwtools/footnote.sty
+Package: footnote 1997/01/28 1.13 Save footnotes around boxes
+\fn@notes=\box64
+\fn@width=\dimen172
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics/graphicx.sty
+Package: graphicx 2021/09/16 v1.2d Enhanced LaTeX Graphics (DPC,SPQR)
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics/graphics.sty
+Package: graphics 2022/03/10 v1.4e Standard LaTeX Graphics (DPC,SPQR)
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics/trig.sty
+Package: trig 2021/08/11 v1.11 sin cos tan (DPC)
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
+File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
+)
+Package graphics Info: Driver file: xetex.def on input line 107.
+)
+\Gin@req@height=\dimen173
+\Gin@req@width=\dimen174
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/physics/physics.sty
+Package: physics 
+)
+Class scrreprt Info: section indent of \chapter unknown.
+(scrreprt)           You should use option `indent' if you
+(scrreprt)           do not want to use the default value
+(scrreprt)           `0pt' on input line 82.
+Class scrreprt Info: using compatibility default `runin=bysign'
+(scrreprt)           for `\chapter on input line 82.
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/pgf/frontendlayer/tikz.sty (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/pgf/utilities/pgfrcs.sty (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex
+\pgfutil@everybye=\toks27
+\pgfutil@tempdima=\dimen175
+\pgfutil@tempdimb=\dimen176
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def
+\pgfutil@abb=\box65
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/pgf.revision.tex)
+Package: pgfrcs 2023-01-15 v3.1.10 (3.1.10)
+))
+Package: pgf 2023-01-15 v3.1.10 (3.1.10)
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/pgf/basiclayer/pgfcore.sty (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/pgf/systemlayer/pgfsys.sty (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex
+Package: pgfsys 2023-01-15 v3.1.10 (3.1.10)
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex
+\pgfkeys@pathtoks=\toks28
+\pgfkeys@temptoks=\toks29
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/utilities/pgfkeyslibraryfiltered.code.tex
+\pgfkeys@tmptoks=\toks30
+))
+\pgf@x=\dimen177
+\pgf@y=\dimen178
+\pgf@xa=\dimen179
+\pgf@ya=\dimen180
+\pgf@xb=\dimen181
+\pgf@yb=\dimen182
+\pgf@xc=\dimen183
+\pgf@yc=\dimen184
+\pgf@xd=\dimen185
+\pgf@yd=\dimen186
+\w@pgf@writea=\write3
+\r@pgf@reada=\read2
+\c@pgf@counta=\count305
+\c@pgf@countb=\count306
+\c@pgf@countc=\count307
+\c@pgf@countd=\count308
+\t@pgf@toka=\toks31
+\t@pgf@tokb=\toks32
+\t@pgf@tokc=\toks33
+\pgf@sys@id@count=\count309
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg
+File: pgf.cfg 2023-01-15 v3.1.10 (3.1.10)
+)
+Driver file for pgf: pgfsys-xetex.def
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-xetex.def
+File: pgfsys-xetex.def 2023-01-15 v3.1.10 (3.1.10)
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-dvipdfmx.def
+File: pgfsys-dvipdfmx.def 2023-01-15 v3.1.10 (3.1.10)
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def
+File: pgfsys-common-pdf.def 2023-01-15 v3.1.10 (3.1.10)
+)
+\pgfsys@objnum=\count310
+))) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex
+File: pgfsyssoftpath.code.tex 2023-01-15 v3.1.10 (3.1.10)
+\pgfsyssoftpath@smallbuffer@items=\count311
+\pgfsyssoftpath@bigbuffer@items=\count312
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex
+File: pgfsysprotocol.code.tex 2023-01-15 v3.1.10 (3.1.10)
+)) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex
+Package: pgfcore 2023-01-15 v3.1.10 (3.1.10)
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex
+\pgfmath@dimen=\dimen187
+\pgfmath@count=\count313
+\pgfmath@box=\box66
+\pgfmath@toks=\toks34
+\pgfmath@stack@operand=\toks35
+\pgfmath@stack@operation=\toks36
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.code.tex) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic.code.tex) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigonometric.code.tex) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code.tex) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.comparison.code.tex) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.base.code.tex) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round.code.tex) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integerarithmetics.code.tex) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex
+\c@pgfmathroundto@lastzeros=\count314
+)) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/math/pgfint.code.tex) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex
+File: pgfcorepoints.code.tex 2023-01-15 v3.1.10 (3.1.10)
+\pgf@picminx=\dimen188
+\pgf@picmaxx=\dimen189
+\pgf@picminy=\dimen190
+\pgf@picmaxy=\dimen191
+\pgf@pathminx=\dimen192
+\pgf@pathmaxx=\dimen193
+\pgf@pathminy=\dimen194
+\pgf@pathmaxy=\dimen195
+\pgf@xx=\dimen196
+\pgf@xy=\dimen197
+\pgf@yx=\dimen198
+\pgf@yy=\dimen199
+\pgf@zx=\dimen256
+\pgf@zy=\dimen257
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex
+File: pgfcorepathconstruct.code.tex 2023-01-15 v3.1.10 (3.1.10)
+\pgf@path@lastx=\dimen258
+\pgf@path@lasty=\dimen259
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex
+File: pgfcorepathusage.code.tex 2023-01-15 v3.1.10 (3.1.10)
+\pgf@shorten@end@additional=\dimen260
+\pgf@shorten@start@additional=\dimen261
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex
+File: pgfcorescopes.code.tex 2023-01-15 v3.1.10 (3.1.10)
+\pgfpic=\box67
+\pgf@hbox=\box68
+\pgf@layerbox@main=\box69
+\pgf@picture@serial@count=\count315
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex
+File: pgfcoregraphicstate.code.tex 2023-01-15 v3.1.10 (3.1.10)
+\pgflinewidth=\dimen262
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransformations.code.tex
+File: pgfcoretransformations.code.tex 2023-01-15 v3.1.10 (3.1.10)
+\pgf@pt@x=\dimen263
+\pgf@pt@y=\dimen264
+\pgf@pt@temp=\dimen265
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.code.tex
+File: pgfcorequick.code.tex 2023-01-15 v3.1.10 (3.1.10)
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex
+File: pgfcoreobjects.code.tex 2023-01-15 v3.1.10 (3.1.10)
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex
+File: pgfcorepathprocessing.code.tex 2023-01-15 v3.1.10 (3.1.10)
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex
+File: pgfcorearrows.code.tex 2023-01-15 v3.1.10 (3.1.10)
+\pgfarrowsep=\dimen266
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex
+File: pgfcoreshade.code.tex 2023-01-15 v3.1.10 (3.1.10)
+\pgf@max=\dimen267
+\pgf@sys@shading@range@num=\count316
+\pgf@shadingcount=\count317
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex
+File: pgfcoreimage.code.tex 2023-01-15 v3.1.10 (3.1.10)
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal.code.tex
+File: pgfcoreexternal.code.tex 2023-01-15 v3.1.10 (3.1.10)
+\pgfexternal@startupbox=\box70
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex
+File: pgfcorelayers.code.tex 2023-01-15 v3.1.10 (3.1.10)
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransparency.code.tex
+File: pgfcoretransparency.code.tex 2023-01-15 v3.1.10 (3.1.10)
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex
+File: pgfcorepatterns.code.tex 2023-01-15 v3.1.10 (3.1.10)
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/basiclayer/pgfcorerdf.code.tex
+File: pgfcorerdf.code.tex 2023-01-15 v3.1.10 (3.1.10)
+))) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.tex
+File: pgfmoduleshapes.code.tex 2023-01-15 v3.1.10 (3.1.10)
+\pgfnodeparttextbox=\box71
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.tex
+File: pgfmoduleplot.code.tex 2023-01-15 v3.1.10 (3.1.10)
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-0-65.sty
+Package: pgfcomp-version-0-65 2023-01-15 v3.1.10 (3.1.10)
+\pgf@nodesepstart=\dimen268
+\pgf@nodesepend=\dimen269
+) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-1-18.sty
+Package: pgfcomp-version-1-18 2023-01-15 v3.1.10 (3.1.10)
+)) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/pgf/utilities/pgffor.sty (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/pgf/utilities/pgfkeys.sty (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex)) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/pgf/math/pgfmath.sty (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex)) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex
+Package: pgffor 2023-01-15 v3.1.10 (3.1.10)
+\pgffor@iter=\dimen270
+\pgffor@skip=\dimen271
+\pgffor@stack=\toks37
+\pgffor@toks=\toks38
+)) (c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
+Package: tikz 2023-01-15 v3.1.10 (3.1.10)
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex
+File: pgflibraryplothandlers.code.tex 2023-01-15 v3.1.10 (3.1.10)
+\pgf@plot@mark@count=\count318
+\pgfplotmarksize=\dimen272
+)
+\tikz@lastx=\dimen273
+\tikz@lasty=\dimen274
+\tikz@lastxsaved=\dimen275
+\tikz@lastysaved=\dimen276
+\tikz@lastmovetox=\dimen277
+\tikz@lastmovetoy=\dimen278
+\tikzleveldistance=\dimen279
+\tikzsiblingdistance=\dimen280
+\tikz@figbox=\box72
+\tikz@figbox@bg=\box73
+\tikz@tempbox=\box74
+\tikz@tempbox@bg=\box75
+\tikztreelevel=\count319
+\tikznumberofchildren=\count320
+\tikznumberofcurrentchild=\count321
+\tikz@fig@count=\count322
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex
+File: pgfmodulematrix.code.tex 2023-01-15 v3.1.10 (3.1.10)
+\pgfmatrixcurrentrow=\count323
+\pgfmatrixcurrentcolumn=\count324
+\pgf@matrix@numberofcolumns=\count325
+)
+\tikz@expandcount=\count326
+(c:/Users/Jannik/AppData/Roaming/TinyTeX/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytopaths.code.tex
+File: tikzlibrarytopaths.code.tex 2023-01-15 v3.1.10 (3.1.10)
+)))
+
+! Package tikz Error: I did not find the tikz library 'quantikz2'. I looked for files named tikzlibraryquantikz2.code.tex and pgflibraryquantikz2.code.tex, but neither could be found in the current texmf trees..
+
+See the tikz package documentation for explanation.
+Type  H <return>  for immediate help.
+ ...                                              
+                                                  
+l.85 \usetikzlibrary{quantikz2}
+                                
+Here is how much of TeX's memory you used:
+ 24658 strings out of 476644
+ 521738 string characters out of 5797325
+ 1921406 words of memory out of 5000000
+ 46469 multiletter control sequences out of 15000+600000
+ 558085 words of font info for 38 fonts, out of 8000000 for 9000
+ 36 hyphenation exceptions out of 8191
+ 108i,1n,107p,10900b,271s stack positions out of 10000i,1000n,20000p,200000b,200000s
+
+No pages of output.
diff --git a/index.qmd b/index.qmd
index ae3095971822909835687fd94152700212628da8..736859e22739adaeebd3f9a1cee7055e6c0d47c2 100644
--- a/index.qmd
+++ b/index.qmd
@@ -11,5 +11,14 @@ If you spot an error, please send Jannik Hellenkamp an e-mail. You can contact J
 These lecture notes are released under the CC BY-NC 4.0 license, which can be found [here](https://creativecommons.org/licenses/by-nc/4.0/).
 
 ## Changelog {.unnumbered}
+
+
+#### Version 0.1.2 (31.05.2024)
+- minor changes to chapter 2
+- added chapter 9
+
 #### Version 0.1.1 (16.05.2024)
 - Started the lecture notes.
+
+
+
diff --git a/index.tex b/index.tex
new file mode 100644
index 0000000000000000000000000000000000000000..a852dbff81470ff0470a0a1a556bb1eb28fba06f
--- /dev/null
+++ b/index.tex
@@ -0,0 +1,763 @@
+% Options for packages loaded elsewhere
+\PassOptionsToPackage{unicode}{hyperref}
+\PassOptionsToPackage{hyphens}{url}
+\PassOptionsToPackage{dvipsnames,svgnames,x11names}{xcolor}
+%
+\documentclass[
+  letterpaper,
+  DIV=11,
+  numbers=noendperiod]{scrreprt}
+
+\usepackage{amsmath,amssymb}
+\usepackage{iftex}
+\ifPDFTeX
+  \usepackage[T1]{fontenc}
+  \usepackage[utf8]{inputenc}
+  \usepackage{textcomp} % provide euro and other symbols
+\else % if luatex or xetex
+  \usepackage{unicode-math}
+  \defaultfontfeatures{Scale=MatchLowercase}
+  \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
+\fi
+\usepackage{lmodern}
+\ifPDFTeX\else  
+    % xetex/luatex font selection
+\fi
+% Use upquote if available, for straight quotes in verbatim environments
+\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
+\IfFileExists{microtype.sty}{% use microtype if available
+  \usepackage[]{microtype}
+  \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
+}{}
+\makeatletter
+\@ifundefined{KOMAClassName}{% if non-KOMA class
+  \IfFileExists{parskip.sty}{%
+    \usepackage{parskip}
+  }{% else
+    \setlength{\parindent}{0pt}
+    \setlength{\parskip}{6pt plus 2pt minus 1pt}}
+}{% if KOMA class
+  \KOMAoptions{parskip=half}}
+\makeatother
+\usepackage{xcolor}
+\setlength{\emergencystretch}{3em} % prevent overfull lines
+\setcounter{secnumdepth}{5}
+% Make \paragraph and \subparagraph free-standing
+\ifx\paragraph\undefined\else
+  \let\oldparagraph\paragraph
+  \renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
+\fi
+\ifx\subparagraph\undefined\else
+  \let\oldsubparagraph\subparagraph
+  \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
+\fi
+
+
+\providecommand{\tightlist}{%
+  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}\usepackage{longtable,booktabs,array}
+\usepackage{calc} % for calculating minipage widths
+% Correct order of tables after \paragraph or \subparagraph
+\usepackage{etoolbox}
+\makeatletter
+\patchcmd\longtable{\par}{\if@noskipsec\mbox{}\fi\par}{}{}
+\makeatother
+% Allow footnotes in longtable head/foot
+\IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}}
+\makesavenoteenv{longtable}
+\usepackage{graphicx}
+\makeatletter
+\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
+\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
+\makeatother
+% Scale images if necessary, so that they will not overflow the page
+% margins by default, and it is still possible to overwrite the defaults
+% using explicit options in \includegraphics[width, height, ...]{}
+\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
+% Set default figure placement to htbp
+\makeatletter
+\def\fps@figure{htbp}
+\makeatother
+
+\usepackage{physics}
+\RedeclareSectionCommand[style=section]{chapter}
+\renewcommand{\part}[1]{\empty}
+\usepackage{tikz}
+\usetikzlibrary{quantikz2}
+\KOMAoption{captions}{tableheading}
+\makeatletter
+\@ifpackageloaded{tcolorbox}{}{\usepackage[skins,breakable]{tcolorbox}}
+\@ifpackageloaded{fontawesome5}{}{\usepackage{fontawesome5}}
+\definecolor{quarto-callout-color}{HTML}{909090}
+\definecolor{quarto-callout-note-color}{HTML}{0758E5}
+\definecolor{quarto-callout-important-color}{HTML}{CC1914}
+\definecolor{quarto-callout-warning-color}{HTML}{EB9113}
+\definecolor{quarto-callout-tip-color}{HTML}{00A047}
+\definecolor{quarto-callout-caution-color}{HTML}{FC5300}
+\definecolor{quarto-callout-color-frame}{HTML}{acacac}
+\definecolor{quarto-callout-note-color-frame}{HTML}{4582ec}
+\definecolor{quarto-callout-important-color-frame}{HTML}{d9534f}
+\definecolor{quarto-callout-warning-color-frame}{HTML}{f0ad4e}
+\definecolor{quarto-callout-tip-color-frame}{HTML}{02b875}
+\definecolor{quarto-callout-caution-color-frame}{HTML}{fd7e14}
+\makeatother
+\makeatletter
+\@ifpackageloaded{bookmark}{}{\usepackage{bookmark}}
+\makeatother
+\makeatletter
+\@ifpackageloaded{caption}{}{\usepackage{caption}}
+\AtBeginDocument{%
+\ifdefined\contentsname
+  \renewcommand*\contentsname{Table of contents}
+\else
+  \newcommand\contentsname{Table of contents}
+\fi
+\ifdefined\listfigurename
+  \renewcommand*\listfigurename{List of Figures}
+\else
+  \newcommand\listfigurename{List of Figures}
+\fi
+\ifdefined\listtablename
+  \renewcommand*\listtablename{List of Tables}
+\else
+  \newcommand\listtablename{List of Tables}
+\fi
+\ifdefined\figurename
+  \renewcommand*\figurename{Figure}
+\else
+  \newcommand\figurename{Figure}
+\fi
+\ifdefined\tablename
+  \renewcommand*\tablename{Table}
+\else
+  \newcommand\tablename{Table}
+\fi
+}
+\@ifpackageloaded{float}{}{\usepackage{float}}
+\floatstyle{ruled}
+\@ifundefined{c@chapter}{\newfloat{codelisting}{h}{lop}}{\newfloat{codelisting}{h}{lop}[chapter]}
+\floatname{codelisting}{Listing}
+\newcommand*\listoflistings{\listof{codelisting}{List of Listings}}
+\usepackage{amsthm}
+\theoremstyle{definition}
+\newtheorem{definition}{Definition}[chapter]
+\theoremstyle{plain}
+\newtheorem{theorem}{Theorem}[chapter]
+\theoremstyle{remark}
+\AtBeginDocument{\renewcommand*{\proofname}{Proof}}
+\newtheorem*{remark}{Remark}
+\newtheorem*{solution}{Solution}
+\newtheorem{refremark}{Remark}[chapter]
+\newtheorem{refsolution}{Solution}[chapter]
+\makeatother
+\makeatletter
+\makeatother
+\makeatletter
+\@ifpackageloaded{caption}{}{\usepackage{caption}}
+\@ifpackageloaded{subcaption}{}{\usepackage{subcaption}}
+\makeatother
+\ifLuaTeX
+  \usepackage{selnolig}  % disable illegal ligatures
+\fi
+\usepackage{bookmark}
+
+\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
+\urlstyle{same} % disable monospaced font for URLs
+\hypersetup{
+  pdftitle={Introduction to Quantum Computing},
+  pdfauthor={Jannik Hellenkamp; Dominique Unruh},
+  colorlinks=true,
+  linkcolor={blue},
+  filecolor={Maroon},
+  citecolor={Blue},
+  urlcolor={Blue},
+  pdfcreator={LaTeX via pandoc}}
+
+\title{Introduction to Quantum Computing}
+\usepackage{etoolbox}
+\makeatletter
+\providecommand{\subtitle}[1]{% add subtitle to \maketitle
+  \apptocmd{\@title}{\par {\large #1 \par}}{}{}
+}
+\makeatother
+\subtitle{Lecture notes for the summer term 2024}
+\author{Jannik Hellenkamp \and Dominique Unruh}
+\date{2024-05-31}
+
+\begin{document}
+\maketitle
+
+\renewcommand*\contentsname{Table of contents}
+{
+\hypersetup{linkcolor=}
+\setcounter{tocdepth}{2}
+\tableofcontents
+}
+\bookmarksetup{startatroot}
+
+\chapter*{Welcome}\label{welcome}
+\addcontentsline{toc}{chapter}{Welcome}
+
+\markboth{Welcome}{Welcome}
+
+These are the lecture notes for the ``Introduction to Quantum
+Computing'' lecture held by Dominique Unruh at RWTH Aachen in the summer
+term 2024. The lecture notes are updated throughout the semester and
+should be viewed as an addition to the handwritten notes and the lecture
+recordings.
+
+If you spot an error, please send Jannik Hellenkamp an e-mail. You can
+contact Jannik by sending an e-mail to firstname.lastname@rwth-aachen.de
+(please replace first and lastname with Jannik's full name). If you have
+a question of understanding, please ask it in the Moodle forum.
+
+These lecture notes are released under the CC BY-NC 4.0 license, which
+can be found
+\href{https://creativecommons.org/licenses/by-nc/4.0/}{here}.
+
+\section*{Changelog}\label{changelog}
+\addcontentsline{toc}{section}{Changelog}
+
+\markright{Changelog}
+
+\subsubsection*{Version 0.1.2
+(31.05.2024)}\label{version-0.1.2-31.05.2024}
+\addcontentsline{toc}{subsubsection}{Version 0.1.2 (31.05.2024)}
+
+\begin{itemize}
+\tightlist
+\item
+  minor changes to chapter 2
+\item
+  added chapter 9
+\end{itemize}
+
+\subsubsection*{Version 0.1.1
+(16.05.2024)}\label{version-0.1.1-16.05.2024}
+\addcontentsline{toc}{subsubsection}{Version 0.1.1 (16.05.2024)}
+
+\begin{itemize}
+\tightlist
+\item
+  Started the lecture notes.
+\end{itemize}
+
+\part{Quantum Basics}
+
+\chapter{Introduction}\label{introduction}
+
+\section{Double slit experiment}\label{double-slit-experiment}
+
+This section will be updated later on, since there is quite a lot of
+graphical stuff.
+
+\section{What is a quantum computer?}\label{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 \emph{bits} which
+can either be in the state \(0\) \emph{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 \emph{qubit} which
+can be in a superposition \emph{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-\emph{qu}bit integer
+would be described by 64 qubits which are in a superposition between
+\(0\) and \(2^{64}-1\). This can be imagined best as a variable where
+the universe has not yet decided on its value and therefore 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 \emph{quantum
+parallelism}.
+
+\begin{tcolorbox}[enhanced jigsaw, leftrule=.75mm, title={Example: Quantum parallelism}, opacityback=0, arc=.35mm, bottomtitle=1mm, opacitybacktitle=0.6, toptitle=1mm, toprule=.15mm, left=2mm, titlerule=0mm, coltitle=black, rightrule=.15mm, breakable, bottomrule=.15mm, colback=white, colframe=quarto-callout-tip-color-frame, colbacktitle=quarto-callout-tip-color!10!white]
+
+Let's say you have a quantum variable \(x\) in a superposition of
+numbers 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)\).
+
+\end{tcolorbox}
+
+Reading this, one might be tempted to utilize quantum parallelism to 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 state of a qubit (also called \emph{measuring}), the
+universe decides randomly on an outcome and therefore when measuring we
+only get the result of one computation and all the rest of the
+information is lost.
+
+\begin{tcolorbox}[enhanced jigsaw, leftrule=.75mm, title={Example (continued): Quantum parallelism}, opacityback=0, arc=.35mm, bottomtitle=1mm, opacitybacktitle=0.6, toptitle=1mm, toprule=.15mm, left=2mm, titlerule=0mm, coltitle=black, rightrule=.15mm, breakable, bottomrule=.15mm, colback=white, colframe=quarto-callout-tip-color-frame, colbacktitle=quarto-callout-tip-color!10!white]
+
+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.
+
+\end{tcolorbox}
+
+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 us useful information in some cases.
+
+\chapter{Probabilistic systems}\label{sec-prob}
+
+To describe a quantum computer mathematically, we can do math similar to
+the known topic of probabilistic systems. We therefore first look into
+describing a probabilistic system.
+
+\section{Deterministic possibilities}\label{deterministic-possibilities}
+
+At first we need to define all the different possible outcomes of our
+system. For example, for a coin flip this could be \emph{heads} or
+\emph{tails} and for a dice this could be the labels of the different
+sides. We call these possibilities \emph{deterministic possibilities}.
+Note that we will only be using a \emph{finite} number of possibilities.
+
+\begin{tcolorbox}[enhanced jigsaw, leftrule=.75mm, title={Example: Random 2-bit number}, opacityback=0, arc=.35mm, bottomtitle=1mm, opacitybacktitle=0.6, toptitle=1mm, toprule=.15mm, left=2mm, titlerule=0mm, coltitle=black, rightrule=.15mm, breakable, bottomrule=.15mm, colback=white, colframe=quarto-callout-tip-color-frame, colbacktitle=quarto-callout-tip-color!10!white]
+
+Imagine you have a random number generator, which outputs 2-bit numbers.
+The deterministic possibilities of this generator are \(00\), \(01\),
+\(10\) and \(11\).
+
+\end{tcolorbox}
+
+\section{Probability distribution}\label{probability-distribution}
+
+Next, we need to assign each possibility a probability. We write this as
+\(\Pr[x]=p\) where \(p \in [0,1]\) is the probability of the
+deterministic possibility \(x\).
+
+\begin{tcolorbox}[enhanced jigsaw, leftrule=.75mm, title={Example: Coin flip}, opacityback=0, arc=.35mm, bottomtitle=1mm, opacitybacktitle=0.6, toptitle=1mm, toprule=.15mm, left=2mm, titlerule=0mm, coltitle=black, rightrule=.15mm, breakable, bottomrule=.15mm, colback=white, colframe=quarto-callout-tip-color-frame, colbacktitle=quarto-callout-tip-color!10!white]
+
+For a coin flip the probability of heads would be
+\(\Pr[\text{heads}] = \frac{1}{2}\) and the probability for tails would
+be \(\Pr[\text{tails}] = \frac{1}{2}\).
+
+\end{tcolorbox}
+
+If we combine all probabilities for all the possible outcomes and write
+them as a vector, we get a \emph{probability distribution}.
+
+\begin{tcolorbox}[enhanced jigsaw, toprule=.15mm, left=2mm, leftrule=.75mm, opacityback=0, arc=.35mm, breakable, rightrule=.15mm, bottomrule=.15mm, colframe=quarto-callout-note-color-frame, colback=white]
+
+\begin{definition}[Probability
+distribution]\protect\hypertarget{def-prob-distribution}{}\label{def-prob-distribution}
+
+A vector \(d \in \mathbb{R}^n\) is a valid probability distribution iff
+\(\sum d_i = 1\) and \(\forall i\) \(d_i \geq 0\).
+
+\end{definition}
+
+\end{tcolorbox}
+
+This vector has \(n\) entries, where each entry corresponds to a
+deterministic possibility \(X\) and the probability of \(X\) is
+\(\Pr[X] = d_i\). The sum over all probabilities has to be \(1\) and
+each entry needs to be nonnegative in order to be a valid probability.
+
+\begin{tcolorbox}[enhanced jigsaw, leftrule=.75mm, title={Example (continued): Coin flip}, opacityback=0, arc=.35mm, bottomtitle=1mm, opacitybacktitle=0.6, toptitle=1mm, toprule=.15mm, left=2mm, titlerule=0mm, coltitle=black, rightrule=.15mm, breakable, bottomrule=.15mm, colback=white, colframe=quarto-callout-tip-color-frame, colbacktitle=quarto-callout-tip-color!10!white]
+
+For a coin flip the probability distribution would be
+\(d_{\text{coin}} \in \mathbb{R}^2\) with
+\(d = \begin{pmatrix}\frac{1}{2}\\ \frac{1}{2} \end{pmatrix}\)
+
+\end{tcolorbox}
+
+\begin{tcolorbox}[enhanced jigsaw, leftrule=.75mm, title={Example (continued): Random 2-bit number}, opacityback=0, arc=.35mm, bottomtitle=1mm, opacitybacktitle=0.6, toptitle=1mm, toprule=.15mm, left=2mm, titlerule=0mm, coltitle=black, rightrule=.15mm, breakable, bottomrule=.15mm, colback=white, colframe=quarto-callout-tip-color-frame, colbacktitle=quarto-callout-tip-color!10!white]
+
+Recall your random 2-bit number generator from above. Imagine your
+generator outputs each deterministic possibility with equal probability,
+except for the possibility \(00\), which is never generated. The
+corresponding probability distribution would be \[
+d_{\text{2-bit}} = \begin{pmatrix} 0 \\ \frac{1}{3}\\ \frac{1}{3} \\ \frac{1}{3} \end{pmatrix}
+\]
+
+\end{tcolorbox}
+
+\section{Probabilistic processes}\label{sec-prob-apply}
+
+With a probability distribution, we can only describe the probabilities
+of possibilities without any knowledge of a prior state. We therefore
+add another element to our toolbox of probabilistic systems called a
+\emph{probabilistic process}.
+
+A probabilistic process is a collection of \(n\) probability
+distributions, where for each deterministic possibility \(i\) there is a
+probability distribution \(a_i\). This means, that if the system is in
+deterministic possibility \(i\) before the process is applied, the
+system will afterwards be distributed according to \(a_i\). We can write
+this as a matrix, where each column is a probability distribution
+\(a_i\).
+
+\begin{tcolorbox}[enhanced jigsaw, toprule=.15mm, left=2mm, leftrule=.75mm, opacityback=0, arc=.35mm, breakable, rightrule=.15mm, bottomrule=.15mm, colframe=quarto-callout-note-color-frame, colback=white]
+
+\begin{definition}[Probabilistic
+process]\protect\hypertarget{def-prob-process}{}\label{def-prob-process}
+
+A matrix \(A \in \mathbb{R}^{n\times n}\) is a valid probabilistic
+process iff for every column \(a\) of \(A\), \(a\) is a valid
+probability distribution.
+
+\end{definition}
+
+\end{tcolorbox}
+
+From Definition~\ref{def-prob-distribution} we know that a valid
+probability distribution \(a\) has the properties \(\sum a_i = 1\) and
+\(\forall i\) \(a_i \geq 0\), therefore a matrix \(A\) is a
+probabilistic process iff \(A \in \mathbb{R}^{n \times n}\) with
+\(\sum a_i = 1\) and \(\forall i\) \(a_i \geq 0\) . Such a matrix is
+also called a \emph{stochastic matrix}.
+
+\begin{tcolorbox}[enhanced jigsaw, leftrule=.75mm, title={Example (continued): Random 2-bit number}, opacityback=0, arc=.35mm, bottomtitle=1mm, opacitybacktitle=0.6, toptitle=1mm, toprule=.15mm, left=2mm, titlerule=0mm, coltitle=black, rightrule=.15mm, breakable, bottomrule=.15mm, colback=white, colframe=quarto-callout-tip-color-frame, colbacktitle=quarto-callout-tip-color!10!white]
+
+Imagine a second device, which receives a 2-bit number as an input and
+flips both bits at the same time with a probability of \(\frac{1}{3}\).
+The probability distributions for each of the deterministic possibility
+would then be \[
+a_{00} = \begin{pmatrix} \frac{2}{3} \\ 0 \\ 0 \\ \frac{1}{3} \end{pmatrix}, a_{01} =\begin{pmatrix} 0 \\ \frac{2}{3} \\ \frac{1}{3} \\ 0  \end{pmatrix}, a_{10} =\begin{pmatrix} 0 \\ \frac{1}{3} \\ \frac{2}{3} \\ 0  \end{pmatrix}, a_{11} = \begin{pmatrix} \frac{1}{3} \\ 0 \\ 0 \\ \frac{2}{3} \end{pmatrix}
+\] From this we can construct the process as a matrix from these
+processes as follows: \[
+A_{\text{flip}} = \begin{pmatrix} a_{00} & a_{01} & a_{10} & a_{11} \end{pmatrix} = \begin{pmatrix} \frac{2}{3} & 0 & 0 &  \frac{1}{3} \\ 0 &  \frac{2}{3} &  \frac{1}{3} & 0 \\ 0 &  \frac{1}{3} &  \frac{2}{3} & 0 \\  \frac{1}{3} & 0 & 0 &  \frac{2}{3} \end{pmatrix}
+\]
+
+\end{tcolorbox}
+
+\subsection*{Applying a probabilistic
+process}\label{applying-a-probabilistic-process}
+\addcontentsline{toc}{subsection}{Applying a probabilistic process}
+
+Having defined probability distributions and probabilistic processes, we
+can now combine these two elements and apply a probabilistic process on
+a probability distribution.
+
+\begin{tcolorbox}[enhanced jigsaw, toprule=.15mm, left=2mm, leftrule=.75mm, opacityback=0, arc=.35mm, breakable, rightrule=.15mm, bottomrule=.15mm, colframe=quarto-callout-note-color-frame, colback=white]
+
+\begin{definition}[Applying a probabilistic
+process]\protect\hypertarget{def-prob-apply}{}\label{def-prob-apply}
+
+Given an initial probability distribution \(x \in \mathbb{R}^n\) and a
+probabilistic process \(A \in \mathbb{R}^{n\times n}\), the result
+\(y \in \mathbb{R}^n\) of applying the process \(A\) is defined as \[
+y = Ax 
+\]
+
+\end{definition}
+
+\end{tcolorbox}
+
+\begin{tcolorbox}[enhanced jigsaw, leftrule=.75mm, title={Example (continued): Random 2-bit number}, opacityback=0, arc=.35mm, bottomtitle=1mm, opacitybacktitle=0.6, toptitle=1mm, toprule=.15mm, left=2mm, titlerule=0mm, coltitle=black, rightrule=.15mm, breakable, bottomrule=.15mm, colback=white, colframe=quarto-callout-tip-color-frame, colbacktitle=quarto-callout-tip-color!10!white]
+
+Recall the 2-bit number generator and the bit flip from above. Imagine
+you would first draw a random 2-bit number from the generator and then
+run the bit flip device. We already know that the probability
+distribution of the generator is \(d_\text{2-bit}\). Using
+\(A_\text{flip}\) we can calculate the final probability distribution:
+\[
+A_\text{flip} \cdot d_\text{2-bit} = \begin{pmatrix} \frac{2}{3} & 0 & 0 &  \frac{1}{3} \\ 0 &  \frac{2}{3} &  \frac{1}{3} & 0 \\ 0 &  \frac{1}{3} &  \frac{2}{3} & 0 \\  \frac{1}{3} & 0 & 0 &  \frac{2}{3} \end{pmatrix}\begin{pmatrix} 0 \\ \frac{1}{3}\\ \frac{1}{3} \\ \frac{1}{3} \end{pmatrix} = \begin{pmatrix} \frac{1}{9} \\ \frac{1}{3}\\ \frac{1}{3} \\ \frac{2}{9} \end{pmatrix}
+\]
+
+\end{tcolorbox}
+
+\chapter{Quantum systems}\label{quantum-systems}
+
+\chapter{Observing probabilistic and measuring quantum
+systems}\label{observing-probabilistic-and-measuring-quantum-systems}
+
+\chapter{Partial observing and measuring
+systems}\label{partial-observing-and-measuring-systems}
+
+\chapter{Composite Systems}\label{composite-systems}
+
+\chapter{Quantum Circuits}\label{quantum-circuits}
+
+\chapter{Ket Notation}\label{ket-notation}
+
+\part{Quantum Algorithms}
+
+\chapter{Bernstein-Vazirani
+Algorithm}\label{bernstein-vazirani-algorithm}
+
+\chapter{Shor's Algorithm}\label{shors-algorithm}
+
+One of the best known quantum algorithm is Shor's algorithm for finding
+the prime factors of an integer. It was developed by Peter Shor in 1994.
+
+\section{Discrete Fourier
+Transformation}\label{discrete-fourier-transformation}
+
+One of the tools required for Shor's algorithm is the Discrete Fourier
+Transformation (DFT). Generally, a Fourier transformation is a
+mathematical technique that decomposes a function into its constituent
+frequencies. We use the DFT to find the period of a vector.
+
+The DFT is defined as follows:
+
+\begin{tcolorbox}[enhanced jigsaw, toprule=.15mm, left=2mm, leftrule=.75mm, opacityback=0, arc=.35mm, breakable, rightrule=.15mm, bottomrule=.15mm, colframe=quarto-callout-note-color-frame, colback=white]
+
+\begin{definition}[Discrete Fourier Transformation
+(DFT)]\protect\hypertarget{def-shor-dft}{}\label{def-shor-dft}
+
+The discrete Fourier transform (DFT) is a linear transformation on
+\(\mathbb{C}^N\) represented by the matrix \[
+\operatorname{DFT}_N = \frac{1}{\sqrt{N}} (\omega^{kl})_{kl} \in \mathbb{C}^{N\times N}
+\] with \(\omega = e^{2i\pi/N}\), which is the \(N\)-th root of unity.
+
+\end{definition}
+
+\end{tcolorbox}
+
+This transformation is best imagined as a process, which takes a
+periodic vector as an input and outputs the period of that vector. The
+DFT has some important properties, which help us later on.
+
+\begin{tcolorbox}[enhanced jigsaw, toprule=.15mm, left=2mm, leftrule=.75mm, opacityback=0, arc=.35mm, breakable, rightrule=.15mm, bottomrule=.15mm, colframe=quarto-callout-note-color-frame, colback=white]
+
+\begin{theorem}[Properties of the
+DFT]\protect\hypertarget{thm-dft-properties}{}\label{thm-dft-properties}
+
+Here are some properties of the DFT which can be used without further
+proof.
+
+\begin{enumerate}
+\def\labelenumi{\arabic{enumi}.}
+\tightlist
+\item
+  The DFT is unitary.
+\item
+  \(\omega^t = \omega^{t\mod N}\) for all \(t \in \mathbb{Z}\).
+\item
+  Given a quantum state \(\psi \in \mathbb{C}^N\) which is
+  \(r\)-periodic and where \(r\mid N\), \(\operatorname{DFT}_N \psi\)
+  will compute a quantum state \(\phi \in \mathbb{C}^N\), which has
+  non-zero values on the multiples of \(\frac{N}{r}\). Note that
+  \(\frac{N}{r}\) intuitively represents the frequency of \(\psi\). This
+  means, that \[
+  |\phi_i| = \begin{cases} \frac{1}{\sqrt{t}}, & \text{if}\ \frac{N}{t}\mid i \\ 0, & \text{otherwise} \end{cases}
+  \]
+\end{enumerate}
+
+\end{theorem}
+
+\end{tcolorbox}
+
+\section{Reducing factoring to period
+finding}\label{reducing-factoring-to-period-finding}
+
+With the DFT, we have seen, that we can use a unitary to find the period
+of a quantum state. We now look into using period finding to factor
+integers. We first look at the definition of the two problems:
+
+\begin{tcolorbox}[enhanced jigsaw, toprule=.15mm, left=2mm, leftrule=.75mm, opacityback=0, arc=.35mm, breakable, rightrule=.15mm, bottomrule=.15mm, colframe=quarto-callout-note-color-frame, colback=white]
+
+\begin{definition}[Factoring
+problem]\protect\hypertarget{def-shor-factoring}{}\label{def-shor-factoring}
+
+Given integer \(N\) with two prime factors \(p,q\) such that \(pq=N\)
+and \(p \neq q\), find \(p\) and \(q\).
+
+\end{definition}
+
+\end{tcolorbox}
+
+Note that this definition of the factoring problem is a simplified
+version of the factoring problem, where \(N\) has only 2 prime factors.
+
+\begin{tcolorbox}[enhanced jigsaw, toprule=.15mm, left=2mm, leftrule=.75mm, opacityback=0, arc=.35mm, breakable, rightrule=.15mm, bottomrule=.15mm, colframe=quarto-callout-note-color-frame, colback=white]
+
+\begin{definition}[Period finding
+problem]\protect\hypertarget{def-shor-period}{}\label{def-shor-period}
+
+Given \(f: \mathbb{Z} \to X\) with \(f(x) = f(y)\) iff
+\(x \equiv y \bmod r\) for some fixed secret \(r\). \(r\) is called the
+\emph{period} of \(f\). Find \(r\).
+
+\end{definition}
+
+\end{tcolorbox}
+
+To start the reduction, we need a special case of the period finding
+problem called order finding:
+
+\begin{tcolorbox}[enhanced jigsaw, toprule=.15mm, left=2mm, leftrule=.75mm, opacityback=0, arc=.35mm, breakable, rightrule=.15mm, bottomrule=.15mm, colframe=quarto-callout-note-color-frame, colback=white]
+
+\begin{definition}[Order finding
+problem]\protect\hypertarget{def-shor-order}{}\label{def-shor-order}
+
+For known \(a\) and \(N\) which are relatively prime, find the period
+\(r\) of \(f(i) = a^i \bmod n\). We call \(r\) the order of \(a\)
+written \(r = \text{ ord } a\). (This is similar to finding the smallest
+\(i > 0\) with \(f(i) = 1\)).
+
+\end{definition}
+
+\end{tcolorbox}
+
+Since the order finding problem is just the period finding problem for a
+specific \(f(x)\), we know that if we can solve the period finding
+problem within reasonable runtime, we can also solve the order finding
+problem within reasonable runtime. We now reduce the factoring problem
+to the order finding problem:
+
+We have a integer \(N\) as an input for the factoring problem.
+
+\begin{enumerate}
+\def\labelenumi{\arabic{enumi}.}
+\tightlist
+\item
+  Pick an \(a \in \{1,...,N-1\}\) with \(a\) relatively prime to \(n\).
+\item
+  Compute the order of \(a\), so that \(r = \text{ ord } a\) (using the
+  solver for the order finding problem).
+\item
+  If the order \(r\) is odd, we abort.
+\item
+  Calculate \(x:= a^{\frac{r}{2}}+1 \bmod N\) and
+  \(y:= a^{\frac{r}{2}}-1 \bmod N\).
+\item
+  If \(\gcd(x,N) \in \{1,N\}\), we abort.
+\item
+  We compute \(p = \gcd(x,N)\) and \(q = \gcd(y,N)\).
+\end{enumerate}
+
+The output of the reduction are \(p,q\), such that \(pq = N\). This
+holds, since \[
+xy = (a^{\frac{r}{2}}+1) (a^{\frac{r}{2}}-1) = a^r - 1 \equiv 1-1 = 0 \pmod N 
+\]
+
+\begin{tcolorbox}[enhanced jigsaw, toprule=.15mm, left=2mm, leftrule=.75mm, opacityback=0, arc=.35mm, breakable, rightrule=.15mm, bottomrule=.15mm, colframe=quarto-callout-note-color-frame, colback=white]
+
+\begin{theorem}[Probability of an
+abort]\protect\hypertarget{thm-shor-abort}{}\label{thm-shor-abort}
+
+If \(N\) has at least two different prime factors and \(N\) is odd, then
+the probability to abort is \(\leq \frac{1}{2}\).
+
+\end{theorem}
+
+\end{tcolorbox}
+
+All in all this reduction shows, that if we have an oracle which can
+solve the period finding problem within reasonable runtime, we can also
+solve the factoring problem within reasonable runtime (since all other
+operations are classically fast to compute).
+
+\section{The quantum algorithm for period finding}\label{sec-shor-algo}
+
+We now look into an quantum algorithm that solves the period finding
+problem within reasonable runtime. The quantum circuit for Shor's
+algorithm requires a \(f:\{0,1\}^n\rightarrow\{0,1\}^m\) which is
+\(r\)-periodic and is show in this figure:
+
+\begin{figure}[H]
+
+{\centering \includegraphics[width=1\textwidth,height=\textheight]{shor.pdf}
+
+}
+
+\caption{Shor's algorithm (quantum part)}
+
+\end{figure}%
+
+The algorithm works as follows:
+
+\begin{enumerate}
+\def\labelenumi{\arabic{enumi}.}
+\tightlist
+\item
+  We start with a \(\ket{0}\) entry on every wire.
+\item
+  We bring the top wire into the superposition over all entries. The
+  quantum state is then
+  \(2^\frac{-n}{2}\sum_x \ket{x} \otimes \ket{0^m}\).
+\item
+  We apply \(U_f\), which is the unitary of
+  \(f:\{0,1\}^n\rightarrow\{0,1\}^m\). This calculates the superposition
+  over all possible values \(f(x)\) on the bottom wire. The resulting
+  quantum state is \(\frac{-n}{2}\sum_x \ket{x,f(x)}\).
+\item
+  To understand the algorithm better, we measure the bottom wire at this
+  point. This will give us one random value \(f(x_0)\) for some \(x_0\).
+  The top wire will then contain a superposition over all values \(x\)
+  where \(f(x) = f(x_0)\). Since \(f\) is know to be \(r\)-periodic, we
+  know, that \(f(x) = f(x_0)\) iff \(x \equiv x_0 \bmod r\). This means,
+  that on the resulting quantum state on the top wire is periodic and
+  can be written as
+  \(\frac{1}{\sqrt{2^\frac{n}{r}}} \sum_{x\equiv x_0 \bmod r} \ket{x} \otimes \ket{f(x_0)}\).
+\item
+  We apply the Discrete Fourier Transform on the top wire. This will
+  ``analyze'' the top wire for the period and output a vector with
+  entries at multiples of \(\frac{2^n}{r}\) as seen in
+  Theorem~\ref{thm-dft-properties}. For simplicity we assume, that
+  \(r \mid 2^n\) holds.
+\item
+  We measure the top wire and get one random multiple of
+  \(\frac{2^n}{r}\), which we can denote as \(a\cdot\frac{2^n}{r}\)
+\end{enumerate}
+
+Since we get a multiple of \(\frac{2^n}{r}\) on each run, we can simply
+run the algorithm multiple times to get different multiples and then
+compute \(\frac{2^n}{r}\) by taking the gcd of those multiples. From
+that we compute \(r\).
+
+Unfortunately this only works because we assumed \(r \mid 2^n\). Since
+this does usually not hold, we only get approximate multiples of
+\(\frac{2^n}{r}\) (which is not even an integer) and thus post
+processing is a bit more complex.
+
+\section{Post processing}\label{post-processing}
+
+So far we have seen the DFT to analyze the period of a quantum state, we
+have seen a way to reduce the factoring problem to the period finding
+and we have seen a quantum algorithm for finding an approximate multiple
+of such a period of a function. We just need one final step to find
+\(r\). For this we start with a theorem:
+
+\begin{tcolorbox}[enhanced jigsaw, toprule=.15mm, left=2mm, leftrule=.75mm, opacityback=0, arc=.35mm, breakable, rightrule=.15mm, bottomrule=.15mm, colframe=quarto-callout-note-color-frame, colback=white]
+
+\begin{theorem}[]\protect\hypertarget{thm-shor-post-process}{}\label{thm-shor-post-process}
+
+If \(\{0,1\}^n \rightarrow \{0,1\}^n\) is \(r\)-periodic with
+probability \(\Omega(1/\log\log r)\) the following holds: \[
+\frac{-r}{2} \leq rc\bmod 2^n \leq \frac{r}{2}
+\] where \(c\) is the output of the second measurement of the quantum
+circuit described in Section~\ref{sec-shor-algo}.
+
+\end{theorem}
+
+\end{tcolorbox}
+
+We assume that the theorem holds for our outcome of the second
+measurement (If that is not the case, our result will be wrong and we
+can just run the quantum algorithm again to get a different outcome):
+
+Then exists a \(d\) such that: \[
+\begin{aligned}
+&\lvert rc - d2^n\rvert \leq \frac{r}{2} \\
+\Leftrightarrow&\lvert \frac{c}{2^n} - \frac{d}{r}\rvert \leq \frac{1}{2^{n+1}}
+\end{aligned}
+\] The fraction \(\frac{c}{2^n}\) is know so the goal is to find a
+fraction \(\frac{d}{r}\) that is \(\frac{1}{2^{n+1}}\) close to
+\(\frac{c}{2^n}\).
+
+The rest of postprocessing will be updated after the next lecture.
+
+
+
+\end{document}
diff --git a/_book/introduction.html b/introduction.html
similarity index 91%
rename from _book/introduction.html
rename to introduction.html
index fe3d397faba2e724ae10e8b1d2a2d1f903f4ac10..0d7cd334631012b881d0dfaf681f276a83cb5bd8 100644
--- a/_book/introduction.html
+++ b/introduction.html
@@ -181,6 +181,59 @@ window.Quarto = {
   <a href="./probabilisticSystems.html" class="sidebar-item-text sidebar-link">
  <span class="menu-text"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Probabilistic systems</span></span></a>
   </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./quantumSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Quantum systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./observingSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Observing probabilistic and measuring quantum systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./partialObserving.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Partial observing and measuring systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./compositeSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Composite Systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./quantumCircutsKetNotation.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Quantum Circuits</span></span></a>
+  </div>
+</li>
+      </ul>
+  </li>
+        <li class="sidebar-item sidebar-item-section">
+      <div class="sidebar-item-container"> 
+            <a href="./quantumAlgorithms.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text">Quantum Algorithms</span></a>
+          <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true" aria-label="Toggle section">
+            <i class="bi bi-chevron-right ms-2"></i>
+          </a> 
+      </div>
+      <ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 show">  
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./bernsteinVazirani.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Bernstein-Vazirani Algorithm</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./shorsAlgorithm.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">9</span>&nbsp; <span class="chapter-title">Shor’s Algorithm</span></span></a>
+  </div>
 </li>
       </ul>
   </li>
diff --git a/observingSystems.html b/observingSystems.html
new file mode 100644
index 0000000000000000000000000000000000000000..e9b9fe0af9b3625af216d4c3e2c1de48ede54204
--- /dev/null
+++ b/observingSystems.html
@@ -0,0 +1,755 @@
+<!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 - 4&nbsp; Observing probabilistic and measuring quantum 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="./partialObserving.html" rel="next">
+<link href="./quantumSystems.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="./observingSystems.html"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Observing probabilistic and measuring quantum 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>&nbsp; <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>&nbsp; <span class="chapter-title">Probabilistic systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./quantumSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Quantum systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./observingSystems.html" class="sidebar-item-text sidebar-link active">
+ <span class="menu-text"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Observing probabilistic and measuring quantum systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./partialObserving.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Partial observing and measuring systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./compositeSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Composite Systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./quantumCircutsKetNotation.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Quantum Circuits</span></span></a>
+  </div>
+</li>
+      </ul>
+  </li>
+        <li class="sidebar-item sidebar-item-section">
+      <div class="sidebar-item-container"> 
+            <a href="./quantumAlgorithms.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text">Quantum Algorithms</span></a>
+          <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true" aria-label="Toggle section">
+            <i class="bi bi-chevron-right ms-2"></i>
+          </a> 
+      </div>
+      <ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 show">  
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./bernsteinVazirani.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Bernstein-Vazirani Algorithm</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./shorsAlgorithm.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">9</span>&nbsp; <span class="chapter-title">Shor’s Algorithm</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="./observingSystems.html"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Observing probabilistic and measuring quantum systems</span></a></li></ol></nav>
+<div class="quarto-title">
+<h1 class="title"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Observing probabilistic and measuring quantum systems</span></h1>
+</div>
+
+
+
+<div class="quarto-title-meta">
+
+    
+  
+    
+  </div>
+  
+
+
+</header>
+
+
+<!--
+So far we only talked about the description of a probabilistic and a quantum system. We now look into observing/measuring those systems. 
+
+## Observing a probabilistic system 
+
+Observing a probabilistic system is the process of obtaining an outcome from a probability distribution.
+
+::: {.callout-note appearance="minimal" icon=false}
+::: {.definition #def-observing-probabilistic}
+
+## Observing a probabilistic system
+Given a probability distribution $d \in \mathbb{R}^n$, we will get the outcome $i$ with a probability $d_i$. The new distribution is then 
+$$
+e_i = \begin{pmatrix} 0 \\ \vdots \\ 0 \\ 1 \\ 0 \\ \vdots \\ 0 \end{pmatrix}  \leftarrow \text{1 at the $i$-th position}
+$$
+:::
+:::
+When observing a probabilistic system, the observation is just a passive process with no impact on the system. This means, that there is no difference to the end result, if we observe during the process. We take a look at an example to further understand this. 
+
+::: {.callout-tip icon=false}
+
+## Example: Random 1-bit number
+
+We usa a the random 1-bit number example to the random 2-bit example from @sec-prob.
+We have a distribution $d_{\text{1-bit}} = \begin{pmatrix} \frac{1}{2} \\ \frac{1}{2} \end{pmatrix}$ which represents the probability distribution of generating a 1-bit number with equal probability. We also have a process $A_{\text{flip}} = \begin{pmatrix} \frac{2}{3} &  \frac{1}{3} \\ \frac{1}{3} &  \frac{2}{3} \end{pmatrix}$ which flips the bit with a probability of $\frac{1}{3}$. 
+
+We look at two different cases: For the first case, we observe only the final distribution and for the second case we observe after the generation of the 1-bit number and we also observe the final distribution. 
+
+##### Observing the final distribution {.unnumbered}
+
+From @sec-prob-apply we know that the final distribution $d$ is 
+$$
+d = A_{\text{flip}} \cdot d_{\text{1-bit}} = \begin{pmatrix} \frac{2}{3} &  \frac{1}{3} \\ \frac{1}{3} &  \frac{2}{3} \end{pmatrix} \begin{pmatrix} \frac{1}{2} \\ \frac{1}{2} \end{pmatrix} = \begin{pmatrix} \frac{1}{2} \\ \frac{1}{2} \end{pmatrix}
+$$
+We observe this distribution and will get outcome $0$ and the new distribution $d = e_0 = \begin{pmatrix} 1 \\ 0 \end{pmatrix}$ with a probability of $d_0 = \frac{1}{2}$ and the outcome $1$ and the new distribution $d = e_1 = \begin{pmatrix} 0 \\ 1 \end{pmatrix}$ with a probability of $d_1 = \frac{1}{2}$.
+
+##### Observing after generation {.unnumbered}
+
+We now observe the system after the generation of the 1-bit number and also observe the final distribution
+
+:::
+
+## Measuring a quantum system
+
+Unlike in the probabilistic system, the "observation" of a quantum system is called *measuring*. The definition is similar to the observation of a probabilistic system, except that we need to take the absolute square of the amplitude to get the probability and that the state after measuring is called *post measurement state* (p.m.s.). 
+
+::: {.callout-note appearance="minimal" icon=false}
+::: {.definition #def-observing-probabilistic}
+
+## Measuring a quantum system
+Given a quantum State $\psi \in \mathbb{C}^n$, we will get the outcome $i$ with a probability $|\psi_i|^2$. The post measurement state (p.m.s.) is then 
+$$
+e_i = \begin{pmatrix} 0 \\ \vdots \\ 0 \\ 1 \\ 0 \\ \vdots \\ 0 \end{pmatrix}  \leftarrow \text{1 at the $i$-th position}
+$$
+:::
+:::
+
+With this similarity in to the probabilistic observation in the definition, one might assume, that measuring a quantum state has also no impact on the system. **This is not the case, measuring a quantum state changes the system!** We can see this effect with an example:
+
+::: {.callout-tip icon=false}
+
+## Example: Measuring a quantum system
+
+Let $\psi = \begin{pmatrix} \frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} \end{pmatrix}$ be a quantum state and $H=\frac{1}{\sqrt{2}}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}$ be a unitary transformation. We look at two different cases: First we apply $H$ immediately and then measure the system. As a second case, we do a measurement before the application of the $H$ unitary and then a measurement after applying it. 
+
+##### Measure the final state {.unnumbered}
+
+We first calculate the state after applying $H$:
+$$
+H\psi = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix} \begin{pmatrix} \frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} \end{pmatrix} =  \begin{pmatrix} 1 \\ 0 \end{pmatrix}
+$$
+
+Measuring this state will get the outcome $0$ with probability $|\psi_0|^2 = 1$ and have the post measurement state $\begin{pmatrix} 1 \\ 0 \end{pmatrix}$.
+
+
+:::
+
+
+
+## Elitzur–Vaidman bomb tester
+
+This section will be updated later on. 
+
+-->
+
+
+
+</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("https:\/\/qis\.rwth-aachen\.de\/teaching\/24ss\/intro-quantum-computing\/script\/");
+    var isInternal = (href) => {
+        return filterRegex.test(href) || localhostRegex.test(href) || mailtoRegex.test(href);
+    }
+    // Inspect non-navigation links and adorn them if external
+ 	var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool)');
+    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="./quantumSystems.html" class="pagination-link" aria-label="Quantum systems">
+        <i class="bi bi-arrow-left-short"></i> <span class="nav-page-text"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Quantum systems</span></span>
+      </a>          
+  </div>
+  <div class="nav-page nav-page-next">
+      <a href="./partialObserving.html" class="pagination-link" aria-label="Partial observing and measuring systems">
+        <span class="nav-page-text"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Partial observing and measuring 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/observingSystems.qmd b/observingSystems.qmd
new file mode 100644
index 0000000000000000000000000000000000000000..b1e0c82389f6f8def1e2e356937aa4f6700641d9
--- /dev/null
+++ b/observingSystems.qmd
@@ -0,0 +1,86 @@
+# Observing probabilistic and measuring quantum systems
+
+<!--
+So far we only talked about the description of a probabilistic and a quantum system. We now look into observing/measuring those systems. 
+
+## Observing a probabilistic system 
+
+Observing a probabilistic system is the process of obtaining an outcome from a probability distribution.
+
+::: {.callout-note appearance="minimal" icon=false}
+::: {.definition #def-observing-probabilistic}
+
+## Observing a probabilistic system
+Given a probability distribution $d \in \mathbb{R}^n$, we will get the outcome $i$ with a probability $d_i$. The new distribution is then 
+$$
+e_i = \begin{pmatrix} 0 \\ \vdots \\ 0 \\ 1 \\ 0 \\ \vdots \\ 0 \end{pmatrix}  \leftarrow \text{1 at the $i$-th position}
+$$
+:::
+:::
+When observing a probabilistic system, the observation is just a passive process with no impact on the system. This means, that there is no difference to the end result, if we observe during the process. We take a look at an example to further understand this. 
+
+::: {.callout-tip icon=false}
+
+## Example: Random 1-bit number
+
+We usa a the random 1-bit number example to the random 2-bit example from @sec-prob.
+We have a distribution $d_{\text{1-bit}} = \begin{pmatrix} \frac{1}{2} \\ \frac{1}{2} \end{pmatrix}$ which represents the probability distribution of generating a 1-bit number with equal probability. We also have a process $A_{\text{flip}} = \begin{pmatrix} \frac{2}{3} &  \frac{1}{3} \\ \frac{1}{3} &  \frac{2}{3} \end{pmatrix}$ which flips the bit with a probability of $\frac{1}{3}$. 
+
+We look at two different cases: For the first case, we observe only the final distribution and for the second case we observe after the generation of the 1-bit number and we also observe the final distribution. 
+
+##### Observing the final distribution {.unnumbered}
+
+From @sec-prob-apply we know that the final distribution $d$ is 
+$$
+d = A_{\text{flip}} \cdot d_{\text{1-bit}} = \begin{pmatrix} \frac{2}{3} &  \frac{1}{3} \\ \frac{1}{3} &  \frac{2}{3} \end{pmatrix} \begin{pmatrix} \frac{1}{2} \\ \frac{1}{2} \end{pmatrix} = \begin{pmatrix} \frac{1}{2} \\ \frac{1}{2} \end{pmatrix}
+$$
+We observe this distribution and will get outcome $0$ and the new distribution $d = e_0 = \begin{pmatrix} 1 \\ 0 \end{pmatrix}$ with a probability of $d_0 = \frac{1}{2}$ and the outcome $1$ and the new distribution $d = e_1 = \begin{pmatrix} 0 \\ 1 \end{pmatrix}$ with a probability of $d_1 = \frac{1}{2}$.
+
+##### Observing after generation {.unnumbered}
+
+We now observe the system after the generation of the 1-bit number and also observe the final distribution
+
+:::
+
+## Measuring a quantum system
+
+Unlike in the probabilistic system, the "observation" of a quantum system is called *measuring*. The definition is similar to the observation of a probabilistic system, except that we need to take the absolute square of the amplitude to get the probability and that the state after measuring is called *post measurement state* (p.m.s.). 
+
+::: {.callout-note appearance="minimal" icon=false}
+::: {.definition #def-observing-probabilistic}
+
+## Measuring a quantum system
+Given a quantum State $\psi \in \mathbb{C}^n$, we will get the outcome $i$ with a probability $|\psi_i|^2$. The post measurement state (p.m.s.) is then 
+$$
+e_i = \begin{pmatrix} 0 \\ \vdots \\ 0 \\ 1 \\ 0 \\ \vdots \\ 0 \end{pmatrix}  \leftarrow \text{1 at the $i$-th position}
+$$
+:::
+:::
+
+With this similarity in to the probabilistic observation in the definition, one might assume, that measuring a quantum state has also no impact on the system. **This is not the case, measuring a quantum state changes the system!** We can see this effect with an example:
+
+::: {.callout-tip icon=false}
+
+## Example: Measuring a quantum system
+
+Let $\psi = \begin{pmatrix} \frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} \end{pmatrix}$ be a quantum state and $H=\frac{1}{\sqrt{2}}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}$ be a unitary transformation. We look at two different cases: First we apply $H$ immediately and then measure the system. As a second case, we do a measurement before the application of the $H$ unitary and then a measurement after applying it. 
+
+##### Measure the final state {.unnumbered}
+
+We first calculate the state after applying $H$:
+$$
+H\psi = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix} \begin{pmatrix} \frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} \end{pmatrix} =  \begin{pmatrix} 1 \\ 0 \end{pmatrix}
+$$
+
+Measuring this state will get the outcome $0$ with probability $|\psi_0|^2 = 1$ and have the post measurement state $\begin{pmatrix} 1 \\ 0 \end{pmatrix}$.
+
+
+:::
+
+
+
+## Elitzur–Vaidman bomb tester
+
+This section will be updated later on. 
+
+-->
\ No newline at end of file
diff --git a/partialObserving.html b/partialObserving.html
new file mode 100644
index 0000000000000000000000000000000000000000..22d5fba3d4bf6ffedc49d1d4fb1f90292842cf76
--- /dev/null
+++ b/partialObserving.html
@@ -0,0 +1,671 @@
+<!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 - 5&nbsp; Partial observing and measuring 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="./compositeSystems.html" rel="next">
+<link href="./observingSystems.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="./partialObserving.html"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Partial observing and measuring 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>&nbsp; <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>&nbsp; <span class="chapter-title">Probabilistic systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./quantumSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Quantum systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./observingSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Observing probabilistic and measuring quantum systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./partialObserving.html" class="sidebar-item-text sidebar-link active">
+ <span class="menu-text"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Partial observing and measuring systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./compositeSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Composite Systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./quantumCircutsKetNotation.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Quantum Circuits</span></span></a>
+  </div>
+</li>
+      </ul>
+  </li>
+        <li class="sidebar-item sidebar-item-section">
+      <div class="sidebar-item-container"> 
+            <a href="./quantumAlgorithms.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text">Quantum Algorithms</span></a>
+          <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true" aria-label="Toggle section">
+            <i class="bi bi-chevron-right ms-2"></i>
+          </a> 
+      </div>
+      <ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 show">  
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./bernsteinVazirani.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Bernstein-Vazirani Algorithm</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./shorsAlgorithm.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">9</span>&nbsp; <span class="chapter-title">Shor’s Algorithm</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="./partialObserving.html"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Partial observing and measuring systems</span></a></li></ol></nav>
+<div class="quarto-title">
+<h1 class="title"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Partial observing and measuring systems</span></h1>
+</div>
+
+
+
+<div class="quarto-title-meta">
+
+    
+  
+    
+  </div>
+  
+
+
+</header>
+
+
+
+
+
+</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("https:\/\/qis\.rwth-aachen\.de\/teaching\/24ss\/intro-quantum-computing\/script\/");
+    var isInternal = (href) => {
+        return filterRegex.test(href) || localhostRegex.test(href) || mailtoRegex.test(href);
+    }
+    // Inspect non-navigation links and adorn them if external
+ 	var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool)');
+    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="./observingSystems.html" class="pagination-link" aria-label="Observing probabilistic and measuring quantum systems">
+        <i class="bi bi-arrow-left-short"></i> <span class="nav-page-text"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Observing probabilistic and measuring quantum systems</span></span>
+      </a>          
+  </div>
+  <div class="nav-page nav-page-next">
+      <a href="./compositeSystems.html" class="pagination-link" aria-label="Composite Systems">
+        <span class="nav-page-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Composite 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/partialObserving.qmd b/partialObserving.qmd
new file mode 100644
index 0000000000000000000000000000000000000000..838181a71654b46d0ba8d3fed5bd145b00a7dc06
--- /dev/null
+++ b/partialObserving.qmd
@@ -0,0 +1 @@
+# Partial observing and measuring systems
diff --git a/_book/probabilisticSystems.html b/probabilisticSystems.html
similarity index 88%
rename from _book/probabilisticSystems.html
rename to probabilisticSystems.html
index ea3d7787b93152cd98ed270cf065c8ed18957b38..d55352e481f41f6fa6fd4b8ee2b5967b9d83a96e 100644
--- a/_book/probabilisticSystems.html
+++ b/probabilisticSystems.html
@@ -30,6 +30,7 @@ ul.task-list li input[type="checkbox"] {
 <script src="site_libs/quarto-search/fuse.min.js"></script>
 <script src="site_libs/quarto-search/quarto-search.js"></script>
 <meta name="quarto:offset" content="./">
+<link href="./quantumSystems.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>
@@ -180,6 +181,59 @@ window.Quarto = {
   <a href="./probabilisticSystems.html" class="sidebar-item-text sidebar-link active">
  <span class="menu-text"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Probabilistic systems</span></span></a>
   </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./quantumSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Quantum systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./observingSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Observing probabilistic and measuring quantum systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./partialObserving.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Partial observing and measuring systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./compositeSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Composite Systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./quantumCircutsKetNotation.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Quantum Circuits</span></span></a>
+  </div>
+</li>
+      </ul>
+  </li>
+        <li class="sidebar-item sidebar-item-section">
+      <div class="sidebar-item-container"> 
+            <a href="./quantumAlgorithms.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text">Quantum Algorithms</span></a>
+          <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true" aria-label="Toggle section">
+            <i class="bi bi-chevron-right ms-2"></i>
+          </a> 
+      </div>
+      <ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 show">  
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./bernsteinVazirani.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Bernstein-Vazirani Algorithm</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./shorsAlgorithm.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">9</span>&nbsp; <span class="chapter-title">Shor’s Algorithm</span></span></a>
+  </div>
 </li>
       </ul>
   </li>
@@ -195,7 +249,7 @@ window.Quarto = {
   <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><a href="#sec-prob-apply" id="toc-sec-prob-apply" class="nav-link" data-scroll-target="#sec-prob-apply"><span class="header-section-number">2.3</span> Probabilistic processes</a>
   <ul class="collapse">
   <li><a href="#applying-a-probabilistic-process" id="toc-applying-a-probabilistic-process" class="nav-link" data-scroll-target="#applying-a-probabilistic-process">Applying a probabilistic process</a></li>
   </ul></li>
@@ -207,7 +261,7 @@ window.Quarto = {
 
 <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>&nbsp; <span class="chapter-title">Probabilistic systems</span></a></li></ol></nav>
 <div class="quarto-title">
-<h1 class="title"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Probabilistic systems</span></h1>
+<h1 class="title"><span id="sec-prob" class="quarto-section-identifier"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Probabilistic systems</span></span></h1>
 </div>
 
 
@@ -266,7 +320,7 @@ Example: Coin flip
 </div>
 <div class="callout-body-container">
 <div id="def-prob-distribution" class="definition theorem">
-<p><span class="theorem-title"><strong>Definition 2.1 (Probability distribution)</strong></span> A vector <span class="math inline">\(d \in \mathbb{R}^n\)</span> is a valid probability distribution iff <span class="math inline">\(\sum d_i = 1\)</span> and <span class="math inline">\(\forall i\)</span> <span class="math inline">\(d_i \geq 0\)</span></p>
+<p><span class="theorem-title"><strong>Definition 2.1 (Probability distribution)</strong></span> A vector <span class="math inline">\(d \in \mathbb{R}^n\)</span> is a valid probability distribution iff <span class="math inline">\(\sum d_i = 1\)</span> and <span class="math inline">\(\forall i\)</span> <span class="math inline">\(d_i \geq 0\)</span>.</p>
 </div>
 </div>
 </div>
@@ -301,8 +355,8 @@ d_{\text{2-bit}} = \begin{pmatrix} 0 \\ \frac{1}{3}\\ \frac{1}{3} \\ \frac{1}{3}
 </div>
 </div>
 </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 id="sec-prob-apply" class="level2" data-number="2.3">
+<h2 data-number="2.3" class="anchored" data-anchor-id="sec-prob-apply"><span class="header-section-number">2.3</span> Probabilistic processes</h2>
 <p>With a probability distribution, we can only describe the probabilities of possibilities without any knowledge of a prior state. We therefore add another element to our toolbox of probabilistic systems called a <em>probabilistic process</em>.</p>
 <p>A probabilistic process is a collection of <span class="math inline">\(n\)</span> probability distributions, where for each deterministic possibility <span class="math inline">\(i\)</span> there is a probability distribution <span class="math inline">\(a_i\)</span>. This means, that if the system is in deterministic possibility <span class="math inline">\(i\)</span> before the process is applied, the system will afterwards be distributed according to <span class="math inline">\(a_i\)</span>. We can write this as a matrix, where each column is a probability distribution <span class="math inline">\(a_i\)</span>.</p>
 <div class="callout callout-style-simple callout-note no-icon">
@@ -317,7 +371,7 @@ d_{\text{2-bit}} = \begin{pmatrix} 0 \\ \frac{1}{3}\\ \frac{1}{3} \\ \frac{1}{3}
 </div>
 </div>
 </div>
-<p>From <a href="#def-prob-distribution" class="quarto-xref">Definition&nbsp;<span>2.1</span></a> we know that a valid probability distribution <span class="math inline">\(a\)</span> has the properties <span class="math inline">\(\sum a_i = 1\)</span> and <span class="math inline">\(\forall i\)</span> <span class="math inline">\(a_i \geq 0\)</span>, therefore a matrix <span class="math inline">\(A\)</span> is a probabilistic process iff <span class="math inline">\(A \in \mathbb{R}^{n \times n}\)</span> with <span class="math inline">\(\sum a_i = 1\)</span> and <span class="math inline">\(\forall i\)</span> <span class="math inline">\(a_i \geq 0\)</span> . Such a matrix is also called a <em>stochastic matrix</em>.</p>
+<p>From <a href="#def-prob-distribution" class="quarto-xref">Definition&nbsp;<span class="quarto-unresolved-ref">def-prob-distribution</span></a> we know that a valid probability distribution <span class="math inline">\(a\)</span> has the properties <span class="math inline">\(\sum a_i = 1\)</span> and <span class="math inline">\(\forall i\)</span> <span class="math inline">\(a_i \geq 0\)</span>, therefore a matrix <span class="math inline">\(A\)</span> is a probabilistic process iff <span class="math inline">\(A \in \mathbb{R}^{n \times n}\)</span> with <span class="math inline">\(\sum a_i = 1\)</span> and <span class="math inline">\(\forall i\)</span> <span class="math inline">\(a_i \geq 0\)</span> . Such a matrix is also called a <em>stochastic matrix</em>.</p>
 <div class="callout callout-style-simple callout-tip no-icon callout-titled">
 <div class="callout-header d-flex align-content-center">
 <div class="callout-icon-container">
@@ -345,7 +399,7 @@ A_{\text{flip}} = \begin{pmatrix} a_{00} &amp; a_{01} &amp; a_{10} &amp; a_{11}
 </div>
 <div class="callout-body-container">
 <div id="def-prob-apply" class="definition theorem">
-<p><span class="theorem-title"><strong>Definition 2.3 (Applying a probabilistic process)</strong></span> Given an initial probability distribution <span class="math inline">\(x\)</span> and a probabilistic process <span class="math inline">\(A\)</span>, the result <span class="math inline">\(y\)</span> of applying the process <span class="math inline">\(A\)</span> is defined as <span class="math display">\[
+<p><span class="theorem-title"><strong>Definition 2.3 (Applying a probabilistic process)</strong></span> Given an initial probability distribution <span class="math inline">\(x \in \mathbb{R}^n\)</span> and a probabilistic process <span class="math inline">\(A \in \mathbb{R}^{n\times n}\)</span>, the result <span class="math inline">\(y \in \mathbb{R}^n\)</span> of applying the process <span class="math inline">\(A\)</span> is defined as <span class="math display">\[
 y = Ax
 \]</span></p>
 </div>
@@ -362,7 +416,7 @@ Example (continued): Random 2-bit number
 </div>
 </div>
 <div class="callout-body-container callout-body">
-<p>Recall the 2-bit number generator and the bit flip from above. Imagine you would first draw a random 2-bit number from the generator and then run the bit flip device. We already know that the probability distribution of the generator is <span class="math inline">\(M_\text{2-bit}\)</span>. Using <span class="math inline">\(A_\text{flip}\)</span> we can calculate the final probability distribution: <span class="math display">\[
+<p>Recall the 2-bit number generator and the bit flip from above. Imagine you would first draw a random 2-bit number from the generator and then run the bit flip device. We already know that the probability distribution of the generator is <span class="math inline">\(d_\text{2-bit}\)</span>. Using <span class="math inline">\(A_\text{flip}\)</span> we can calculate the final probability distribution: <span class="math display">\[
 A_\text{flip} \cdot d_\text{2-bit} = \begin{pmatrix} \frac{2}{3} &amp; 0 &amp; 0 &amp;  \frac{1}{3} \\ 0 &amp;  \frac{2}{3} &amp;  \frac{1}{3} &amp; 0 \\ 0 &amp;  \frac{1}{3} &amp;  \frac{2}{3} &amp; 0 \\  \frac{1}{3} &amp; 0 &amp; 0 &amp;  \frac{2}{3} \end{pmatrix}\begin{pmatrix} 0 \\ \frac{1}{3}\\ \frac{1}{3} \\ \frac{1}{3} \end{pmatrix} = \begin{pmatrix} \frac{1}{9} \\ \frac{1}{3}\\ \frac{1}{3} \\ \frac{2}{9} \end{pmatrix}
 \]</span></p>
 </div>
@@ -789,6 +843,9 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
       </a>          
   </div>
   <div class="nav-page nav-page-next">
+      <a href="./quantumSystems.html" class="pagination-link" aria-label="Quantum systems">
+        <span class="nav-page-text"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Quantum systems</span></span> <i class="bi bi-arrow-right-short"></i>
+      </a>
   </div>
 </nav>
 </div> <!-- /content -->
diff --git a/probabilisticSystems.qmd b/probabilisticSystems.qmd
index d4c9a68d5d53471f43e2c523f763d0de0b2001f8..a3445ffac1d24a959ee6d8641b12cff45f7337f5 100644
--- a/probabilisticSystems.qmd
+++ b/probabilisticSystems.qmd
@@ -1,4 +1,4 @@
-# Probabilistic systems
+# Probabilistic systems {#sec-prob}
 To describe a quantum computer mathematically, we can do math similar to the known topic of probabilistic systems. We therefore first look into describing a probabilistic system. 
 
 ## Deterministic possibilities
@@ -25,7 +25,7 @@ If we combine all probabilities for all the possible outcomes and write them as
 ::: {.definition #def-prob-distribution}
 
 ## Probability distribution
-A vector $d \in \mathbb{R}^n$ is a valid probability distribution iff $\sum d_i = 1$ and $\forall i$ $d_i \geq 0$
+A vector $d \in \mathbb{R}^n$ is a valid probability distribution iff $\sum d_i = 1$ and $\forall i$ $d_i \geq 0$.
 
 :::
 :::
@@ -46,7 +46,7 @@ d_{\text{2-bit}} = \begin{pmatrix} 0 \\ \frac{1}{3}\\ \frac{1}{3} \\ \frac{1}{3}
 $$
 :::
 
-## Probabilistic processes
+## Probabilistic processes {#sec-prob-apply}
 With a probability distribution, we can only describe the probabilities of possibilities without any knowledge of a prior state. We therefore add another element to our toolbox of probabilistic systems called a *probabilistic process*. 
 
 A probabilistic process is a collection of $n$ probability distributions, where for each deterministic possibility $i$ there is a probability distribution $a_i$. This means, that if the system is in deterministic possibility $i$ before the process is applied, the system will afterwards be distributed according to $a_i$. We can write this as a matrix, where each column is a probability distribution $a_i$. 
@@ -83,7 +83,7 @@ Having defined probability distributions and probabilistic processes, we can now
 ::: {.definition #def-prob-apply}
 
 ## Applying a probabilistic process
-Given an initial probability distribution $x$ and a probabilistic process $A$, the result $y$ of applying the process $A$ is defined as
+Given an initial probability distribution $x \in \mathbb{R}^n$ and a probabilistic process $A \in \mathbb{R}^{n\times n}$, the result $y \in \mathbb{R}^n$ of applying the process $A$ is defined as
 $$
 y = Ax 
 $$
@@ -94,7 +94,7 @@ $$
 ::: {.callout-tip icon=false}
 
 ## Example (continued): Random 2-bit number
-Recall the 2-bit number generator and the bit flip from above. Imagine you would first draw a random 2-bit number from the generator and then run the bit flip device. We already know that the probability distribution of the generator is $M_\text{2-bit}$. Using $A_\text{flip}$ we can calculate the final probability distribution:
+Recall the 2-bit number generator and the bit flip from above. Imagine you would first draw a random 2-bit number from the generator and then run the bit flip device. We already know that the probability distribution of the generator is $d_\text{2-bit}$. Using $A_\text{flip}$ we can calculate the final probability distribution:
 $$
 A_\text{flip} \cdot d_\text{2-bit} = \begin{pmatrix} \frac{2}{3} & 0 & 0 &  \frac{1}{3} \\ 0 &  \frac{2}{3} &  \frac{1}{3} & 0 \\ 0 &  \frac{1}{3} &  \frac{2}{3} & 0 \\  \frac{1}{3} & 0 & 0 &  \frac{2}{3} \end{pmatrix}\begin{pmatrix} 0 \\ \frac{1}{3}\\ \frac{1}{3} \\ \frac{1}{3} \end{pmatrix} = \begin{pmatrix} \frac{1}{9} \\ \frac{1}{3}\\ \frac{1}{3} \\ \frac{2}{9} \end{pmatrix}
 $$
diff --git a/quantumAlgorithms.html b/quantumAlgorithms.html
new file mode 100644
index 0000000000000000000000000000000000000000..aaafb8e271fecd49ebd9a6912c88ec943f3665e9
--- /dev/null
+++ b/quantumAlgorithms.html
@@ -0,0 +1,671 @@
+<!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 - Quantum Algorithms</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="./bernsteinVazirani.html" rel="next">
+<link href="./quantumCircutsKetNotation.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="./quantumAlgorithms.html">Quantum Algorithms</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>&nbsp; <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>&nbsp; <span class="chapter-title">Probabilistic systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./quantumSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Quantum systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./observingSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Observing probabilistic and measuring quantum systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./partialObserving.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Partial observing and measuring systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./compositeSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Composite Systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./quantumCircutsKetNotation.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Quantum Circuits</span></span></a>
+  </div>
+</li>
+      </ul>
+  </li>
+        <li class="sidebar-item sidebar-item-section">
+      <div class="sidebar-item-container"> 
+            <a href="./quantumAlgorithms.html" class="sidebar-item-text sidebar-link active">
+ <span class="menu-text">Quantum Algorithms</span></a>
+          <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true" aria-label="Toggle section">
+            <i class="bi bi-chevron-right ms-2"></i>
+          </a> 
+      </div>
+      <ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 show">  
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./bernsteinVazirani.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Bernstein-Vazirani Algorithm</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./shorsAlgorithm.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">9</span>&nbsp; <span class="chapter-title">Shor’s Algorithm</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">
+<div class="quarto-title">
+<h1 class="title">Quantum Algorithms</h1>
+</div>
+
+
+
+<div class="quarto-title-meta">
+
+    
+  
+    
+  </div>
+  
+
+
+</header>
+
+
+
+
+
+</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("https:\/\/qis\.rwth-aachen\.de\/teaching\/24ss\/intro-quantum-computing\/script\/");
+    var isInternal = (href) => {
+        return filterRegex.test(href) || localhostRegex.test(href) || mailtoRegex.test(href);
+    }
+    // Inspect non-navigation links and adorn them if external
+ 	var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool)');
+    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="./quantumCircutsKetNotation.html" class="pagination-link" aria-label="Quantum Circuits">
+        <i class="bi bi-arrow-left-short"></i> <span class="nav-page-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Quantum Circuits</span></span>
+      </a>          
+  </div>
+  <div class="nav-page nav-page-next">
+      <a href="./bernsteinVazirani.html" class="pagination-link" aria-label="Bernstein-Vazirani Algorithm">
+        <span class="nav-page-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Bernstein-Vazirani Algorithm</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/quantumAlgorithms.qmd b/quantumAlgorithms.qmd
new file mode 100644
index 0000000000000000000000000000000000000000..6353630e379d373b608099c6da610b547ab26fad
--- /dev/null
+++ b/quantumAlgorithms.qmd
@@ -0,0 +1 @@
+# Quantum Algorithms
diff --git a/_book/quantumBasics.html b/quantumBasics.html
similarity index 89%
rename from _book/quantumBasics.html
rename to quantumBasics.html
index e776bea12a6a13487f85a48610823ba342c7bcca..1e946d007a3c7480a51b6e25400a6b71ad569167 100644
--- a/_book/quantumBasics.html
+++ b/quantumBasics.html
@@ -152,6 +152,59 @@ ul.task-list li input[type="checkbox"] {
   <a href="./probabilisticSystems.html" class="sidebar-item-text sidebar-link">
  <span class="menu-text"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Probabilistic systems</span></span></a>
   </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./quantumSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Quantum systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./observingSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Observing probabilistic and measuring quantum systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./partialObserving.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Partial observing and measuring systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./compositeSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Composite Systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./quantumCircutsKetNotation.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Quantum Circuits</span></span></a>
+  </div>
+</li>
+      </ul>
+  </li>
+        <li class="sidebar-item sidebar-item-section">
+      <div class="sidebar-item-container"> 
+            <a href="./quantumAlgorithms.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text">Quantum Algorithms</span></a>
+          <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true" aria-label="Toggle section">
+            <i class="bi bi-chevron-right ms-2"></i>
+          </a> 
+      </div>
+      <ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 show">  
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./bernsteinVazirani.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Bernstein-Vazirani Algorithm</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./shorsAlgorithm.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">9</span>&nbsp; <span class="chapter-title">Shor’s Algorithm</span></span></a>
+  </div>
 </li>
       </ul>
   </li>
diff --git a/quantumCircutsKetNotation.html b/quantumCircutsKetNotation.html
new file mode 100644
index 0000000000000000000000000000000000000000..69ab7c110b1d35b8934749fa9bff03d093867bce
--- /dev/null
+++ b/quantumCircutsKetNotation.html
@@ -0,0 +1,680 @@
+<!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 - 7&nbsp; Quantum Circuits</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="./quantumAlgorithms.html" rel="next">
+<link href="./compositeSystems.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="./quantumCircutsKetNotation.html"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Quantum Circuits</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>&nbsp; <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>&nbsp; <span class="chapter-title">Probabilistic systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./quantumSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Quantum systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./observingSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Observing probabilistic and measuring quantum systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./partialObserving.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Partial observing and measuring systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./compositeSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Composite Systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./quantumCircutsKetNotation.html" class="sidebar-item-text sidebar-link active">
+ <span class="menu-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Quantum Circuits</span></span></a>
+  </div>
+</li>
+      </ul>
+  </li>
+        <li class="sidebar-item sidebar-item-section">
+      <div class="sidebar-item-container"> 
+            <a href="./quantumAlgorithms.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text">Quantum Algorithms</span></a>
+          <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true" aria-label="Toggle section">
+            <i class="bi bi-chevron-right ms-2"></i>
+          </a> 
+      </div>
+      <ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 show">  
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./bernsteinVazirani.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Bernstein-Vazirani Algorithm</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./shorsAlgorithm.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">9</span>&nbsp; <span class="chapter-title">Shor’s Algorithm</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="#ket-notation" id="toc-ket-notation" class="nav-link active" data-scroll-target="#ket-notation"><span class="header-section-number">8</span> Ket Notation</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="./quantumCircutsKetNotation.html"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Quantum Circuits</span></a></li></ol></nav>
+<div class="quarto-title">
+<h1 class="title"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Quantum Circuits</span></h1>
+</div>
+
+
+
+<div class="quarto-title-meta">
+
+    
+  
+    
+  </div>
+  
+
+
+</header>
+
+
+<section id="ket-notation" class="level1" data-number="8">
+<h1 data-number="8"><span class="header-section-number">8</span> Ket Notation</h1>
+
+
+</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("https:\/\/qis\.rwth-aachen\.de\/teaching\/24ss\/intro-quantum-computing\/script\/");
+    var isInternal = (href) => {
+        return filterRegex.test(href) || localhostRegex.test(href) || mailtoRegex.test(href);
+    }
+    // Inspect non-navigation links and adorn them if external
+ 	var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool)');
+    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="./compositeSystems.html" class="pagination-link" aria-label="Composite Systems">
+        <i class="bi bi-arrow-left-short"></i> <span class="nav-page-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Composite Systems</span></span>
+      </a>          
+  </div>
+  <div class="nav-page nav-page-next">
+      <a href="./quantumAlgorithms.html" class="pagination-link" aria-label="Quantum Algorithms">
+        <span class="nav-page-text">Quantum Algorithms</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/quantumCircutsKetNotation.qmd b/quantumCircutsKetNotation.qmd
new file mode 100644
index 0000000000000000000000000000000000000000..9e39d263cb971e933b182ebebc1b03eb26806f6f
--- /dev/null
+++ b/quantumCircutsKetNotation.qmd
@@ -0,0 +1,3 @@
+# Quantum Circuits
+
+# Ket Notation
\ No newline at end of file
diff --git a/quantumSystems.html b/quantumSystems.html
new file mode 100644
index 0000000000000000000000000000000000000000..0cb5b29e8ea0070f6398c16b505aaca48944efe8
--- /dev/null
+++ b/quantumSystems.html
@@ -0,0 +1,757 @@
+<!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&nbsp; Quantum 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="./observingSystems.html" rel="next">
+<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>
+
+
+</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="./quantumSystems.html"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Quantum 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>&nbsp; <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>&nbsp; <span class="chapter-title">Probabilistic systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./quantumSystems.html" class="sidebar-item-text sidebar-link active">
+ <span class="menu-text"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Quantum systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./observingSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Observing probabilistic and measuring quantum systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./partialObserving.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Partial observing and measuring systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./compositeSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Composite Systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./quantumCircutsKetNotation.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Quantum Circuits</span></span></a>
+  </div>
+</li>
+      </ul>
+  </li>
+        <li class="sidebar-item sidebar-item-section">
+      <div class="sidebar-item-container"> 
+            <a href="./quantumAlgorithms.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text">Quantum Algorithms</span></a>
+          <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true" aria-label="Toggle section">
+            <i class="bi bi-chevron-right ms-2"></i>
+          </a> 
+      </div>
+      <ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 show">  
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./bernsteinVazirani.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Bernstein-Vazirani Algorithm</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./shorsAlgorithm.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">9</span>&nbsp; <span class="chapter-title">Shor’s Algorithm</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="./quantumSystems.html"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Quantum systems</span></a></li></ol></nav>
+<div class="quarto-title">
+<h1 class="title"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Quantum systems</span></h1>
+</div>
+
+
+
+<div class="quarto-title-meta">
+
+    
+  
+    
+  </div>
+  
+
+
+</header>
+
+
+<!--
+With the basics for a probabilistic system defined, we now look into describing a quantum computer mathematically. In the following table you can see the analogy from the quantum world to the probabilistic world. 
+
+| Probabilistic world           | Quantum world              |
+| ---------                     | -----------                |
+| Probability distributions     | Quantum states             |
+| Probabilities                 | Amplitudes                 |
+| Deterministic possibilities   | Classical possibilities    |
+| Stochastic matrix as process  | Unitary matrix as process  |
+
+## Quantum states
+One of the most important element of the quantum world is a quantum state. A quantum state describes the state of a quantum system as a vector. Each entry of the vector represents a *classical* possibility (similar to the deterministic possibilities in a probability distribution). The entries of a quantum state called *amplitude*. In contrast to a probabilistic system, these entries can be negative and are also complex numbers. 
+
+These amplitudes correlate to the probability of the quantum state being in the corresponding classical probability. To calculate the probabilities from the amplitude, we can take the square of the absolute value of the amplitude.
+
+This means, that for the classical possibility $x$ and a quantum state $\psi$ the probability for $x$ is $\Pr[x] = |\psi|^2$. To have valid probabilities, the sum of all probabilities need to sum up to $1$. From this we get the formal definition of a quantum state:
+
+::: {.callout-note appearance="minimal" icon=false}
+::: {.definition #def-quantum-state}
+
+## Quantum State
+
+A quantum state is a vector $\psi \in \mathbb{C}^n$ with $\sqrt{\sum |\psi|^2} = 1$.
+:::
+:::
+
+::: {.callout-tip icon=false}
+
+## Example: Some Quantum states
+The following vectors are valid quantum states with the classical possibilities $0$ and $1$:
+$$
+\ket{0} = \begin{pmatrix} 1 \\ 0 \end{pmatrix}\quad
+\ket{1} = \begin{pmatrix} 0 \\ 1 \end{pmatrix}\quad
+\ket{+} = \begin{pmatrix} \frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} \end{pmatrix}\quad
+\ket{-} = \begin{pmatrix} \frac{1}{\sqrt{2}} \\ -\frac{1}{\sqrt{2}} \end{pmatrix}
+$$
+Note that the symbol $\ket{}$ is not yet introduced, so just understand it as some label at this point. The probabilities for each state can be calculated as follows:
+$$
+\begin{aligned}
+\ket{0}: \Pr[0] &= |1|^2 = 1 \quad &&\Pr[1] = |0|^2 = 0 \\
+\ket{1}: \Pr[0] &= |0|^2 = 0 \quad &&\Pr[1] = |1|^2 = 1 \\
+\ket{+}: \Pr[0] &= |\frac{1}{\sqrt{2}}|^2 = \frac{1}{2} &&\Pr[1] = |\frac{1}{\sqrt{2}}|^2 = \frac{1}{2} \\
+\ket{-}: \Pr[0] &= |\frac{1}{\sqrt{2}}|^2 = \frac{1}{2} &&\Pr[1] = |\frac{-1}{\sqrt{2}}|^2 = \frac{1}{2}
+\end{aligned}
+$$
+We can see here, that two different quantum states ($\ket{+}$ and $\ket{-}$) can have the same probabilities for all classical possibilities. 
+:::
+
+## Unitary transformation
+We now have defined quantum states and need a way to describe  some processes, which we want to apply on the quantum states. In the probabilistic world, we have stochastic matrices for this, but unfortunately we can not use these matrices on quantum states, since the output of applying these on a quantum state is not guaranteed to be a quantum state again. We therefore make a new addition to our quantum toolbox called a *unitary transformation*. 
+
+::: {.callout-note appearance="minimal" icon=false}
+::: {.definition #def-unitary-transformation}
+
+## Unitary transformation
+Given a quantum state $\psi \in \mathbb{C}^n$ and a unitary matrix $U \in \mathbb{C}^{n\times n}$, the state after the transformation is $U\psi$.
+:::
+:::
+
+::: {.callout-note appearance="minimal" icon=false}
+::: {.lemma #lem-unitary-matrix}
+
+## Unitary matrix
+A matrix $U \in \mathbb{C}^{n\times n}$ is called *unitary* iff $U^\dagger U = I$ where $I$ is the identity matrix and $U^\dagger$ is the complex conjugate transpose of $U$.
+:::
+:::
+
+A unitary transformation is by definition invertible, therefore we can undo all unitary transformations by applying $U^\dagger$. 
+
+::: {.callout-tip icon=false}
+
+## Example: Some Unitary transformations
+The following matrices are  examples for unitary transformations:
+$$
+X = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} \quad Y =  \begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix} \quad Z =  \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}  
+$$
+These matrices are called Pauli-matrices, we will get to know them later on. 
+
+As an example for applying a unitary on a quantum state, we apply the Pauli $X$ matrix on the quantum state $\ket{0}$:
+
+$$
+X\ket{0} = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} \cdot \begin{pmatrix} 1 \\ 0 \end{pmatrix} = \begin{pmatrix} 0 \\ 1 \end{pmatrix} = \ket{1}
+$$
+:::
+
+-->
+
+
+
+</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("https:\/\/qis\.rwth-aachen\.de\/teaching\/24ss\/intro-quantum-computing\/script\/");
+    var isInternal = (href) => {
+        return filterRegex.test(href) || localhostRegex.test(href) || mailtoRegex.test(href);
+    }
+    // Inspect non-navigation links and adorn them if external
+ 	var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool)');
+    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>&nbsp; <span class="chapter-title">Probabilistic systems</span></span>
+      </a>          
+  </div>
+  <div class="nav-page nav-page-next">
+      <a href="./observingSystems.html" class="pagination-link" aria-label="Observing probabilistic and measuring quantum systems">
+        <span class="nav-page-text"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Observing probabilistic and measuring quantum 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/quantumSystems.qmd b/quantumSystems.qmd
index d1922d6b5cb12a3dc76d214df579e83210431592..3d08c9ca5d7278abec8bace08b91e5040d06dfe4 100644
--- a/quantumSystems.qmd
+++ b/quantumSystems.qmd
@@ -1,18 +1,88 @@
-# Quantum Systems
-With the basics for a probabilistic system defined, we now look into describing a quantum computer mathematically. We first compare the probabilistic world with the quantum world:
+# Quantum systems
 
-|  Probabilistic world   | Quantum world |
-| --------- | ----------- |
-|  Probability distributions   |   Quantum states    |
-| Paragraph |    Text     |
+<!--
+With the basics for a probabilistic system defined, we now look into describing a quantum computer mathematically. In the following table you can see the analogy from the quantum world to the probabilistic world. 
 
+| Probabilistic world           | Quantum world              |
+| ---------                     | -----------                |
+| Probability distributions     | Quantum states             |
+| Probabilities                 | Amplitudes                 |
+| Deterministic possibilities   | Classical possibilities    |
+| Stochastic matrix as process  | Unitary matrix as process  |
 
 ## Quantum states
+One of the most important element of the quantum world is a quantum state. A quantum state describes the state of a quantum system as a vector. Each entry of the vector represents a *classical* possibility (similar to the deterministic possibilities in a probability distribution). The entries of a quantum state called *amplitude*. In contrast to a probabilistic system, these entries can be negative and are also complex numbers. 
+
+These amplitudes correlate to the probability of the quantum state being in the corresponding classical probability. To calculate the probabilities from the amplitude, we can take the square of the absolute value of the amplitude.
+
+This means, that for the classical possibility $x$ and a quantum state $\psi$ the probability for $x$ is $\Pr[x] = |\psi|^2$. To have valid probabilities, the sum of all probabilities need to sum up to $1$. From this we get the formal definition of a quantum state:
+
+::: {.callout-note appearance="minimal" icon=false}
 ::: {.definition #def-quantum-state}
 
 ## Quantum State
 
-A quantum state is a vector $\psi \in \mathbb{C}^n$ with $\sqrt{\sum |\psi|^2} = 1$
+A quantum state is a vector $\psi \in \mathbb{C}^n$ with $\sqrt{\sum |\psi|^2} = 1$.
+:::
+:::
+
+::: {.callout-tip icon=false}
+
+## Example: Some Quantum states
+The following vectors are valid quantum states with the classical possibilities $0$ and $1$:
+$$
+\ket{0} = \begin{pmatrix} 1 \\ 0 \end{pmatrix}\quad
+\ket{1} = \begin{pmatrix} 0 \\ 1 \end{pmatrix}\quad
+\ket{+} = \begin{pmatrix} \frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} \end{pmatrix}\quad
+\ket{-} = \begin{pmatrix} \frac{1}{\sqrt{2}} \\ -\frac{1}{\sqrt{2}} \end{pmatrix}
+$$
+Note that the symbol $\ket{}$ is not yet introduced, so just understand it as some label at this point. The probabilities for each state can be calculated as follows:
+$$
+\begin{aligned}
+\ket{0}: \Pr[0] &= |1|^2 = 1 \quad &&\Pr[1] = |0|^2 = 0 \\
+\ket{1}: \Pr[0] &= |0|^2 = 0 \quad &&\Pr[1] = |1|^2 = 1 \\
+\ket{+}: \Pr[0] &= |\frac{1}{\sqrt{2}}|^2 = \frac{1}{2} &&\Pr[1] = |\frac{1}{\sqrt{2}}|^2 = \frac{1}{2} \\
+\ket{-}: \Pr[0] &= |\frac{1}{\sqrt{2}}|^2 = \frac{1}{2} &&\Pr[1] = |\frac{-1}{\sqrt{2}}|^2 = \frac{1}{2}
+\end{aligned}
+$$
+We can see here, that two different quantum states ($\ket{+}$ and $\ket{-}$) can have the same probabilities for all classical possibilities. 
+:::
+
+## Unitary transformation
+We now have defined quantum states and need a way to describe  some processes, which we want to apply on the quantum states. In the probabilistic world, we have stochastic matrices for this, but unfortunately we can not use these matrices on quantum states, since the output of applying these on a quantum state is not guaranteed to be a quantum state again. We therefore make a new addition to our quantum toolbox called a *unitary transformation*. 
+
+::: {.callout-note appearance="minimal" icon=false}
+::: {.definition #def-unitary-transformation}
+
+## Unitary transformation
+Given a quantum state $\psi \in \mathbb{C}^n$ and a unitary matrix $U \in \mathbb{C}^{n\times n}$, the state after the transformation is $U\psi$.
+:::
+:::
+
+::: {.callout-note appearance="minimal" icon=false}
+::: {.lemma #lem-unitary-matrix}
+
+## Unitary matrix
+A matrix $U \in \mathbb{C}^{n\times n}$ is called *unitary* iff $U^\dagger U = I$ where $I$ is the identity matrix and $U^\dagger$ is the complex conjugate transpose of $U$.
+:::
+:::
+
+A unitary transformation is by definition invertible, therefore we can undo all unitary transformations by applying $U^\dagger$. 
+
+::: {.callout-tip icon=false}
+
+## Example: Some Unitary transformations
+The following matrices are  examples for unitary transformations:
+$$
+X = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} \quad Y =  \begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix} \quad Z =  \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}  
+$$
+These matrices are called Pauli-matrices, we will get to know them later on. 
+
+As an example for applying a unitary on a quantum state, we apply the Pauli $X$ matrix on the quantum state $\ket{0}$:
+
+$$
+X\ket{0} = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} \cdot \begin{pmatrix} 1 \\ 0 \end{pmatrix} = \begin{pmatrix} 0 \\ 1 \end{pmatrix} = \ket{1}
+$$
 :::
 
-## Unitary transformation
\ No newline at end of file
+-->
diff --git a/shor.pdf b/shor.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..dbe39595230fb1a057f1e315b439290688e3f651
Binary files /dev/null and b/shor.pdf differ
diff --git a/shor.png b/shor.png
new file mode 100644
index 0000000000000000000000000000000000000000..2c7b6a9f6166fb9f63c2af1f513c08ef1ed7ff33
Binary files /dev/null and b/shor.png differ
diff --git a/shor.svg b/shor.svg
new file mode 100644
index 0000000000000000000000000000000000000000..e70a55fc08e77e96aeed989f540610888acca26d
--- /dev/null
+++ b/shor.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="341.859" height="99.528" viewBox="0 0 256.394 74.646"><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#000" d="m31.546 30.525 4.536-6.803"/><symbol id="a"><path d="M.075.073a.378.378 0 0 1-.01-.041C.065.01.083 0 .099 0a.05.05 0 0 1 .039.022.408.408 0 0 1 .018.062l.022.09.017.067c.011.041.013.049.042.09.028.04.075.092.15.092.058 0 .059-.051.059-.07C.446.293.403.182.387.14.376.112.372.103.372.086.372.033.416 0 .467 0c.1 0 .144.138.144.153 0 .013-.013.013-.016.013C.581.166.58.16.576.149.553.069.51.028.47.028.449.028.445.042.445.063c0 .023.005.036.023.081a.733.733 0 0 1 .053.193c0 .097-.077.114-.13.114A.213.213 0 0 1 .222.36C.215.429.156.451.115.451.072.451.049.42.036.397A.355.355 0 0 1 0 .298C0 .285.014.285.017.285c.014 0 .015.003.022.03.015.059.034.108.073.108.026 0 .033-.022.033-.049A.442.442 0 0 0 .129.291a3.78 3.78 0 0 1-.022-.09L.075.073z"/></symbol><use xlink:href="#a" transform="matrix(6.9738 0 0 -6.9738 36.809 23.393)"/><path stroke-width=".797" stroke-linecap="round" stroke-miterlimit="10" fill="none" stroke="#000" d="M40.9 27.123H26.727M55.074 27.123H40.9M97.958 27.123H83.785M142.032 27.123h-24.136M166.168 27.123h-24.136M218.976 27.123h-14.173M253.075 27.123h-14.173"/><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#000" d="m31.546 62.326 4.536-6.803"/><symbol id="b"><path d="M.387.091C.382.071.373.037.373.032.373.01.391 0 .407 0a.05.05 0 0 1 .039.022.408.408 0 0 1 .018.062l.022.09.017.067c.011.043.011.045.031.076.032.049.082.106.16.106.056 0 .059-.046.059-.07C.753.293.71.182.694.14.683.112.679.103.679.086.679.033.723 0 .774 0c.1 0 .144.138.144.153 0 .013-.013.013-.016.013C.888.166.887.16.883.149.86.069.817.028.777.028.756.028.752.042.752.063c0 .023.005.036.023.081a.733.733 0 0 1 .053.193c0 .016 0 .058-.037.087a.148.148 0 0 1-.093.027C.608.451.553.392.521.35.513.435.442.451.391.451A.213.213 0 0 1 .222.36C.215.429.156.451.115.451.072.451.049.42.036.397A.355.355 0 0 1 0 .298C0 .285.014.285.017.285c.014 0 .015.003.022.03.015.059.034.108.073.108.026 0 .033-.022.033-.049A.442.442 0 0 0 .129.291a3.78 3.78 0 0 1-.022-.09L.075.073a.378.378 0 0 1-.01-.041C.065.01.083 0 .099 0a.05.05 0 0 1 .039.022.408.408 0 0 1 .018.062l.022.09.017.067c.011.041.013.049.042.09.028.04.075.092.15.092.058 0 .059-.051.059-.07A.345.345 0 0 0 .429.259L.387.091z"/></symbol><use xlink:href="#b" transform="matrix(6.9738 0 0 -6.9738 36.809 55.195)"/><path stroke-width=".797" stroke-linecap="round" stroke-miterlimit="10" fill="none" stroke="#000" d="M40.9 58.925H26.727M69.43 58.925H40.9M97.958 58.925H69.43M132.069 58.925h-14.173M185.485 58.925h-33.49M228.939 58.925h-43.454M253.075 58.925h-24.136"/><symbol id="c"><path d="M.04.964C.04.982.04 1 .02 1S0 .982 0 .964V.036C0 .018 0 0 .02 0s.02.018.02.036v.928z"/></symbol><use xlink:href="#c" transform="matrix(9.9626 0 0 -9.9626 6.65 32.105)"/><symbol id="d"><path d="M.421.342c0 .08-.005.16-.04.234A.185.185 0 0 1 .037.569.535.535 0 0 1 0 .342C0 .267.004.177.045.101A.183.183 0 0 1 .21 0c.054 0 .13.021.174.116a.533.533 0 0 1 .037.226M.21.022C.171.022.112.047.094.143.083.203.083.295.083.354c0 .064 0 .13.008.184C.11.657.185.666.21.666.243.666.309.648.328.549c.01-.056.01-.132.01-.195 0-.075 0-.143-.011-.207C.312.052.255.022.21.022z"/></symbol><use xlink:href="#d" transform="matrix(9.9626 0 0 -9.9626 8.622 29.833)"/><use xlink:href="#a" transform="matrix(6.9738 0 0 -6.9738 13.542 26.069)"/><symbol id="e"><path d="M.218.483C.223.495.223.497.223.5c0 .003 0 .005-.005.017l-.175.46C.037.994.031 1 .02 1A.02.02 0 0 1 0 .98C0 .977 0 .975.005.964L.182.5.005.038C0 .027 0 .025 0 .02A.02.02 0 0 1 .02 0c.013 0 .017.01.021.02l.177.463z"/></symbol><use xlink:href="#e" transform="matrix(9.9626 0 0 -9.9626 19.185 32.105)"/><path d="M55.074 35.074h28.71V19.172h-28.71z" fill="#fff"/><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#000" d="M55.074 35.074h28.71V19.172h-28.71z"/><symbol id="f"><path d="M.724.606c.009.036.011.046.084.046.026 0 .034 0 .034.02 0 .011-.011.011-.014.011L.7.68.571.683c-.008 0-.019 0-.019-.02C.552.652.561.652.58.652c.002 0 .021 0 .038-.002C.636.648.645.647.645.634L.641.615.581.371H.276l.059.235c.009.036.012.046.084.046.026 0 .034 0 .034.02 0 .011-.011.011-.014.011L.311.68.182.683c-.008 0-.019 0-.019-.02 0-.011.009-.011.028-.011.002 0 .021 0 .038-.002C.247.648.256.647.256.634L.252.615.118.078C.108.039.106.031.027.031.009.031 0 .031 0 .011 0 0 .012 0 .014 0l.127.003.064-.001L.27 0c.008 0 .02 0 .02.02C.29.031.281.031.262.031c-.037 0-.065 0-.065.018C.197.055.199.06.2.066L.268.34h.305L.504.064C.494.032.475.031.413.031c-.015 0-.024 0-.024-.02C.389 0 .401 0 .403 0L.53.003.594.002.659 0c.008 0 .02 0 .02.02C.679.031.67.031.651.031c-.037 0-.065 0-.065.018 0 .006.002.011.003.017l.135.54z"/></symbol><use xlink:href="#f" transform="matrix(9.9626 0 0 -9.9626 59.449 31.089)"/><symbol id="g"><path d="M.738.368a.37.37 0 1 1-.739 0 .37.37 0 0 1 .739 0M.145.617a.336.336 0 0 0 .448 0L.369.393.145.617M.121.145a.328.328 0 0 0 0 .447L.345.369.121.145m.496.447a.328.328 0 0 0 0-.447L.393.368l.224.224M.593.12a.336.336 0 0 0-.448 0l.224.224L.593.12z"/></symbol><use xlink:href="#g" transform="matrix(6.9738 0 0 -6.9738 68.688 28.297)"/><use xlink:href="#a" transform="matrix(6.9738 0 0 -6.9738 74.706 27.544)"/><path d="M97.958 67.74h19.938V18.308H97.958z" fill="#fff"/><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#000" d="M97.958 67.74h19.938V18.308H97.958z"/><symbol id="h"><path d="M.568.6c.01.041.028.071.108.074.005 0 .017.001.017.02 0 .001 0 .011-.013.011L.578.702.474.705c-.006 0-.018 0-.018-.02 0-.011.01-.011.018-.011C.531.673.542.652.542.63A.152.152 0 0 0 .539.609L.449.252C.415.118.3.031.2.031c-.068 0-.122.044-.122.13 0 .002 0 .034.011.078l.097.389C.195.664.197.674.27.674c.026 0 .034 0 .034.02C.304.705.293.705.29.705L.162.702.033.705c-.008 0-.019 0-.019-.02 0-.011.009-.011.028-.011.002 0 .021 0 .038-.002C.098.67.107.669.107.656.107.65.096.608.09.585L.068.497.007.25C0 .222 0 .207 0 .192 0 .07.091 0 .196 0c.126 0 .25.113.283.245L.568.6z"/></symbol><use xlink:href="#h" transform="matrix(9.9626 0 0 -9.9626 102.611 45.222)"/><symbol id="i"><path d="M.334.599h.098c.02 0 .033 0 .033.022 0 .014-.013.014-.031.014H.341C.364.762.372.808.38.837.385.859.407.88.431.88.432.88.459.88.478.868A.06.06 0 0 1 .434.813c0-.022.017-.037.04-.037a.06.06 0 0 1 .057.061c0 .046-.049.071-.1.071a.139.139 0 0 1-.12-.075C.291.796.283.751.262.635H.183C.163.635.15.635.15.613.15.599.163.599.181.599h.074A18.16 18.16 0 0 0 .167.126C.162.104.145.028.097.028c-.001 0-.025 0-.044.012a.06.06 0 0 1 .044.055c0 .022-.017.037-.04.037A.06.06 0 0 1 0 .071C0 .026.047 0 .097 0c.064 0 .108.066.12.088A.85.85 0 0 1 .278.29l.056.309z"/></symbol><use xlink:href="#i" transform="matrix(6.9738 0 0 -6.9738 109.255 47.92)"/><path d="M166.168 35.26h38.635V18.986h-38.635z" fill="#fff"/><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#000" d="M166.168 35.26h38.635V18.986h-38.635z"/><symbol id="j"><path d="M0 .683V.652h.024C.101.652.103.641.103.605V.078C.103.042.101.031.024.031H0V0h.366c.168 0 .306.148.306.336 0 .19-.135.347-.306.347H0M.238.031c-.047 0-.049.007-.049.04v.541c0 .033.002.04.049.04h.1A.216.216 0 0 0 .52.559C.563.5.572.414.572.336.572.225.553.165.517.116A.22.22 0 0 0 .339.031H.238z"/></symbol><symbol id="k"><path d="M.549.68H0V.649h.024C.101.649.103.638.103.602V.078C.103.042.101.031.024.031H0V0c.035.003.113.003.152.003C.193.003.284.003.32 0v.031H.287C.192.031.192.044.192.079v.246h.086C.374.325.384.293.384.208h.025v.265H.384C.384.389.374.356.278.356H.192v.253c0 .033.002.04.049.04h.12c.15 0 .175-.056.191-.194h.025L.549.68z"/></symbol><symbol id="l"><path d="M.63.677H.019L0 .452h.025c.014.161.029.194.18.194.018 0 .044 0 .054-.002C.28.64.28.629.28.606V.079C.28.045.28.031.175.031h-.04V0c.041.003.143.003.189.003.046 0 .149 0 .19-.003v.031h-.04C.369.031.369.045.369.079v.527c0 .02 0 .034.018.038a.471.471 0 0 0 .057.002C.595.646.61.613.624.452h.025L.63.677z"/></symbol><use xlink:href="#j" transform="matrix(9.9626 0 0 -9.9626 170.502 29.78)"/><use xlink:href="#k" transform="matrix(9.9626 0 0 -9.9626 178.093 29.78)"/><use xlink:href="#l" transform="matrix(9.9626 0 0 -9.9626 184.629 29.78)"/><symbol id="m"><path d="M.442.182H.408C.405.16.395.101.382.091.374.085.297.085.283.085H.099a3.5 3.5 0 0 0 .2.168c.074.059.143.121.143.216C.442.59.336.664.208.664.084.664 0 .577 0 .485 0 .434.043.429.053.429c.024 0 .053.017.053.053C.106.5.099.535.047.535a.157.157 0 0 0 .146.093c.1 0 .152-.078.152-.159C.345.382.283.313.251.277L.01.039C0 .03 0 .028 0 0h.412l.03.182z"/></symbol><use xlink:href="#m" transform="matrix(6.9738 0 0 -6.9738 191.901 31.274)"/><symbol id="n"><path d="M.104.109C.098.084.087.04.087.035.087.013.105 0 .124 0c.015 0 .037.008.048.033l.019.078.036.141C.24.279.312.419.434.419c.049 0 .07-.027.07-.072C.504.29.462.187.439.13a.104.104 0 0 1-.01-.042C.429.036.479 0 .538 0 .645 0 .7.13.7.155.7.169.683.169.679.169.662.169.661.165.655.146.636.086.59.034.542.034c-.023 0-.03.016-.03.038 0 .021.004.031.013.053.017.04.063.154.063.209C.588.408.535.453.44.453A.244.244 0 0 1 .251.354C.246.436.166.453.129.453.029.453 0 .3 0 .298 0 .284.016.284.021.284.038.284.04.29.044.303c.015.058.038.116.08.116.034 0 .041-.032.041-.053C.165.352.155.314.149.288a3.78 3.78 0 0 1-.022-.09L.104.109z"/></symbol><use xlink:href="#n" transform="matrix(4.9813 0 0 -4.9813 195.886 29.337)"/><path d="M218.976 34.595h19.926V19.651h-19.926z" fill="#fff"/><clipPath id="o"><path transform="matrix(1 0 0 -1 139.901 43.024)" d="M79.075 8.429h19.926v14.944H79.075z"/></clipPath><g clip-path="url(#o)"><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#000" d="M221.81 28.824c3.574-4.259 10.683-4.259 14.257 0M228.939 29.958l4.847-5.783"/><path d="M235.022 22.7c-.2.142-1.135.713-1.844.966l1.215 1.018c.125-.742.524-1.763.629-1.984z"/><path stroke-width=".78896844" stroke-miterlimit="10" fill="none" stroke="#000" d="M235.022 22.7c-.2.142-1.135.713-1.844.966l1.215 1.018c.125-.742.524-1.763.629-1.984z"/></g><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#000" d="M218.976 34.595h19.926V19.651h-19.926z"/><use xlink:href="#c" transform="matrix(9.9626 0 0 -9.9626 4.507 63.906)"/><use xlink:href="#d" transform="matrix(9.9626 0 0 -9.9626 6.477 61.634)"/><use xlink:href="#b" transform="matrix(6.9738 0 0 -6.9738 11.397 57.87)"/><use xlink:href="#e" transform="matrix(9.9626 0 0 -9.9626 19.185 63.906)"/><path d="M132.069 66.397h19.926V51.453h-19.926z" fill="#fff"/><clipPath id="p"><path transform="matrix(1 0 0 -1 139.901 43.024)" d="M-7.832-23.373h19.926v14.944H-7.832z"/></clipPath><g clip-path="url(#p)"><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#000" d="M134.904 60.626c3.573-4.259 10.682-4.259 14.256 0M142.032 61.76l4.847-5.783"/><path d="M148.115 54.502c-.2.142-1.135.713-1.844.966l1.215 1.018c.125-.742.524-1.763.629-1.984z"/><path stroke-width=".78896844" stroke-miterlimit="10" fill="none" stroke="#000" d="M148.115 54.502c-.2.142-1.135.713-1.844.966l1.215 1.018c.125-.742.524-1.763.629-1.984z"/></g><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#000" d="M132.069 66.397h19.926V51.453h-19.926z"/><path stroke-width=".797" stroke-dasharray="4.98138,2.98883" stroke-miterlimit="10" fill="none" stroke="red" d="M47.987 14.789v59.459"/><symbol id="q"><path d="M.205.64c0 .024 0 .026-.023.026C.12.602.032.602 0 .602V.571a.3.3 0 0 1 .131.026V.079C.131.043.128.031.038.031H.006V0c.035.003.122.003.162.003.04 0 .127 0 .162-.003v.031H.298c-.09 0-.093.011-.093.048V.64z"/></symbol><use xlink:href="#q" transform="matrix(9.9626 0 0 -9.9626 46.385 10.406)"/><path stroke-width=".797" stroke-dasharray="4.98138,2.98883" stroke-miterlimit="10" fill="none" stroke="red" d="M90.872 14.789v59.459"/><symbol id="r"><path d="M.077.077.183.18c.156.138.216.192.216.292 0 .114-.09.194-.212.194A.185.185 0 0 1 0 .485C0 .429.05.429.053.429c.017 0 .052.012.052.053a.05.05 0 0 1-.053.052L.039.533a.144.144 0 0 0 .135.102C.265.635.308.554.308.472c0-.08-.05-.159-.105-.221L.011.037C0 .026 0 .024 0 0h.371l.028.174H.374C.369.144.362.1.352.085.345.077.279.077.257.077h-.18z"/></symbol><use xlink:href="#r" transform="matrix(9.9626 0 0 -9.9626 88.88 10.406)"/><path stroke-width=".797" stroke-dasharray="4.98138,2.98883" stroke-miterlimit="10" fill="none" stroke="red" d="M124.982 14.789v59.459"/><symbol id="s"><path d="M.248.374c.082.027.14.097.14.176C.388.632.3.688.204.688.103.688.027.628.027.552.027.519.049.5.078.5.109.5.129.522.129.551c0 .05-.047.05-.062.05C.098.65.164.663.2.663.241.663.296.641.296.551A.25.25 0 0 0 .268.437C.238.389.204.386.179.385A.554.554 0 0 0 .14.382C.132.381.125.38.125.37c0-.011.007-.011.024-.011h.044C.275.359.312.291.312.193.312.057.243.028.199.028.156.028.081.045.046.104.081.099.112.121.112.159a.054.054 0 0 1-.056.056C.032.215 0 .201 0 .157 0 .066.093 0 .202 0c.122 0 .213.091.213.193 0 .082-.063.16-.167.181z"/></symbol><use xlink:href="#s" transform="matrix(9.9626 0 0 -9.9626 122.91 10.625)"/><path stroke-width=".797" stroke-dasharray="4.98138,2.98883" stroke-miterlimit="10" fill="none" stroke="red" d="M159.081 14.789v59.459"/><symbol id="t"><path d="M.266.165V.078C.266.042.264.031.19.031H.169V0C.21.003.262.003.304.003.346.003.399.003.44 0v.031H.419C.345.031.343.042.343.078v.087h.1v.031h-.1v.455c0 .02 0 .026-.016.026-.009 0-.012 0-.02-.012L0 .196V.165h.266m.006.031H.028l.244.373V.196z"/></symbol><use xlink:href="#t" transform="matrix(9.9626 0 0 -9.9626 156.869 10.406)"/><path stroke-width=".797" stroke-dasharray="4.98138,2.98883" stroke-miterlimit="10" fill="none" stroke="red" d="M211.89 14.789v59.459"/><symbol id="u"><path d="M.399.223c0 .119-.082.219-.19.219A.176.176 0 0 1 .082.391v.195A.317.317 0 0 1 .167.573C.29.573.36.664.36.677.36.683.357.688.35.688c-.001 0-.003 0-.008-.003A.33.33 0 0 0 .073.684L.061.687c-.01 0-.01-.008-.01-.024V.367c0-.018 0-.026.014-.026.007 0 .009.003.013.009.011.016.048.07.129.07C.259.42.284.374.292.356A.308.308 0 0 0 .31.23C.31.195.31.135.286.093A.125.125 0 0 0 .179.028.156.156 0 0 0 .032.14C.035.139.038.138.049.138c.033 0 .05.025.05.049a.048.048 0 0 1-.05.049C.035.236 0 .229 0 .183 0 .097.069 0 .181 0a.22.22 0 0 1 .218.223z"/></symbol><use xlink:href="#u" transform="matrix(9.9626 0 0 -9.9626 209.896 10.625)"/><path stroke-width=".797" stroke-dasharray="4.98138,2.98883" stroke-miterlimit="10" fill="none" stroke="red" d="M245.988 14.789v59.459"/><symbol id="v"><path d="M.09.35v.024c0 .253.124.289.175.289.024 0 .066-.006.088-.04-.015 0-.055 0-.055-.045 0-.031.024-.046.046-.046C.36.532.39.541.39.58.39.64.346.688.263.688.135.688 0 .559 0 .338 0 .071.116 0 .209 0 .32 0 .415.094.415.226c0 .127-.089.223-.2.223C.147.449.11.398.09.35M.209.028C.146.028.116.088.11.103.092.15.092.23.092.248c0 .078.032.178.122.178.016 0 .062 0 .093-.062C.325.327.325.276.325.227c0-.048 0-.098-.017-.134C.278.033.232.028.209.028z"/></symbol><use xlink:href="#v" transform="matrix(9.9626 0 0 -9.9626 243.914 10.625)"/></svg>
\ No newline at end of file
diff --git a/shorsAlgorithm.html b/shorsAlgorithm.html
new file mode 100644
index 0000000000000000000000000000000000000000..0a4af32b22565b533b249f8c7940fc66cddd0a79
--- /dev/null
+++ b/shorsAlgorithm.html
@@ -0,0 +1,860 @@
+<!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 - 9&nbsp; Shor’s Algorithm</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="./bernsteinVazirani.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="./quantumAlgorithms.html">Quantum Algorithms</a></li><li class="breadcrumb-item"><a href="./shorsAlgorithm.html"><span class="chapter-number">9</span>&nbsp; <span class="chapter-title">Shor’s Algorithm</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>&nbsp; <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>&nbsp; <span class="chapter-title">Probabilistic systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./quantumSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">3</span>&nbsp; <span class="chapter-title">Quantum systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./observingSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">4</span>&nbsp; <span class="chapter-title">Observing probabilistic and measuring quantum systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./partialObserving.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Partial observing and measuring systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./compositeSystems.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Composite Systems</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./quantumCircutsKetNotation.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Quantum Circuits</span></span></a>
+  </div>
+</li>
+      </ul>
+  </li>
+        <li class="sidebar-item sidebar-item-section">
+      <div class="sidebar-item-container"> 
+            <a href="./quantumAlgorithms.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text">Quantum Algorithms</span></a>
+          <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true" aria-label="Toggle section">
+            <i class="bi bi-chevron-right ms-2"></i>
+          </a> 
+      </div>
+      <ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 show">  
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./bernsteinVazirani.html" class="sidebar-item-text sidebar-link">
+ <span class="menu-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Bernstein-Vazirani Algorithm</span></span></a>
+  </div>
+</li>
+          <li class="sidebar-item">
+  <div class="sidebar-item-container"> 
+  <a href="./shorsAlgorithm.html" class="sidebar-item-text sidebar-link active">
+ <span class="menu-text"><span class="chapter-number">9</span>&nbsp; <span class="chapter-title">Shor’s Algorithm</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="#discrete-fourier-transformation" id="toc-discrete-fourier-transformation" class="nav-link active" data-scroll-target="#discrete-fourier-transformation"><span class="header-section-number">9.1</span> Discrete Fourier Transformation</a></li>
+  <li><a href="#reducing-factoring-to-period-finding" id="toc-reducing-factoring-to-period-finding" class="nav-link" data-scroll-target="#reducing-factoring-to-period-finding"><span class="header-section-number">9.2</span> Reducing factoring to period finding</a></li>
+  <li><a href="#sec-shor-algo" id="toc-sec-shor-algo" class="nav-link" data-scroll-target="#sec-shor-algo"><span class="header-section-number">9.3</span> The quantum algorithm for period finding</a></li>
+  <li><a href="#post-processing" id="toc-post-processing" class="nav-link" data-scroll-target="#post-processing"><span class="header-section-number">9.4</span> Post processing</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="./quantumAlgorithms.html">Quantum Algorithms</a></li><li class="breadcrumb-item"><a href="./shorsAlgorithm.html"><span class="chapter-number">9</span>&nbsp; <span class="chapter-title">Shor’s Algorithm</span></a></li></ol></nav>
+<div class="quarto-title">
+<h1 class="title"><span class="chapter-number">9</span>&nbsp; <span class="chapter-title">Shor’s Algorithm</span></h1>
+</div>
+
+
+
+<div class="quarto-title-meta">
+
+    
+  
+    
+  </div>
+  
+
+
+</header>
+
+
+<p>One of the best known quantum algorithm is Shor’s algorithm for finding the prime factors of an integer. It was developed by Peter Shor in 1994.</p>
+<section id="discrete-fourier-transformation" class="level2" data-number="9.1">
+<h2 data-number="9.1" class="anchored" data-anchor-id="discrete-fourier-transformation"><span class="header-section-number">9.1</span> Discrete Fourier Transformation</h2>
+<p>One of the tools required for Shor’s algorithm is the Discrete Fourier Transformation (DFT). Generally, a Fourier transformation is a mathematical technique that decomposes a function into its constituent frequencies. We use the DFT to find the period of a vector.</p>
+<p>The DFT is defined as follows:</p>
+<div class="callout callout-style-simple callout-note no-icon">
+<div class="callout-body d-flex">
+<div class="callout-icon-container">
+<i class="callout-icon no-icon"></i>
+</div>
+<div class="callout-body-container">
+<div id="def-shor-dft" class="definition theorem">
+<p><span class="theorem-title"><strong>Definition 9.1 (Discrete Fourier Transformation (DFT))</strong></span> The discrete Fourier transform (DFT) is a linear transformation on <span class="math inline">\(\mathbb{C}^N\)</span> represented by the matrix <span class="math display">\[
+\operatorname{DFT}_N = \frac{1}{\sqrt{N}} (\omega^{kl})_{kl} \in \mathbb{C}^{N\times N}
+\]</span> with <span class="math inline">\(\omega = e^{2i\pi/N}\)</span>, which is the <span class="math inline">\(N\)</span>-th root of unity.</p>
+</div>
+</div>
+</div>
+</div>
+<p>This transformation is best imagined as a process, which takes a periodic vector as an input and outputs the period of that vector. The DFT has some important properties, which help us later on.</p>
+<div class="callout callout-style-simple callout-note no-icon">
+<div class="callout-body d-flex">
+<div class="callout-icon-container">
+<i class="callout-icon no-icon"></i>
+</div>
+<div class="callout-body-container">
+<div id="thm-dft-properties" class="therorem theorem">
+<p><span class="theorem-title"><strong>Theorem 9.1 (Properties of the DFT)</strong></span> Here are some properties of the DFT which can be used without further proof.</p>
+<ol type="1">
+<li>The DFT is unitary.</li>
+<li><span class="math inline">\(\omega^t = \omega^{t\mod N}\)</span> for all <span class="math inline">\(t \in \mathbb{Z}\)</span>.</li>
+<li>Given a quantum state <span class="math inline">\(\psi \in \mathbb{C}^N\)</span> which is <span class="math inline">\(r\)</span>-periodic and where <span class="math inline">\(r\mid N\)</span>, <span class="math inline">\(\operatorname{DFT}_N \psi\)</span> will compute a quantum state <span class="math inline">\(\phi \in \mathbb{C}^N\)</span>, which has non-zero values on the multiples of <span class="math inline">\(\frac{N}{r}\)</span>. Note that <span class="math inline">\(\frac{N}{r}\)</span> intuitively represents the frequency of <span class="math inline">\(\psi\)</span>. This means, that <span class="math display">\[
+|\phi_i| = \begin{cases} \frac{1}{\sqrt{t}}, &amp; \text{if}\ \frac{N}{t}\mid i \\ 0, &amp; \text{otherwise} \end{cases}
+\]</span></li>
+</ol>
+</div>
+</div>
+</div>
+</div>
+</section>
+<section id="reducing-factoring-to-period-finding" class="level2" data-number="9.2">
+<h2 data-number="9.2" class="anchored" data-anchor-id="reducing-factoring-to-period-finding"><span class="header-section-number">9.2</span> Reducing factoring to period finding</h2>
+<p>With the DFT, we have seen, that we can use a unitary to find the period of a quantum state. We now look into using period finding to factor integers. We first look at the definition of the two problems:</p>
+<div class="callout callout-style-simple callout-note no-icon">
+<div class="callout-body d-flex">
+<div class="callout-icon-container">
+<i class="callout-icon no-icon"></i>
+</div>
+<div class="callout-body-container">
+<div id="def-shor-factoring" class="definition theorem">
+<p><span class="theorem-title"><strong>Definition 9.2 (Factoring problem)</strong></span> Given integer <span class="math inline">\(N\)</span> with two prime factors <span class="math inline">\(p,q\)</span> such that <span class="math inline">\(pq=N\)</span> and <span class="math inline">\(p \neq q\)</span>, find <span class="math inline">\(p\)</span> and <span class="math inline">\(q\)</span>.</p>
+</div>
+</div>
+</div>
+</div>
+<p>Note that this definition of the factoring problem is a simplified version of the factoring problem, where <span class="math inline">\(N\)</span> has only 2 prime factors.</p>
+<div class="callout callout-style-simple callout-note no-icon">
+<div class="callout-body d-flex">
+<div class="callout-icon-container">
+<i class="callout-icon no-icon"></i>
+</div>
+<div class="callout-body-container">
+<div id="def-shor-period" class="definition theorem">
+<p><span class="theorem-title"><strong>Definition 9.3 (Period finding problem)</strong></span> Given <span class="math inline">\(f: \mathbb{Z} \to X\)</span> with <span class="math inline">\(f(x) = f(y)\)</span> iff <span class="math inline">\(x \equiv y \bmod r\)</span> for some fixed secret <span class="math inline">\(r\)</span>. <span class="math inline">\(r\)</span> is called the <em>period</em> of <span class="math inline">\(f\)</span>. Find <span class="math inline">\(r\)</span>.</p>
+</div>
+</div>
+</div>
+</div>
+<p>To start the reduction, we need a special case of the period finding problem called order finding:</p>
+<div class="callout callout-style-simple callout-note no-icon">
+<div class="callout-body d-flex">
+<div class="callout-icon-container">
+<i class="callout-icon no-icon"></i>
+</div>
+<div class="callout-body-container">
+<div id="def-shor-order" class="definition theorem">
+<p><span class="theorem-title"><strong>Definition 9.4 (Order finding problem)</strong></span> For known <span class="math inline">\(a\)</span> and <span class="math inline">\(N\)</span> which are relatively prime, find the period <span class="math inline">\(r\)</span> of <span class="math inline">\(f(i) = a^i \bmod n\)</span>. We call <span class="math inline">\(r\)</span> the order of <span class="math inline">\(a\)</span> written <span class="math inline">\(r = \text{ ord } a\)</span>. (This is similar to finding the smallest <span class="math inline">\(i &gt; 0\)</span> with <span class="math inline">\(f(i) = 1\)</span>).</p>
+</div>
+</div>
+</div>
+</div>
+<p>Since the order finding problem is just the period finding problem for a specific <span class="math inline">\(f(x)\)</span>, we know that if we can solve the period finding problem within reasonable runtime, we can also solve the order finding problem within reasonable runtime. We now reduce the factoring problem to the order finding problem:</p>
+<p>We have a integer <span class="math inline">\(N\)</span> as an input for the factoring problem.</p>
+<ol type="1">
+<li>Pick an <span class="math inline">\(a \in \{1,...,N-1\}\)</span> with <span class="math inline">\(a\)</span> relatively prime to <span class="math inline">\(n\)</span>.</li>
+<li>Compute the order of <span class="math inline">\(a\)</span>, so that <span class="math inline">\(r = \text{ ord } a\)</span> (using the solver for the order finding problem).</li>
+<li>If the order <span class="math inline">\(r\)</span> is odd, we abort.</li>
+<li>Calculate <span class="math inline">\(x:= a^{\frac{r}{2}}+1 \bmod N\)</span> and <span class="math inline">\(y:= a^{\frac{r}{2}}-1 \bmod N\)</span>.</li>
+<li>If <span class="math inline">\(\gcd(x,N) \in \{1,N\}\)</span>, we abort.</li>
+<li>We compute <span class="math inline">\(p = \gcd(x,N)\)</span> and <span class="math inline">\(q = \gcd(y,N)\)</span>.</li>
+</ol>
+<p>The output of the reduction are <span class="math inline">\(p,q\)</span>, such that <span class="math inline">\(pq = N\)</span>. This holds, since <span class="math display">\[
+xy = (a^{\frac{r}{2}}+1) (a^{\frac{r}{2}}-1) = a^r - 1 \equiv 1-1 = 0 \pmod N
+\]</span></p>
+<div class="callout callout-style-simple callout-note no-icon">
+<div class="callout-body d-flex">
+<div class="callout-icon-container">
+<i class="callout-icon no-icon"></i>
+</div>
+<div class="callout-body-container">
+<div id="thm-shor-abort" class="therorem theorem">
+<p><span class="theorem-title"><strong>Theorem 9.2 (Probability of an abort)</strong></span> If <span class="math inline">\(N\)</span> has at least two different prime factors and <span class="math inline">\(N\)</span> is odd, then the probability to abort is <span class="math inline">\(\leq \frac{1}{2}\)</span>.</p>
+</div>
+</div>
+</div>
+</div>
+<p>All in all this reduction shows, that if we have an oracle which can solve the period finding problem within reasonable runtime, we can also solve the factoring problem within reasonable runtime (since all other operations are classically fast to compute).</p>
+</section>
+<section id="sec-shor-algo" class="level2" data-number="9.3">
+<h2 data-number="9.3" class="anchored" data-anchor-id="sec-shor-algo"><span class="header-section-number">9.3</span> The quantum algorithm for period finding</h2>
+<p>We now look into an quantum algorithm that solves the period finding problem within reasonable runtime. The quantum circuit for Shor’s algorithm requires a <span class="math inline">\(f:\{0,1\}^n\rightarrow\{0,1\}^m\)</span> which is <span class="math inline">\(r\)</span>-periodic and is show in this figure:</p>
+<div class="quarto-figure quarto-figure-center">
+<figure class="figure">
+<p><img src="shor.svg" class="img-fluid figure-img" style="width:100.0%"></p>
+<figcaption>Shor’s algorithm (quantum part)</figcaption>
+</figure>
+</div>
+<p>The algorithm works as follows:</p>
+<ol type="1">
+<li>We start with a <span class="math inline">\(\ket{0}\)</span> entry on every wire.</li>
+<li>We bring the top wire into the superposition over all entries. The quantum state is then <span class="math inline">\(2^\frac{-n}{2}\sum_x \ket{x} \otimes \ket{0^m}\)</span>.</li>
+<li>We apply <span class="math inline">\(U_f\)</span>, which is the unitary of <span class="math inline">\(f:\{0,1\}^n\rightarrow\{0,1\}^m\)</span>. This calculates the superposition over all possible values <span class="math inline">\(f(x)\)</span> on the bottom wire. The resulting quantum state is <span class="math inline">\(\frac{-n}{2}\sum_x \ket{x,f(x)}\)</span>.</li>
+<li>To understand the algorithm better, we measure the bottom wire at this point. This will give us one random value <span class="math inline">\(f(x_0)\)</span> for some <span class="math inline">\(x_0\)</span>. The top wire will then contain a superposition over all values <span class="math inline">\(x\)</span> where <span class="math inline">\(f(x) = f(x_0)\)</span>. Since <span class="math inline">\(f\)</span> is know to be <span class="math inline">\(r\)</span>-periodic, we know, that <span class="math inline">\(f(x) = f(x_0)\)</span> iff <span class="math inline">\(x \equiv x_0 \bmod r\)</span>. This means, that on the resulting quantum state on the top wire is periodic and can be written as <span class="math inline">\(\frac{1}{\sqrt{2^\frac{n}{r}}} \sum_{x\equiv x_0 \bmod r} \ket{x} \otimes \ket{f(x_0)}\)</span>.</li>
+<li>We apply the Discrete Fourier Transform on the top wire. This will “analyze” the top wire for the period and output a vector with entries at multiples of <span class="math inline">\(\frac{2^n}{r}\)</span> as seen in <a href="#thm-dft-properties" class="quarto-xref">Theorem&nbsp;<span class="quarto-unresolved-ref">thm-dft-properties</span></a>. For simplicity we assume, that <span class="math inline">\(r \mid 2^n\)</span> holds.</li>
+<li>We measure the top wire and get one random multiple of <span class="math inline">\(\frac{2^n}{r}\)</span>, which we can denote as <span class="math inline">\(a\cdot\frac{2^n}{r}\)</span></li>
+</ol>
+<p>Since we get a multiple of <span class="math inline">\(\frac{2^n}{r}\)</span> on each run, we can simply run the algorithm multiple times to get different multiples and then compute <span class="math inline">\(\frac{2^n}{r}\)</span> by taking the gcd of those multiples. From that we compute <span class="math inline">\(r\)</span>.</p>
+<p>Unfortunately this only works because we assumed <span class="math inline">\(r \mid 2^n\)</span>. Since this does usually not hold, we only get approximate multiples of <span class="math inline">\(\frac{2^n}{r}\)</span> (which is not even an integer) and thus post processing is a bit more complex.</p>
+</section>
+<section id="post-processing" class="level2" data-number="9.4">
+<h2 data-number="9.4" class="anchored" data-anchor-id="post-processing"><span class="header-section-number">9.4</span> Post processing</h2>
+<p>So far we have seen the DFT to analyze the period of a quantum state, we have seen a way to reduce the factoring problem to the period finding and we have seen a quantum algorithm for finding an approximate multiple of such a period of a function. We just need one final step to find <span class="math inline">\(r\)</span>. For this we start with a theorem:</p>
+<div class="callout callout-style-simple callout-note no-icon">
+<div class="callout-body d-flex">
+<div class="callout-icon-container">
+<i class="callout-icon no-icon"></i>
+</div>
+<div class="callout-body-container">
+<div id="thm-shor-post-process" class="therorem theorem">
+<p><span class="theorem-title"><strong>Theorem 9.3</strong></span> If <span class="math inline">\(\{0,1\}^n \rightarrow \{0,1\}^n\)</span> is <span class="math inline">\(r\)</span>-periodic with probability <span class="math inline">\(\Omega(1/\log\log r)\)</span> the following holds: <span class="math display">\[
+\frac{-r}{2} \leq rc\bmod 2^n \leq \frac{r}{2}
+\]</span> where <span class="math inline">\(c\)</span> is the output of the second measurement of the quantum circuit described in <a href="#sec-shor-algo" class="quarto-xref"><span class="quarto-unresolved-ref">sec-shor-algo</span></a>.</p>
+</div>
+</div>
+</div>
+</div>
+<p>We assume that the theorem holds for our outcome of the second measurement (If that is not the case, our result will be wrong and we can just run the quantum algorithm again to get a different outcome):</p>
+<p>Then exists a <span class="math inline">\(d\)</span> such that: <span class="math display">\[
+\begin{aligned}
+&amp;\lvert rc - d2^n\rvert \leq \frac{r}{2} \\
+\Leftrightarrow&amp;\lvert \frac{c}{2^n} - \frac{d}{r}\rvert \leq \frac{1}{2^{n+1}}
+\end{aligned}
+\]</span> The fraction <span class="math inline">\(\frac{c}{2^n}\)</span> is know so the goal is to find a fraction <span class="math inline">\(\frac{d}{r}\)</span> that is <span class="math inline">\(\frac{1}{2^{n+1}}\)</span> close to <span class="math inline">\(\frac{c}{2^n}\)</span>.</p>
+<p>The rest of postprocessing will be updated after the next lecture.</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("https:\/\/qis\.rwth-aachen\.de\/teaching\/24ss\/intro-quantum-computing\/script\/");
+    var isInternal = (href) => {
+        return filterRegex.test(href) || localhostRegex.test(href) || mailtoRegex.test(href);
+    }
+    // Inspect non-navigation links and adorn them if external
+ 	var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool)');
+    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="./bernsteinVazirani.html" class="pagination-link" aria-label="Bernstein-Vazirani Algorithm">
+        <i class="bi bi-arrow-left-short"></i> <span class="nav-page-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Bernstein-Vazirani Algorithm</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/shorsAlgorithm.ipynb b/shorsAlgorithm.ipynb
new file mode 100644
index 0000000000000000000000000000000000000000..4c89f70ca51bfb6cc4ed16fcec605faedd45ec2a
--- /dev/null
+++ b/shorsAlgorithm.ipynb
@@ -0,0 +1,141 @@
+{
+  "cells": [
+    {
+      "cell_type": "markdown",
+      "metadata": {},
+      "source": [
+        "# Shor's Algorithm\n",
+        "\n",
+        "One of the most know quantum algorithm is Shor's algorithm for finding the prime factor of an integer. It was developed by Peter Shor in 1994.\n",
+        "\n",
+        "## Discrete Fourier Transformation\n",
+        "\n",
+        "One of the tools required for Shor's algorithm is the Discrete Fourier Transformation (DFT). Generally, a Fourier transformation is a mathematical technique that decomposes a function into its constituent frequencies. We use the DFT to find the period of a vector. \n",
+        "\n",
+        "The DFT is defined as follows:\n",
+        "\n",
+        "::: {.callout-note appearance=\"minimal\" icon=false}\n",
+        "::: {.definition #def-shor-dft}\n",
+        "\n",
+        "## Discrete Fourier Transformation (DFT)\n",
+        "\n",
+        "The discrete Fourier transform (DFT) is a linear transformation on $\\mathbb{C}^N$ represented by the matrix \n",
+        "$$\n",
+        "DFT_N = \\frac{1}{\\sqrt{N}} (\\omega^{kl})_{kl} \\in \\mathbb{C}^{N\\times N}\n",
+        "$$\n",
+        "with $\\omega = e^{2i\\pi/N}$. \n",
+        ":::\n",
+        ":::\n",
+        "\n",
+        "This transformation is best imagined as a process, which takes a periodic vector as an input and outputs the period of that vector. The DFT has some important properties, which help us later on. \n",
+        "\n",
+        "::: {.callout-note appearance=\"minimal\" icon=false}\n",
+        "::: {.therorem #thm-dft-properties}\n",
+        "\n",
+        "## Properties of the DFT\n",
+        "\n",
+        "Here are some properties of the DFT which can be used without further proof. \n",
+        "\n",
+        "1. The DFT is unitary.\n",
+        "2. $\\omega^t = \\omega^{t\\mod N}$ for all $t \\in \\mathbb{Z}$.\n",
+        "3. Given a quantum state $\\psi \\in \\mathbb{C}^N$ which is $t$-periodic, $DFT_N \\psi$ will compute a quantum state $\\phi \\in \\mathbb{C}^N$, which has non-zero values on the multiples of $\\frac{N}{t}$. Note that $\\frac{N}{t}$ intuitively represents the frequency of $\\psi$. This means, that \n",
+        "$$\n",
+        "\\phi_i = \\begin{cases} \\frac{1}{\\sqrt{t}}, & \\text{if}\\ \\frac{N}{t}|i \\\\ 0, & \\text{otherwise} \\end{cases}\n",
+        "$$\n",
+        ":::\n",
+        ":::\n",
+        "\n",
+        "## Reducing factoring to period finding\n",
+        "\n",
+        "With the DFT, we have seen, that we can use a unitary to find the period of a quantum state. We now look into using period finding to factor integers.  We first look at the definition of the two problems:\n",
+        "\n",
+        "\n",
+        "::: {.callout-note appearance=\"minimal\" icon=false}\n",
+        "::: {.definition #def-shor-factoring}\n",
+        "\n",
+        "## Factoring problem\n",
+        "\n",
+        "Given integer $n$ with two prime factors $p,q$ such that $pq=n$, find $p$ and $q$.\n",
+        ":::\n",
+        ":::\n",
+        "\n",
+        "::: {.callout-note appearance=\"minimal\" icon=false}\n",
+        "::: {.definition #def-shor-period}\n",
+        "\n",
+        "## Period finding problem\n",
+        "\n",
+        "Given $f: \\mathbb{Z} \\to X$ with $f(x) = f(y)$ iff $x \\equiv y \\text{ mod } r$ for some fixed secret $r$.\n",
+        "Find $r$.\n",
+        "\n",
+        ":::\n",
+        ":::\n",
+        "\n",
+        "To start the reduction, we need a special case of the period finding problem called order finding;\n",
+        "\n",
+        "::: {.callout-note appearance=\"minimal\" icon=false}\n",
+        "::: {.definition #def-shor-order}\n",
+        "\n",
+        "## Order finding problem\n",
+        "\n",
+        "For known $a$ and $n$ which are relatively prime, find the period $r$ of $f(i) = a^i \\text{ mod } n$. We call $r$ the order of $a$ written $r = \\text{ ord } a$.\n",
+        ":::\n",
+        ":::\n",
+        "\n",
+        "Since the order finding problem is just the period finding problem for a set $f(x)$, we know that if we can solve the period finding problem with reasonable runtime, we can also solve the order finding problem with reasonable runtime. We now reduce the factoring problem to the order finding problem:\n",
+        "\n",
+        "We have a integer $n$ as an input for the factoring problem.\n",
+        "\n",
+        "1. Pick an $a \\in \\{1,...,n-1\\}$ with $a$ relatively prime to $n$.\n",
+        "2. Compute the order of $a$, so $r = \\text{ ord } a$ (using the solver for the order finding problem).\n",
+        "3. If the order $r$ is odd, we abort.\n",
+        "4. Calculate $x:= a^{\\frac{r}{2}}+1 \\text{ mod } n$ and $y:= a^{\\frac{r}{2}}-1 \\text{ mod } n$.\n",
+        "5. If $\\gcd(x,n) \\in \\{1,n\\}$, we abort.\n",
+        "6. We compute $p = \\gcd(x,n)$ and $q = \\gcd(y,n)$.\n",
+        "\n",
+        "The output of the reduction are $p,q$, such that $pq = n$. This holds, since\n",
+        "$$\n",
+        "xy = (a^{\\frac{r}{2}}+1) (a^{\\frac{r}{2}}-1) \\text{ mod } n = a^r - 1 \\equiv 1-1 \\text{ mod } n  = 0 \\text{ mod } n = n \n",
+        "$$\n",
+        "\n",
+        "::: {.callout-note appearance=\"minimal\" icon=false}\n",
+        "::: {.therorem #thm-dft-properties}\n",
+        "\n",
+        "## Probability of an abort\n",
+        "If $n$ has at least two different prime factors and $n$ is odd, then the probability to abort is $\\leq \\frac{1}{2}$.  \n",
+        "\n",
+        ":::\n",
+        ":::\n",
+        "\n",
+        "All in all shows this reduction, that if we have an oracle, which can solve the period finding problem within reasonable runtime, we can also solve the factoring problem within reasonable runtime (since all other operations are fast to compute).\n",
+        "\n",
+        "## The algorithm\n",
+        "\n",
+        "We now look into an quantum algorithm, which solves the period finding problem within reasonable runtime:\n"
+      ],
+      "id": "8fc9e291"
+    },
+    {
+      "cell_type": "code",
+      "metadata": {},
+      "source": [
+        "#| label: fig-shor\n",
+        "#| fig-cap: The quantum circuit for Shor's algorithm\n",
+        "from pnglatex import pnglatex\n",
+        "\n",
+        "output = pnglatex(r'\\[\\displaystyle{\\sum_{i=0}^{10} 3i}\\]', 'output.png')"
+      ],
+      "id": "fig-shor",
+      "execution_count": null,
+      "outputs": []
+    }
+  ],
+  "metadata": {
+    "kernelspec": {
+      "name": "python3",
+      "language": "python",
+      "display_name": "Python 3 (ipykernel)"
+    }
+  },
+  "nbformat": 4,
+  "nbformat_minor": 5
+}
\ No newline at end of file
diff --git a/shorsAlgorithm.qmd b/shorsAlgorithm.qmd
new file mode 100644
index 0000000000000000000000000000000000000000..ad5a43274e5471db069de44612e71846a944d011
--- /dev/null
+++ b/shorsAlgorithm.qmd
@@ -0,0 +1,157 @@
+# Shor's Algorithm
+
+One of the best known quantum algorithm is Shor's algorithm for finding the prime factors of an integer. It was developed by Peter Shor in 1994.
+
+## Discrete Fourier Transformation
+
+One of the tools required for Shor's algorithm is the Discrete Fourier Transformation (DFT). Generally, a Fourier transformation is a mathematical technique that decomposes a function into its constituent frequencies. We use the DFT to find the period of a vector. 
+
+The DFT is defined as follows:
+
+::: {.callout-note appearance="minimal" icon=false}
+::: {.definition #def-shor-dft}
+
+## Discrete Fourier Transformation (DFT)
+
+The discrete Fourier transform (DFT) is a linear transformation on $\mathbb{C}^N$ represented by the matrix 
+$$
+\operatorname{DFT}_N = \frac{1}{\sqrt{N}} (\omega^{kl})_{kl} \in \mathbb{C}^{N\times N}
+$$
+with $\omega = e^{2i\pi/N}$, which is the $N$-th root of unity. 
+:::
+:::
+
+This transformation is best imagined as a process, which takes a periodic vector as an input and outputs the period of that vector. The DFT has some important properties, which help us later on. 
+
+::: {.callout-note appearance="minimal" icon=false}
+::: {.therorem #thm-dft-properties}
+
+## Properties of the DFT
+
+Here are some properties of the DFT which can be used without further proof. 
+
+1. The DFT is unitary.
+2. $\omega^t = \omega^{t\mod N}$ for all $t \in \mathbb{Z}$.
+3. Given a quantum state $\psi \in \mathbb{C}^N$ which is $r$-periodic and where $r\mid N$, $\operatorname{DFT}_N \psi$ will compute a quantum state $\phi \in \mathbb{C}^N$, which has non-zero values on the multiples of $\frac{N}{r}$. Note that $\frac{N}{r}$ intuitively represents the frequency of $\psi$. This means, that 
+$$
+|\phi_i| = \begin{cases} \frac{1}{\sqrt{t}}, & \text{if}\ \frac{N}{t}\mid i \\ 0, & \text{otherwise} \end{cases}
+$$
+:::
+:::
+
+## Reducing factoring to period finding
+
+With the DFT, we have seen, that we can use a unitary to find the period of a quantum state. We now look into using period finding to factor integers.  We first look at the definition of the two problems:
+
+
+::: {.callout-note appearance="minimal" icon=false}
+::: {.definition #def-shor-factoring}
+
+## Factoring problem
+
+Given integer $N$ with two prime factors $p,q$ such that $pq=N$ and $p \neq q$, find $p$ and $q$.
+:::
+:::
+Note that this definition of the factoring problem is a simplified version of the factoring problem, where $N$ has only 2 prime factors. 
+
+::: {.callout-note appearance="minimal" icon=false}
+::: {.definition #def-shor-period}
+
+## Period finding problem
+
+Given $f: \mathbb{Z} \to X$ with $f(x) = f(y)$ iff $x \equiv y \bmod r$ for some fixed secret $r$. $r$ is called the *period* of $f$.
+Find $r$.
+
+:::
+:::
+
+To start the reduction, we need a special case of the period finding problem called order finding:
+
+::: {.callout-note appearance="minimal" icon=false}
+::: {.definition #def-shor-order}
+
+## Order finding problem
+
+For known $a$ and $N$ which are relatively prime, find the period $r$ of $f(i) = a^i \bmod n$. We call $r$ the order of $a$ written $r = \text{ ord } a$. (This is similar to finding the smallest $i > 0$ with $f(i) = 1$).
+:::
+:::
+
+Since the order finding problem is just the period finding problem for a specific $f(x)$, we know that if we can solve the period finding problem within reasonable runtime, we can also solve the order finding problem within reasonable runtime. We now reduce the factoring problem to the order finding problem:
+
+We have a integer $N$ as an input for the factoring problem.
+
+1. Pick an $a \in \{1,...,N-1\}$ with $a$ relatively prime to $n$.
+2. Compute the order of $a$, so that $r = \text{ ord } a$ (using the solver for the order finding problem).
+3. If the order $r$ is odd, we abort.
+4. Calculate $x:= a^{\frac{r}{2}}+1 \bmod N$ and $y:= a^{\frac{r}{2}}-1 \bmod N$.
+5. If $\gcd(x,N) \in \{1,N\}$, we abort.
+6. We compute $p = \gcd(x,N)$ and $q = \gcd(y,N)$.
+
+The output of the reduction are $p,q$, such that $pq = N$. This holds, since
+$$
+xy = (a^{\frac{r}{2}}+1) (a^{\frac{r}{2}}-1) = a^r - 1 \equiv 1-1 = 0 \pmod N 
+$$
+
+::: {.callout-note appearance="minimal" icon=false}
+::: {.therorem #thm-shor-abort}
+
+## Probability of an abort
+If $N$ has at least two different prime factors and $N$ is odd, then the probability to abort is $\leq \frac{1}{2}$.  
+
+:::
+:::
+
+All in all this reduction shows, that if we have an oracle which can solve the period finding problem within reasonable runtime, we can also solve the factoring problem within reasonable runtime (since all other operations are classically fast to compute).
+
+## The quantum algorithm for period finding {#sec-shor-algo}
+
+We now look into an quantum algorithm that solves the period finding problem within reasonable runtime. The quantum circuit for Shor's algorithm requires a $f:\{0,1\}^n\rightarrow\{0,1\}^m$ which is $r$-periodic and is show in this figure:
+
+![Shor's algorithm (quantum part)](shor){width=100%}
+
+The algorithm works as follows:
+
+1. We start with a $\ket{0}$ entry on every wire.
+2. We bring the top wire into the superposition over all entries. The quantum state is then $2^\frac{-n}{2}\sum_x \ket{x} \otimes \ket{0^m}$.
+3. We apply $U_f$, which is the unitary of $f:\{0,1\}^n\rightarrow\{0,1\}^m$. This calculates the superposition over all possible values $f(x)$ on the bottom wire. The resulting quantum state is $\frac{-n}{2}\sum_x \ket{x,f(x)}$. 
+4. To understand the algorithm better, we measure the bottom wire at this point. This will give us one random value $f(x_0)$ for some $x_0$. The top wire will then contain a superposition over all values $x$ where $f(x) = f(x_0)$. Since $f$ is know to be $r$-periodic, we know, that $f(x) = f(x_0)$ iff $x \equiv x_0 \bmod r$. This means, that on the resulting quantum state on the top wire is periodic and can be written as $\frac{1}{\sqrt{2^\frac{n}{r}}} \sum_{x\equiv x_0 \bmod r} \ket{x} \otimes \ket{f(x_0)}$.
+5. We apply the Discrete Fourier Transform on the top wire. This will "analyze" the top wire for the period and output a vector with entries at multiples of $\frac{2^n}{r}$ as seen in @thm-dft-properties. For simplicity we assume, that $r \mid 2^n$ holds.
+6. We measure the top wire and get one random multiple of $\frac{2^n}{r}$, which we can denote as $a\cdot\frac{2^n}{r}$
+
+
+Since we get a multiple of $\frac{2^n}{r}$ on each run, we can simply run the algorithm multiple times to get different multiples and then compute $\frac{2^n}{r}$ by taking the gcd of those multiples. From that we compute $r$.
+
+Unfortunately this only works because we assumed $r \mid 2^n$. Since this does usually not hold, we only get approximate multiples of $\frac{2^n}{r}$ (which is not even an integer) and thus post processing is a bit more complex. 
+
+## Post processing
+
+So far we have seen the DFT to analyze the period of a quantum state, we have seen a way to reduce the factoring problem to the period finding and we have seen a quantum algorithm for finding an approximate multiple of such a period of a function. We just need one final step to find $r$. For this we start with a theorem:
+
+::: {.callout-note appearance="minimal" icon=false}
+::: {.therorem #thm-shor-post-process}
+
+## 
+If $\{0,1\}^n \rightarrow \{0,1\}^n$ is $r$-periodic with probability $\Omega(1/\log\log r)$ the following holds:
+$$
+\frac{-r}{2} \leq rc\bmod 2^n \leq \frac{r}{2}
+$$
+where $c$ is the output of the second measurement of the quantum circuit described in @sec-shor-algo. 
+:::
+:::
+
+We assume that the theorem holds for our outcome of the second measurement (If that is not the case, our result will be wrong and we can just run the quantum algorithm again to get a different outcome):
+
+Then exists a $d$ such that:
+$$
+\begin{aligned}
+&\lvert rc - d2^n\rvert \leq \frac{r}{2} \\
+\Leftrightarrow&\lvert \frac{c}{2^n} - \frac{d}{r}\rvert \leq \frac{1}{2^{n+1}}
+\end{aligned}
+$$
+The fraction $\frac{c}{2^n}$ is know so the goal is to find a fraction $\frac{d}{r}$ that is $\frac{1}{2^{n+1}}$ close to $\frac{c}{2^n}$. 
+
+The rest of postprocessing will be updated after the next lecture. 
+
+
+
+
diff --git a/_book/site_libs/bootstrap/bootstrap-icons.css b/site_libs/bootstrap/bootstrap-icons.css
similarity index 100%
rename from _book/site_libs/bootstrap/bootstrap-icons.css
rename to site_libs/bootstrap/bootstrap-icons.css
diff --git a/_book/site_libs/bootstrap/bootstrap-icons.woff b/site_libs/bootstrap/bootstrap-icons.woff
similarity index 100%
rename from _book/site_libs/bootstrap/bootstrap-icons.woff
rename to site_libs/bootstrap/bootstrap-icons.woff
diff --git a/_book/site_libs/bootstrap/bootstrap.min.css b/site_libs/bootstrap/bootstrap.min.css
similarity index 100%
rename from _book/site_libs/bootstrap/bootstrap.min.css
rename to site_libs/bootstrap/bootstrap.min.css
diff --git a/_book/site_libs/bootstrap/bootstrap.min.js b/site_libs/bootstrap/bootstrap.min.js
similarity index 100%
rename from _book/site_libs/bootstrap/bootstrap.min.js
rename to site_libs/bootstrap/bootstrap.min.js
diff --git a/_book/site_libs/clipboard/clipboard.min.js b/site_libs/clipboard/clipboard.min.js
similarity index 100%
rename from _book/site_libs/clipboard/clipboard.min.js
rename to site_libs/clipboard/clipboard.min.js
diff --git a/_book/site_libs/quarto-html/anchor.min.js b/site_libs/quarto-html/anchor.min.js
similarity index 100%
rename from _book/site_libs/quarto-html/anchor.min.js
rename to site_libs/quarto-html/anchor.min.js
diff --git a/_book/site_libs/quarto-html/popper.min.js b/site_libs/quarto-html/popper.min.js
similarity index 100%
rename from _book/site_libs/quarto-html/popper.min.js
rename to site_libs/quarto-html/popper.min.js
diff --git a/_book/site_libs/quarto-html/quarto-syntax-highlighting.css b/site_libs/quarto-html/quarto-syntax-highlighting.css
similarity index 100%
rename from _book/site_libs/quarto-html/quarto-syntax-highlighting.css
rename to site_libs/quarto-html/quarto-syntax-highlighting.css
diff --git a/_book/site_libs/quarto-html/quarto.js b/site_libs/quarto-html/quarto.js
similarity index 100%
rename from _book/site_libs/quarto-html/quarto.js
rename to site_libs/quarto-html/quarto.js
diff --git a/_book/site_libs/quarto-html/tippy.css b/site_libs/quarto-html/tippy.css
similarity index 100%
rename from _book/site_libs/quarto-html/tippy.css
rename to site_libs/quarto-html/tippy.css
diff --git a/_book/site_libs/quarto-html/tippy.umd.min.js b/site_libs/quarto-html/tippy.umd.min.js
similarity index 100%
rename from _book/site_libs/quarto-html/tippy.umd.min.js
rename to site_libs/quarto-html/tippy.umd.min.js
diff --git a/_book/site_libs/quarto-nav/headroom.min.js b/site_libs/quarto-nav/headroom.min.js
similarity index 100%
rename from _book/site_libs/quarto-nav/headroom.min.js
rename to site_libs/quarto-nav/headroom.min.js
diff --git a/_book/site_libs/quarto-nav/quarto-nav.js b/site_libs/quarto-nav/quarto-nav.js
similarity index 100%
rename from _book/site_libs/quarto-nav/quarto-nav.js
rename to site_libs/quarto-nav/quarto-nav.js
diff --git a/_book/site_libs/quarto-search/autocomplete.umd.js b/site_libs/quarto-search/autocomplete.umd.js
similarity index 100%
rename from _book/site_libs/quarto-search/autocomplete.umd.js
rename to site_libs/quarto-search/autocomplete.umd.js
diff --git a/_book/site_libs/quarto-search/fuse.min.js b/site_libs/quarto-search/fuse.min.js
similarity index 100%
rename from _book/site_libs/quarto-search/fuse.min.js
rename to site_libs/quarto-search/fuse.min.js
diff --git a/_book/site_libs/quarto-search/quarto-search.js b/site_libs/quarto-search/quarto-search.js
similarity index 100%
rename from _book/site_libs/quarto-search/quarto-search.js
rename to site_libs/quarto-search/quarto-search.js