diff --git a/_book/Introduction-to-Quantum-Computing.epub b/_book/Introduction-to-Quantum-Computing.epub index 295f301c17ad9271e70e692dddfa453e5843fb7d..b1dd0f2580773a8f8773cc5316ba76811e86f5f8 100644 Binary files a/_book/Introduction-to-Quantum-Computing.epub and b/_book/Introduction-to-Quantum-Computing.epub differ diff --git a/_book/Introduction-to-Quantum-Computing.pdf b/_book/Introduction-to-Quantum-Computing.pdf index c28149d5916b4f265b0b68c024614df734f48232..833f6545a72d55227d7391e1f180559ad613291d 100644 Binary files a/_book/Introduction-to-Quantum-Computing.pdf and b/_book/Introduction-to-Quantum-Computing.pdf differ diff --git a/_book/bernsteinVazirani.html b/_book/bernsteinVazirani.html index 459495f4534f234478fc34a41950caba757e2d73..bf9612a3e9000b5582b164de2b5d0e17bf4d5847 100644 --- a/_book/bernsteinVazirani.html +++ b/_book/bernsteinVazirani.html @@ -211,6 +211,23 @@ ul.task-list li input[type="checkbox"] { <a href="./groversAlgorithm.html" class="sidebar-item-text sidebar-link"> <span class="menu-text"><span class="chapter-number">10</span> <span class="chapter-title">Grover’s algorithm</span></span></a> </div> +</li> + </ul> + </li> + <li class="sidebar-item sidebar-item-section"> + <div class="sidebar-item-container"> + <a href="./physicalBackground.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text">Physical Background</span></a> + <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="true" aria-label="Toggle section"> + <i class="bi bi-chevron-right ms-2"></i> + </a> + </div> + <ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 show"> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="./physics.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">11</span> <span class="chapter-title">Quantum Physics</span></span></a> + </div> </li> </ul> </li> diff --git a/_book/compositeSystems.html b/_book/compositeSystems.html index fe2331280edf7ed46083af7df691a6685baa3d55..8224896d191ff317b5a145f57af839fe7f235d83 100644 --- a/_book/compositeSystems.html +++ b/_book/compositeSystems.html @@ -211,6 +211,23 @@ ul.task-list li input[type="checkbox"] { <a href="./groversAlgorithm.html" class="sidebar-item-text sidebar-link"> <span class="menu-text"><span class="chapter-number">10</span> <span class="chapter-title">Grover’s algorithm</span></span></a> </div> +</li> + </ul> + </li> + <li class="sidebar-item sidebar-item-section"> + <div class="sidebar-item-container"> + <a href="./physicalBackground.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text">Physical Background</span></a> + <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="true" aria-label="Toggle section"> + <i class="bi bi-chevron-right ms-2"></i> + </a> + </div> + <ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 show"> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="./physics.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">11</span> <span class="chapter-title">Quantum Physics</span></span></a> + </div> </li> </ul> </li> diff --git a/_book/grover.svg b/_book/grover.svg new file mode 100644 index 0000000000000000000000000000000000000000..83e499ddc7aa38db97841c8452cb00b7bcc9aa7e --- /dev/null +++ b/_book/grover.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="269.348" height="62.579" viewBox="0 0 202.011 46.934"><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#000" d="m29.402 33.618 4.535-6.802"/><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 34.665 26.487)"/><path stroke-width=".797" stroke-linecap="round" stroke-miterlimit="10" fill="none" stroke="#000" d="M38.756 30.217H24.583M52.93 30.217H38.756M95.814 30.217H81.64M128.934 30.217H114.76M178.766 30.217h-14.174"/><symbol id="b"><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="#b" transform="matrix(9.9626 0 0 -9.9626 4.507 35.198)"/><symbol id="c"><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="#c" transform="matrix(9.9626 0 0 -9.9626 6.477 32.926)"/><use xlink:href="#a" transform="matrix(6.9738 0 0 -6.9738 11.397 29.162)"/><symbol id="d"><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="#d" transform="matrix(9.9626 0 0 -9.9626 17.04 35.198)"/><path d="M52.93 38.168h28.71V22.266H52.93z" fill="#fff"/><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#000" d="M52.93 38.168h28.71V22.266H52.93z"/><symbol id="e"><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="#e" transform="matrix(9.9626 0 0 -9.9626 57.304 34.183)"/><symbol id="f"><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="#f" transform="matrix(6.9738 0 0 -6.9738 66.543 31.39)"/><use xlink:href="#a" transform="matrix(6.9738 0 0 -6.9738 72.56 30.637)"/><path d="M95.814 39.031h18.946V21.403H95.814z" fill="#fff"/><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#000" d="M95.814 39.031h18.946V21.403H95.814z"/><symbol id="g"><path d="M.572.591C.621.669.663.672.7.674c.012.001.013.018.013.019C.713.701.708.705.7.705L.618.702.519.705C.513.705.5.705.5.686.5.675.509.674.516.674.543.672.562.662.562.641.562.626.547.604.547.603L.24.115.172.644c0 .017.023.03.069.03.014 0 .025 0 .025.02 0 .009-.008.011-.014.011L.128.702.073.703.019.705C.012.705 0 .705 0 .686 0 .674.009.674.025.674.081.674.082.665.085.64L.164.023C.167.003.171 0 .184 0 .2 0 .204.005.212.018l.36.573z"/></symbol><use xlink:href="#g" transform="matrix(9.9626 0 0 -9.9626 100.357 32.414)"/><symbol id="h"><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="#h" transform="matrix(6.9738 0 0 -6.9738 106.12 35.113)"/><path d="M128.934 38.353h35.658V22.081h-35.658z" fill="#fff"/><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#000" d="M128.934 38.353h35.658V22.081h-35.658z"/><symbol id="i"><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="j"><path d="M.549.258H.524C.513.156.499.031.323.031H.241c-.047 0-.049.007-.049.04v.533c0 .034 0 .048.095.048H.32v.031C.284.68.193.68.152.68.113.68.035.68 0 .683V.652h.024C.101.652.103.641.103.605V.078C.103.042.101.031.024.031H0V0h.521l.028.258z"/></symbol><symbol id="k"><path d="M.197.605c0 .036.003.047.082.047h.026v.031C.27.68.191.68.153.68.114.68.035.68 0 .683V.652h.026C.105.652.108.641.108.605V.078C.108.042.105.031.026.031H0V0c.035.003.114.003.152.003C.191.003.27.003.305 0v.031H.279C.2.031.197.042.197.078v.527z"/></symbol><symbol id="l"><path d="M.192.316h.169c.12 0 .228.081.228.181C.589.595.49.683.353.683H0V.652h.024C.101.652.103.641.103.605V.078C.103.042.101.031.024.031H0V0c.035.003.109.003.147.003C.185.003.26.003.295 0v.031H.271C.194.031.192.042.192.078v.238M.189.342v.27c0 .033.002.04.049.04h.089C.486.652.486.546.486.497c0-.047 0-.155-.159-.155H.189z"/></symbol><use xlink:href="#i" transform="matrix(9.9626 0 0 -9.9626 133.248 32.873)"/><use xlink:href="#j" transform="matrix(9.9626 0 0 -9.9626 139.753 32.873)"/><use xlink:href="#k" transform="matrix(9.9626 0 0 -9.9626 145.93 32.873)"/><use xlink:href="#l" transform="matrix(9.9626 0 0 -9.9626 149.596 32.873)"/><symbol id="m"><path d="M.234.215c.082.036.119.05.144.062.019.008.028.012.028.031A.031.031 0 0 1 .375.34C.368.34.366.34.354.331L.218.24l.015.148c.002.018 0 .043-.03.043C.191.431.172.423.172.401L.177.352.188.24.053.331C.043.337.04.34.031.34A.031.031 0 0 1 0 .308C0 .288.012.283.021.279L.172.216C.09.18.053.166.028.154.009.146 0 .142 0 .123 0 .106.013.091.031.091.038.091.04.091.052.1l.136.091L.172.03C.172.008.191 0 .203 0s.031.008.031.03L.229.079a7.187 7.187 0 0 0-.011.112l.12-.08c.026-.02.028-.02.037-.02.018 0 .031.015.031.032 0 .02-.012.025-.021.029L.234.215z"/></symbol><use xlink:href="#m" transform="matrix(6.9738 0 0 -6.9738 156.648 34.13)"/><path d="M178.766 37.69h19.925V22.744h-19.925z" fill="#fff"/><clipPath id="n"><path transform="matrix(1 0 0 -1 111.637 30.217)" d="M67.129-7.472h19.925V7.472H67.13z"/></clipPath><g clip-path="url(#n)"><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#000" d="M181.6 31.918c3.574-4.259 10.683-4.259 14.256 0M188.729 33.052l4.847-5.783"/><path d="M194.812 25.794c-.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="M194.812 25.794c-.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="M178.766 37.69h19.925V22.744h-19.925zM88.309 46.536h83.788V13.898H88.31z"/><symbol id="o"><path d="M.139.332v.11L0 .431V.4C.07.4.078.393.078.344V.076C.078.031.067.031 0 .031V0l.114.003c.04 0 .087 0 .127-.003v.031H.22C.146.031.144.042.144.078v.154c0 .099.042.188.118.188L.273.419A.043.043 0 0 1 .25.38C.25.352.271.337.293.337c.018 0 .043.012.043.044S.305.442.262.442C.189.442.153.375.139.332z"/></symbol><symbol id="p"><path d="M.084.263c.006.149.09.174.124.174.103 0 .113-.135.113-.174H.084M.083.242h.279c.022 0 .025 0 .025.021 0 .099-.054.196-.179.196C.092.459 0 .356 0 .231 0 .097.105 0 .22 0a.17.17 0 0 1 .167.13c0 .01-.008.012-.013.012C.365.142.363.136.361.128.326.025.236.025.226.025c-.05 0-.09.03-.113.067-.03.048-.03.114-.03.15z"/></symbol><symbol id="q"><path d="M.144.57v.066L0 .625V.594c.071 0 .078-.006.078-.05V.076C.078.031.067.031 0 .031V0l.112.003L.225 0v.031c-.067 0-.078 0-.078.045V.253C.152.237.194.183.27.183c.119 0 .223.098.223.227 0 .127-.097.226-.209.226A.18.18 0 0 1 .144.57M.147.308v.223a.15.15 0 0 0 .129.08C.349.611.41.523.41.41.41.289.34.205.266.205c-.04 0-.078.02-.105.061C.147.287.147.288.147.308z"/></symbol><symbol id="r"><path d="M.291.087C.295.047.322.005.369.005.39.005.451.019.451.1v.056H.426V.1C.426.042.401.036.39.036c-.033 0-.037.045-.037.05v.2c0 .042 0 .081-.036.118A.191.191 0 0 1 .18.459C.098.459.029.412.029.346c0-.03.02-.047.046-.047.028 0 .046.02.046.046C.121.357.116.39.07.391c.027.035.076.046.108.046.049 0 .106-.039.106-.128V.272C.233.269.163.266.1.236.025.202 0 .15 0 .106 0 .025.097 0 .16 0c.066 0 .112.04.131.087M.284.251v-.1C.284.056.212.022.167.022c-.049 0-.09.035-.09.085 0 .055.042.138.207.144z"/></symbol><symbol id="s"><path d="M.154.411h.143v.031H.154v.184H.129C.128.544.098.437 0 .433V.411h.085V.135C.085.012.178 0 .214 0c.071 0 .099.071.099.135v.057H.288V.137C.288.063.258.025.221.025.154.025.154.116.154.133v.278z"/></symbol><use xlink:href="#o" transform="matrix(9.9626 0 0 -9.9626 99.999 9.975)"/><use xlink:href="#p" transform="matrix(9.9626 0 0 -9.9626 103.904 10.085)"/><use xlink:href="#q" transform="matrix(9.9626 0 0 -9.9626 108.328 11.908)"/><use xlink:href="#p" transform="matrix(9.9626 0 0 -9.9626 114.146 10.085)"/><use xlink:href="#r" transform="matrix(9.9626 0 0 -9.9626 118.709 10.085)"/><use xlink:href="#s" transform="matrix(9.9626 0 0 -9.9626 123.46 10.085)"/><symbol id="t"><path d="M.183.411h.094c.02 0 .03 0 .03.02 0 .011-.01.011-.028.011H.191C.227.584.232.604.232.61.232.627.22.637.203.637.2.637.172.636.163.601L.124.442H.03c-.02 0-.03 0-.03-.019C0 .411.008.411.028.411h.088C.044.127.04.11.04.092.04.038.078 0 .132 0c.102 0 .159.146.159.154 0 .01-.008.01-.012.01C.27.164.269.161.264.15.221.046.168.022.134.022.113.022.103.035.103.068c0 .024.002.031.006.048l.074.295z"/></symbol><use xlink:href="#t" transform="matrix(9.9626 0 0 -9.9626 130.695 10.085)"/><symbol id="u"><path d="M.144.442.004.431V.4C.069.4.078.394.078.345V.076C.078.031.067.031 0 .031V0l.11.003C.145.003.18.001.214 0v.031c-.066 0-.07.005-.07.044v.367m.004.174a.052.052 0 0 1-.053.053.054.054 0 0 1-.053-.053c0-.027.022-.053.053-.053.028 0 .053.021.053.053z"/></symbol><symbol id="v"><path d="M.078.344V.076C.078.031.067.031 0 .031V0l.113.003L.225 0v.031c-.067 0-.078 0-.078.045V.26c0 .104.071.16.135.16C.345.42.356.366.356.309V.076C.356.031.345.031.278.031V0l.113.003L.503 0v.031c-.067 0-.078 0-.078.045V.26c0 .104.071.16.135.16C.623.42.634.366.634.309V.076C.634.031.623.031.556.031V0l.113.003L.781 0v.031c-.052 0-.077 0-.078.03v.191c0 .086 0 .117-.031.153C.658.422.625.442.567.442A.158.158 0 0 1 .422.344C.408.431.334.442.289.442.216.442.169.399.141.337v.105L0 .431V.4C.07.4.078.393.078.344z"/></symbol><symbol id="w"><path d="M.175.205C.197.201.279.185.279.113.279.062.244.022.166.022c-.084 0-.12.057-.139.142C.024.177.023.181.013.181 0 .181 0 .174 0 .156V.024C0 .007 0 0 .011 0c.005 0 .006.001.025.02.002.002.002.004.02.023A.15.15 0 0 1 .166 0c.115 0 .161.067.161.139 0 .053-.03.083-.042.095C.252.266.213.274.171.282.115.293.048.306.048.364.048.399.074.44.16.44.27.44.275.35.277.319.278.31.287.31.289.31c.013 0 .013.005.013.024v.101c0 .017 0 .024-.011.024-.005 0-.007 0-.02-.012A.129.129 0 0 0 .254.431C.216.459.175.459.16.459.038.459 0 .392 0 .336 0 .301.016.273.043.251.075.225.103.219.175.205z"/></symbol><use xlink:href="#s" transform="matrix(9.9626 0 0 -9.9626 137.573 10.085)"/><use xlink:href="#u" transform="matrix(9.9626 0 0 -9.9626 141.588 9.975)"/><use xlink:href="#v" transform="matrix(9.9626 0 0 -9.9626 144.348 9.975)"/><use xlink:href="#p" transform="matrix(9.9626 0 0 -9.9626 152.607 10.085)"/><use xlink:href="#w" transform="matrix(9.9626 0 0 -9.9626 157.08 10.085)"/></svg> \ No newline at end of file diff --git a/_book/grover_plt1.svg b/_book/grover_plt1.svg new file mode 100644 index 0000000000000000000000000000000000000000..ac0a7880662c39f66f4c5ba95f4a8ab0afcec082 --- /dev/null +++ b/_book/grover_plt1.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="198.624" height="190.985" viewBox="0 0 148.968 143.239"><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#00f" d="m13.255 129.281 110.005-24.387"/><path stroke-width=".6379617200000001" stroke-linecap="round" stroke-linejoin="round" fill="none" stroke="#00f" d="M121.294 103.207c.294.73 1.937 1.56 2.345 1.603-.351.21-1.49 1.656-1.448 2.443"/><symbol id="a"><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><symbol id="b"><path d="M.21.393C.211.407.211.431.185.431.169.431.156.418.159.405V.392L.173.237.045.33C.036.335.034.337.027.337.013.337 0 .323 0 .309 0 .293.01.289.02.284L.162.216.024.149C.008.141 0 .137 0 .122S.013.094.027.094c.007 0 .009 0 .034.019l.112.081L.158.026C.158.005.176 0 .184 0c.012 0 .027.007.027.026L.196.194.324.101C.333.096.335.094.342.094c.014 0 .027.014.027.028 0 .015-.009.02-.021.026-.06.03-.062.03-.141.067l.138.067C.361.29.369.294.369.309S.356.337.342.337c-.007 0-.009 0-.034-.019L.196.237.21.393z"/></symbol><symbol id="c"><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="#a" transform="matrix(9.9626 0 0 -9.9626 128.854 101.022)" fill="#00f"/><use xlink:href="#b" transform="matrix(9.9626 0 0 -9.9626 131.085 98.192)" fill="#00f"/><use xlink:href="#c" transform="matrix(9.9626 0 0 -9.9626 135.967 101.022)" fill="#00f"/><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#000" d="M13.255 129.281h112.68"/><path stroke-width=".638" stroke-linecap="round" stroke-linejoin="round" fill="none" stroke="#000" d="M124.38 127.209c.13.777 1.555 1.942 1.943 2.072-.388.13-1.813 1.295-1.942 2.072"/><symbol id="d"><path d="M.188.68a.079.079 0 0 1 .003.013c0 .009-.006.012-.014.012A.088.088 0 0 1 .161.703L.062.695C.05.694.039.693.039.674c0-.011.01-.011.024-.011.048 0 .05-.007.05-.017L.11.629.011.234A.366.366 0 0 1 0 .152C0 .068.042 0 .115 0c.112 0 .229.15.229.297 0 .107-.06.156-.12.156C.186.453.152.432.118.4l.07.28M.115.022C.09.022.057.043.057.118c0 .044.009.079.038.193.007.024.007.026.022.046.029.04.067.074.105.074.045 0 .055-.057.055-.089A.783.783 0 0 0 .221.117C.209.092.166.022.115.022z"/></symbol><symbol id="e"><path d="M.241.07A.084.084 0 0 1 .324 0c.037 0 .058.025.073.056.018.038.03.096.03.098 0 .01-.008.01-.015.01C.4.164.399.163.393.141.379.085.36.022.326.022.3.022.3.049.3.063.3.07.3.086.307.114l.068.272C.379.4.379.402.379.407c0 .021-.017.026-.027.026C.32.433.313.399.312.394.293.437.261.453.229.453.118.453 0 .301 0 .155 0 .07.046 0 .121 0c.036 0 .08.021.12.07m.054.254L.248.135C.24.103.178.022.123.022.076.022.068.081.068.111c0 .05.031.167.049.209.025.061.071.111.112.111.044 0 .069-.052.069-.094A.053.053 0 0 0 .295.324z"/></symbol><symbol id="f"><path d="M.449.68a.079.079 0 0 1 .003.013c0 .009-.006.012-.014.012A.088.088 0 0 1 .422.703L.323.695C.311.694.3.693.3.674.3.663.31.663.324.663c.048 0 .05-.007.05-.017L.371.629.313.395C.298.426.271.453.229.453.118.453 0 .301 0 .155 0 .07.046 0 .121 0c.036 0 .08.021.12.07A.084.084 0 0 1 .324 0c.037 0 .058.025.073.056.018.038.03.096.03.098 0 .01-.008.01-.015.01C.4.164.399.163.393.141.379.085.36.022.326.022.3.022.3.049.3.063.3.07.3.085.306.109L.449.68M.247.133C.239.102.178.022.123.022.076.022.068.081.068.111c0 .05.031.167.049.209.025.061.071.111.112.111C.237.431.26.43.278.402a.146.146 0 0 0 .02-.064.045.045 0 0 0-.003-.013L.247.133z"/></symbol><use xlink:href="#d" transform="matrix(9.9626 0 0 -9.9626 131.506 140.028)"/><use xlink:href="#e" transform="matrix(9.9626 0 0 -9.9626 135.51 140.028)"/><use xlink:href="#f" transform="matrix(9.9626 0 0 -9.9626 140.602 140.028)"/><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#000" d="M13.255 129.281V16.601"/><path stroke-width=".638" stroke-linecap="round" stroke-linejoin="round" fill="none" stroke="#000" d="M11.183 18.155c.777-.13 1.943-1.554 2.072-1.942.13.388 1.295 1.813 2.072 1.942"/><symbol id="g"><path d="M.285.258.264.174A.211.211 0 0 0 .218.069C.178.022.138.022.123.022c-.013 0-.044 0-.071.011.02.008.032.029.032.046 0 .013-.009.032-.035.032A.05.05 0 0 1 0 .058C0 .018.037 0 .121 0c.105 0 .181.066.2.142L.43.58c.004.015.004.017.004.021 0 .021-.017.026-.027.026A.04.04 0 0 1 .368.59C.354.619.327.647.284.647.172.647.057.499.057.358c0-.085.047-.153.122-.153.051 0 .094.041.106.053M.35.519.305.337C.297.305.236.227.181.227.127.227.125.303.125.314c0 .048.03.165.051.212.025.054.069.099.108.099.06 0 .069-.084.069-.092L.35.519z"/></symbol><symbol id="h"><path d="M.399.289C.399.384.34.453.253.453.129.453 0 .311 0 .165 0 .062.063 0 .146 0 .27 0 .399.142.399.289M.146.022C.107.022.07.053.07.125c0 .05.026.161.058.215.037.061.085.091.124.091.049 0 .077-.044.077-.103A.568.568 0 0 0 .275.122C.246.067.195.022.146.022z"/></symbol><use xlink:href="#g" transform="matrix(9.9626 0 0 -9.9626 3.848 12.281)"/><use xlink:href="#h" transform="matrix(9.9626 0 0 -9.9626 8.999 10.349)"/><use xlink:href="#h" transform="matrix(9.9626 0 0 -9.9626 13.581 10.349)"/><use xlink:href="#f" transform="matrix(9.9626 0 0 -9.9626 18.144 10.349)"/><path stroke-width=".399" stroke-miterlimit="10" fill="none" stroke="#000" d="M69.949 129.281c0-4.126-.454-8.243-1.346-12.27"/><symbol id="i"><path d="M.413.511c0 .066-.018.205-.12.205C.154.716 0 .434 0 .205 0 .111.029 0 .12 0c.141 0 .293.287.293.511M.106.374c.017.064.037.144.077.215.027.049.064.105.109.105C.341.694.347.63.347.573c0-.049-.008-.1-.032-.199H.106m.2-.032a.893.893 0 0 0-.07-.203C.201.071.163.022.12.022.087.022.066.051.066.144c0 .042.006.1.032.198h.208z"/></symbol><use xlink:href="#i" transform="matrix(9.9626 0 0 -9.9626 73.886 125.87)"/></svg> \ No newline at end of file diff --git a/_book/grover_plt2.svg b/_book/grover_plt2.svg new file mode 100644 index 0000000000000000000000000000000000000000..f0e45d8a05aad3916154f11658c7b3749ca9545e --- /dev/null +++ b/_book/grover_plt2.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="198.624" height="228.244" viewBox="0 0 148.968 171.183"><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#00f" d="m13.255 129.281 110.005-24.387"/><path stroke-width=".6379617200000001" stroke-linecap="round" stroke-linejoin="round" fill="none" stroke="#00f" d="M121.294 103.207c.294.73 1.937 1.56 2.345 1.603-.351.21-1.49 1.656-1.448 2.443"/><symbol id="a"><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><symbol id="b"><path d="M.21.393C.211.407.211.431.185.431.169.431.156.418.159.405V.392L.173.237.045.33C.036.335.034.337.027.337.013.337 0 .323 0 .309 0 .293.01.289.02.284L.162.216.024.149C.008.141 0 .137 0 .122S.013.094.027.094c.007 0 .009 0 .034.019l.112.081L.158.026C.158.005.176 0 .184 0c.012 0 .027.007.027.026L.196.194.324.101C.333.096.335.094.342.094c.014 0 .027.014.027.028 0 .015-.009.02-.021.026-.06.03-.062.03-.141.067l.138.067C.361.29.369.294.369.309S.356.337.342.337c-.007 0-.009 0-.034-.019L.196.237.21.393z"/></symbol><symbol id="c"><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="#a" transform="matrix(9.9626 0 0 -9.9626 128.854 101.022)" fill="#00f"/><use xlink:href="#b" transform="matrix(9.9626 0 0 -9.9626 131.085 98.192)" fill="#00f"/><use xlink:href="#c" transform="matrix(9.9626 0 0 -9.9626 135.967 101.022)" fill="#00f"/><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#000" d="M13.255 129.281h112.68"/><path stroke-width=".638" stroke-linecap="round" stroke-linejoin="round" fill="none" stroke="#000" d="M124.38 127.209c.13.777 1.555 1.942 1.943 2.072-.388.13-1.813 1.295-1.942 2.072"/><symbol id="d"><path d="M.188.68a.079.079 0 0 1 .003.013c0 .009-.006.012-.014.012A.088.088 0 0 1 .161.703L.062.695C.05.694.039.693.039.674c0-.011.01-.011.024-.011.048 0 .05-.007.05-.017L.11.629.011.234A.366.366 0 0 1 0 .152C0 .068.042 0 .115 0c.112 0 .229.15.229.297 0 .107-.06.156-.12.156C.186.453.152.432.118.4l.07.28M.115.022C.09.022.057.043.057.118c0 .044.009.079.038.193.007.024.007.026.022.046.029.04.067.074.105.074.045 0 .055-.057.055-.089A.783.783 0 0 0 .221.117C.209.092.166.022.115.022z"/></symbol><symbol id="e"><path d="M.241.07A.084.084 0 0 1 .324 0c.037 0 .058.025.073.056.018.038.03.096.03.098 0 .01-.008.01-.015.01C.4.164.399.163.393.141.379.085.36.022.326.022.3.022.3.049.3.063.3.07.3.086.307.114l.068.272C.379.4.379.402.379.407c0 .021-.017.026-.027.026C.32.433.313.399.312.394.293.437.261.453.229.453.118.453 0 .301 0 .155 0 .07.046 0 .121 0c.036 0 .08.021.12.07m.054.254L.248.135C.24.103.178.022.123.022.076.022.068.081.068.111c0 .05.031.167.049.209.025.061.071.111.112.111.044 0 .069-.052.069-.094A.053.053 0 0 0 .295.324z"/></symbol><symbol id="f"><path d="M.449.68a.079.079 0 0 1 .003.013c0 .009-.006.012-.014.012A.088.088 0 0 1 .422.703L.323.695C.311.694.3.693.3.674.3.663.31.663.324.663c.048 0 .05-.007.05-.017L.371.629.313.395C.298.426.271.453.229.453.118.453 0 .301 0 .155 0 .07.046 0 .121 0c.036 0 .08.021.12.07A.084.084 0 0 1 .324 0c.037 0 .058.025.073.056.018.038.03.096.03.098 0 .01-.008.01-.015.01C.4.164.399.163.393.141.379.085.36.022.326.022.3.022.3.049.3.063.3.07.3.085.306.109L.449.68M.247.133C.239.102.178.022.123.022.076.022.068.081.068.111c0 .05.031.167.049.209.025.061.071.111.112.111C.237.431.26.43.278.402a.146.146 0 0 0 .02-.064.045.045 0 0 0-.003-.013L.247.133z"/></symbol><use xlink:href="#d" transform="matrix(9.9626 0 0 -9.9626 131.506 140.028)"/><use xlink:href="#e" transform="matrix(9.9626 0 0 -9.9626 135.51 140.028)"/><use xlink:href="#f" transform="matrix(9.9626 0 0 -9.9626 140.602 140.028)"/><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#000" d="M13.255 129.281V16.601"/><path stroke-width=".638" stroke-linecap="round" stroke-linejoin="round" fill="none" stroke="#000" d="M11.183 18.155c.777-.13 1.943-1.554 2.072-1.942.13.388 1.295 1.813 2.072 1.942"/><symbol id="g"><path d="M.285.258.264.174A.211.211 0 0 0 .218.069C.178.022.138.022.123.022c-.013 0-.044 0-.071.011.02.008.032.029.032.046 0 .013-.009.032-.035.032A.05.05 0 0 1 0 .058C0 .018.037 0 .121 0c.105 0 .181.066.2.142L.43.58c.004.015.004.017.004.021 0 .021-.017.026-.027.026A.04.04 0 0 1 .368.59C.354.619.327.647.284.647.172.647.057.499.057.358c0-.085.047-.153.122-.153.051 0 .094.041.106.053M.35.519.305.337C.297.305.236.227.181.227.127.227.125.303.125.314c0 .048.03.165.051.212.025.054.069.099.108.099.06 0 .069-.084.069-.092L.35.519z"/></symbol><symbol id="h"><path d="M.399.289C.399.384.34.453.253.453.129.453 0 .311 0 .165 0 .062.063 0 .146 0 .27 0 .399.142.399.289M.146.022C.107.022.07.053.07.125c0 .05.026.161.058.215.037.061.085.091.124.091.049 0 .077-.044.077-.103A.568.568 0 0 0 .275.122C.246.067.195.022.146.022z"/></symbol><use xlink:href="#g" transform="matrix(9.9626 0 0 -9.9626 3.848 12.281)"/><use xlink:href="#h" transform="matrix(9.9626 0 0 -9.9626 8.999 10.349)"/><use xlink:href="#h" transform="matrix(9.9626 0 0 -9.9626 13.581 10.349)"/><use xlink:href="#f" transform="matrix(9.9626 0 0 -9.9626 18.144 10.349)"/><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="red" d="m13.255 129.281 110.005 24.387"/><path stroke-width=".6379617200000001" stroke-linecap="round" stroke-linejoin="round" fill="none" stroke="red" d="M122.19 151.309c-.041.787 1.098 2.233 1.449 2.443-.408.043-2.05.872-2.345 1.603"/><symbol id="i"><path d="M.572.591C.621.669.663.672.7.674c.012.001.013.018.013.019C.713.701.708.705.7.705L.618.702.519.705C.513.705.5.705.5.686.5.675.509.674.516.674.543.672.562.662.562.641.562.626.547.604.547.603L.24.115.172.644c0 .017.023.03.069.03.014 0 .025 0 .025.02 0 .009-.008.011-.014.011L.128.702.073.703.019.705C.012.705 0 .705 0 .686 0 .674.009.674.025.674.081.674.082.665.085.64L.164.023C.167.003.171 0 .184 0 .2 0 .204.005.212.018l.36.573z"/></symbol><use xlink:href="#i" transform="matrix(9.9626 0 0 -9.9626 112.377 165.231)" fill="red"/><symbol id="j"><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="#j" transform="matrix(6.9738 0 0 -6.9738 118.14 167.929)" fill="red"/><use xlink:href="#a" transform="matrix(9.9626 0 0 -9.9626 125.642 167.503)" fill="red"/><use xlink:href="#b" transform="matrix(9.9626 0 0 -9.9626 127.873 164.673)" fill="red"/><use xlink:href="#c" transform="matrix(9.9626 0 0 -9.9626 132.755 167.503)" fill="red"/><path stroke-width=".399" stroke-miterlimit="10" fill="none" stroke="#000" d="M69.949 129.281c0-4.126-.454-8.243-1.346-12.27"/><symbol id="k"><path d="M.413.511c0 .066-.018.205-.12.205C.154.716 0 .434 0 .205 0 .111.029 0 .12 0c.141 0 .293.287.293.511M.106.374c.017.064.037.144.077.215.027.049.064.105.109.105C.341.694.347.63.347.573c0-.049-.008-.1-.032-.199H.106m.2-.032a.893.893 0 0 0-.07-.203C.201.071.163.022.12.022.087.022.066.051.066.144c0 .042.006.1.032.198h.208z"/></symbol><use xlink:href="#k" transform="matrix(9.9626 0 0 -9.9626 73.886 125.87)"/><path stroke-width=".399" stroke-miterlimit="10" fill="none" stroke="#000" d="M58.61 129.281c0 3.3-.363 6.595-1.078 9.816"/><use xlink:href="#k" transform="matrix(9.9626 0 0 -9.9626 62.547 139.829)"/></svg> \ No newline at end of file diff --git a/_book/grover_plt3.svg b/_book/grover_plt3.svg new file mode 100644 index 0000000000000000000000000000000000000000..f575fd33249fd994db60d7e624303624df88281d --- /dev/null +++ b/_book/grover_plt3.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="218.472" height="228.244" viewBox="0 0 163.854 171.183"><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#00f" d="m13.255 129.281 110.005-24.387"/><path stroke-width=".6379617200000001" stroke-linecap="round" stroke-linejoin="round" fill="none" stroke="#00f" d="M121.294 103.207c.294.73 1.937 1.56 2.345 1.603-.351.21-1.49 1.656-1.448 2.443"/><symbol id="a"><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><symbol id="b"><path d="M.21.393C.211.407.211.431.185.431.169.431.156.418.159.405V.392L.173.237.045.33C.036.335.034.337.027.337.013.337 0 .323 0 .309 0 .293.01.289.02.284L.162.216.024.149C.008.141 0 .137 0 .122S.013.094.027.094c.007 0 .009 0 .034.019l.112.081L.158.026C.158.005.176 0 .184 0c.012 0 .027.007.027.026L.196.194.324.101C.333.096.335.094.342.094c.014 0 .027.014.027.028 0 .015-.009.02-.021.026-.06.03-.062.03-.141.067l.138.067C.361.29.369.294.369.309S.356.337.342.337c-.007 0-.009 0-.034-.019L.196.237.21.393z"/></symbol><symbol id="c"><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="#a" transform="matrix(9.9626 0 0 -9.9626 128.854 101.022)" fill="#00f"/><use xlink:href="#b" transform="matrix(9.9626 0 0 -9.9626 131.085 98.192)" fill="#00f"/><use xlink:href="#c" transform="matrix(9.9626 0 0 -9.9626 135.967 101.022)" fill="#00f"/><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#000" d="M13.255 129.281h112.68"/><path stroke-width=".638" stroke-linecap="round" stroke-linejoin="round" fill="none" stroke="#000" d="M124.38 127.209c.13.777 1.555 1.942 1.943 2.072-.388.13-1.813 1.295-1.942 2.072"/><symbol id="d"><path d="M.188.68a.079.079 0 0 1 .003.013c0 .009-.006.012-.014.012A.088.088 0 0 1 .161.703L.062.695C.05.694.039.693.039.674c0-.011.01-.011.024-.011.048 0 .05-.007.05-.017L.11.629.011.234A.366.366 0 0 1 0 .152C0 .068.042 0 .115 0c.112 0 .229.15.229.297 0 .107-.06.156-.12.156C.186.453.152.432.118.4l.07.28M.115.022C.09.022.057.043.057.118c0 .044.009.079.038.193.007.024.007.026.022.046.029.04.067.074.105.074.045 0 .055-.057.055-.089A.783.783 0 0 0 .221.117C.209.092.166.022.115.022z"/></symbol><symbol id="e"><path d="M.241.07A.084.084 0 0 1 .324 0c.037 0 .058.025.073.056.018.038.03.096.03.098 0 .01-.008.01-.015.01C.4.164.399.163.393.141.379.085.36.022.326.022.3.022.3.049.3.063.3.07.3.086.307.114l.068.272C.379.4.379.402.379.407c0 .021-.017.026-.027.026C.32.433.313.399.312.394.293.437.261.453.229.453.118.453 0 .301 0 .155 0 .07.046 0 .121 0c.036 0 .08.021.12.07m.054.254L.248.135C.24.103.178.022.123.022.076.022.068.081.068.111c0 .05.031.167.049.209.025.061.071.111.112.111.044 0 .069-.052.069-.094A.053.053 0 0 0 .295.324z"/></symbol><symbol id="f"><path d="M.449.68a.079.079 0 0 1 .003.013c0 .009-.006.012-.014.012A.088.088 0 0 1 .422.703L.323.695C.311.694.3.693.3.674.3.663.31.663.324.663c.048 0 .05-.007.05-.017L.371.629.313.395C.298.426.271.453.229.453.118.453 0 .301 0 .155 0 .07.046 0 .121 0c.036 0 .08.021.12.07A.084.084 0 0 1 .324 0c.037 0 .058.025.073.056.018.038.03.096.03.098 0 .01-.008.01-.015.01C.4.164.399.163.393.141.379.085.36.022.326.022.3.022.3.049.3.063.3.07.3.085.306.109L.449.68M.247.133C.239.102.178.022.123.022.076.022.068.081.068.111c0 .05.031.167.049.209.025.061.071.111.112.111C.237.431.26.43.278.402a.146.146 0 0 0 .02-.064.045.045 0 0 0-.003-.013L.247.133z"/></symbol><use xlink:href="#d" transform="matrix(9.9626 0 0 -9.9626 131.506 140.028)"/><use xlink:href="#e" transform="matrix(9.9626 0 0 -9.9626 135.51 140.028)"/><use xlink:href="#f" transform="matrix(9.9626 0 0 -9.9626 140.602 140.028)"/><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#000" d="M13.255 129.281V16.601"/><path stroke-width=".638" stroke-linecap="round" stroke-linejoin="round" fill="none" stroke="#000" d="M11.183 18.155c.777-.13 1.943-1.554 2.072-1.942.13.388 1.295 1.813 2.072 1.942"/><symbol id="g"><path d="M.285.258.264.174A.211.211 0 0 0 .218.069C.178.022.138.022.123.022c-.013 0-.044 0-.071.011.02.008.032.029.032.046 0 .013-.009.032-.035.032A.05.05 0 0 1 0 .058C0 .018.037 0 .121 0c.105 0 .181.066.2.142L.43.58c.004.015.004.017.004.021 0 .021-.017.026-.027.026A.04.04 0 0 1 .368.59C.354.619.327.647.284.647.172.647.057.499.057.358c0-.085.047-.153.122-.153.051 0 .094.041.106.053M.35.519.305.337C.297.305.236.227.181.227.127.227.125.303.125.314c0 .048.03.165.051.212.025.054.069.099.108.099.06 0 .069-.084.069-.092L.35.519z"/></symbol><symbol id="h"><path d="M.399.289C.399.384.34.453.253.453.129.453 0 .311 0 .165 0 .062.063 0 .146 0 .27 0 .399.142.399.289M.146.022C.107.022.07.053.07.125c0 .05.026.161.058.215.037.061.085.091.124.091.049 0 .077-.044.077-.103A.568.568 0 0 0 .275.122C.246.067.195.022.146.022z"/></symbol><use xlink:href="#g" transform="matrix(9.9626 0 0 -9.9626 3.848 12.281)"/><use xlink:href="#h" transform="matrix(9.9626 0 0 -9.9626 8.999 10.349)"/><use xlink:href="#h" transform="matrix(9.9626 0 0 -9.9626 13.581 10.349)"/><use xlink:href="#f" transform="matrix(9.9626 0 0 -9.9626 18.144 10.349)"/><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="red" d="m13.255 129.281 110.005 24.387"/><path stroke-width=".6379617200000001" stroke-linecap="round" stroke-linejoin="round" fill="none" stroke="red" d="M122.19 151.309c-.041.787 1.098 2.233 1.449 2.443-.408.043-2.05.872-2.345 1.603"/><symbol id="i"><path d="M.572.591C.621.669.663.672.7.674c.012.001.013.018.013.019C.713.701.708.705.7.705L.618.702.519.705C.513.705.5.705.5.686.5.675.509.674.516.674.543.672.562.662.562.641.562.626.547.604.547.603L.24.115.172.644c0 .017.023.03.069.03.014 0 .025 0 .025.02 0 .009-.008.011-.014.011L.128.702.073.703.019.705C.012.705 0 .705 0 .686 0 .674.009.674.025.674.081.674.082.665.085.64L.164.023C.167.003.171 0 .184 0 .2 0 .204.005.212.018l.36.573z"/></symbol><use xlink:href="#i" transform="matrix(9.9626 0 0 -9.9626 112.377 165.231)" fill="red"/><symbol id="j"><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="#j" transform="matrix(6.9738 0 0 -6.9738 118.14 167.929)" fill="red"/><use xlink:href="#a" transform="matrix(9.9626 0 0 -9.9626 125.642 167.503)" fill="red"/><use xlink:href="#b" transform="matrix(9.9626 0 0 -9.9626 127.873 164.673)" fill="red"/><use xlink:href="#c" transform="matrix(9.9626 0 0 -9.9626 132.755 167.503)" fill="red"/><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#0f0" d="m13.255 129.281 89.391-68.592"/><path stroke-width=".6379681" stroke-linecap="round" stroke-linejoin="round" fill="none" stroke="#0f0" d="M100.152 59.991c.576.538 2.415.595 2.802.461-.229.34-.65 2.132-.28 2.827"/><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.549.258H.524C.513.156.499.031.323.031H.241c-.047 0-.049.007-.049.04v.533c0 .034 0 .048.095.048H.32v.031C.284.68.193.68.152.68.113.68.035.68 0 .683V.652h.024C.101.652.103.641.103.605V.078C.103.042.101.031.024.031H0V0h.521l.028.258z"/></symbol><symbol id="m"><path d="M.197.605c0 .036.003.047.082.047h.026v.031C.27.68.191.68.153.68.114.68.035.68 0 .683V.652h.026C.105.652.108.641.108.605V.078C.108.042.105.031.026.031H0V0c.035.003.114.003.152.003C.191.003.27.003.305 0v.031H.279C.2.031.197.042.197.078v.527z"/></symbol><symbol id="n"><path d="M.192.316h.169c.12 0 .228.081.228.181C.589.595.49.683.353.683H0V.652h.024C.101.652.103.641.103.605V.078C.103.042.101.031.024.031H0V0c.035.003.109.003.147.003C.185.003.26.003.295 0v.031H.271C.194.031.192.042.192.078v.238M.189.342v.27c0 .033.002.04.049.04h.089C.486.652.486.546.486.497c0-.047 0-.155-.159-.155H.189z"/></symbol><use xlink:href="#k" transform="matrix(9.9626 0 0 -9.9626 107.254 53.69)" fill="#0f0"/><use xlink:href="#l" transform="matrix(9.9626 0 0 -9.9626 113.76 53.69)" fill="#0f0"/><use xlink:href="#m" transform="matrix(9.9626 0 0 -9.9626 119.936 53.69)" fill="#0f0"/><use xlink:href="#n" transform="matrix(9.9626 0 0 -9.9626 123.602 53.69)" fill="#0f0"/><symbol id="o"><path d="M.234.215c.082.036.119.05.144.062.019.008.028.012.028.031A.031.031 0 0 1 .375.34C.368.34.366.34.354.331L.218.24l.015.148c.002.018 0 .043-.03.043C.191.431.172.423.172.401L.177.352.188.24.053.331C.043.337.04.34.031.34A.031.031 0 0 1 0 .308C0 .288.012.283.021.279L.172.216C.09.18.053.166.028.154.009.146 0 .142 0 .123 0 .106.013.091.031.091.038.091.04.091.052.1l.136.091L.172.03C.172.008.191 0 .203 0s.031.008.031.03L.229.079a7.187 7.187 0 0 0-.011.112l.12-.08c.026-.02.028-.02.037-.02.018 0 .031.015.031.032 0 .02-.012.025-.021.029L.234.215z"/></symbol><use xlink:href="#o" transform="matrix(6.9738 0 0 -6.9738 130.654 54.947)" fill="#0f0"/><use xlink:href="#i" transform="matrix(9.9626 0 0 -9.9626 136.832 53.91)" fill="#0f0"/><use xlink:href="#j" transform="matrix(6.9738 0 0 -6.9738 142.594 56.607)" fill="#0f0"/><use xlink:href="#a" transform="matrix(9.9626 0 0 -9.9626 150.096 56.18)" fill="#0f0"/><use xlink:href="#b" transform="matrix(9.9626 0 0 -9.9626 152.327 53.351)" fill="#0f0"/><use xlink:href="#c" transform="matrix(9.9626 0 0 -9.9626 157.209 56.18)" fill="#0f0"/><path stroke-width=".399" stroke-miterlimit="10" fill="none" stroke="#000" d="M69.949 129.281c0-4.126-.454-8.243-1.346-12.27"/><symbol id="p"><path d="M.413.511c0 .066-.018.205-.12.205C.154.716 0 .434 0 .205 0 .111.029 0 .12 0c.141 0 .293.287.293.511M.106.374c.017.064.037.144.077.215.027.049.064.105.109.105C.341.694.347.63.347.573c0-.049-.008-.1-.032-.199H.106m.2-.032a.893.893 0 0 0-.07-.203C.201.071.163.022.12.022.087.022.066.051.066.144c0 .042.006.1.032.198h.208z"/></symbol><use xlink:href="#p" transform="matrix(9.9626 0 0 -9.9626 73.886 125.87)"/><path stroke-width=".399" stroke-miterlimit="10" fill="none" stroke="#000" d="M58.61 129.281c0 3.3-.363 6.595-1.078 9.816"/><use xlink:href="#p" transform="matrix(9.9626 0 0 -9.9626 62.547 139.829)"/><path stroke-width=".399" stroke-miterlimit="10" fill="none" stroke="#000" d="M81.288 113.974a68.053 68.053 0 0 0-12.446-26.69"/><symbol id="q"><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="#q" transform="matrix(9.9626 0 0 -9.9626 72.86 97.724)"/><use xlink:href="#p" transform="matrix(9.9626 0 0 -9.9626 77.76 97.834)"/></svg> \ No newline at end of file diff --git a/_book/groversAlgorithm.html b/_book/groversAlgorithm.html index 2f54728560a743f94aa5afd8c70a8595128e687d..bcae95ff5bf76df9e1c693c92aef95c94e1be08c 100644 --- a/_book/groversAlgorithm.html +++ b/_book/groversAlgorithm.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="./physicalBackground.html" rel="next"> <link href="./shorsAlgorithm.html" rel="prev"> <script src="site_libs/quarto-html/quarto.js"></script> <script src="site_libs/quarto-html/popper.min.js"></script> @@ -239,6 +240,23 @@ window.Quarto = { <a href="./groversAlgorithm.html" class="sidebar-item-text sidebar-link active"> <span class="menu-text"><span class="chapter-number">10</span> <span class="chapter-title">Grover’s algorithm</span></span></a> </div> +</li> + </ul> + </li> + <li class="sidebar-item sidebar-item-section"> + <div class="sidebar-item-container"> + <a href="./physicalBackground.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text">Physical Background</span></a> + <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="true" aria-label="Toggle section"> + <i class="bi bi-chevron-right ms-2"></i> + </a> + </div> + <ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 show"> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="./physics.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">11</span> <span class="chapter-title">Quantum Physics</span></span></a> + </div> </li> </ul> </li> @@ -257,6 +275,10 @@ window.Quarto = { <li><a href="#constructing-the-oracle-v_f" id="toc-constructing-the-oracle-v_f" class="nav-link" data-scroll-target="#constructing-the-oracle-v_f"><span class="header-section-number">10.1.1</span> Constructing the oracle <span class="math inline">\(V_f\)</span></a></li> <li><a href="#constructing-operatornameflip_" id="toc-constructing-operatornameflip_" class="nav-link" data-scroll-target="#constructing-operatornameflip_"><span class="header-section-number">10.1.2</span> Constructing <span class="math inline">\(\operatorname{FLIP}_*\)</span></a></li> </ul></li> + <li><a href="#the-algorithm-for-searching" id="toc-the-algorithm-for-searching" class="nav-link" data-scroll-target="#the-algorithm-for-searching"><span class="header-section-number">10.2</span> The algorithm for searching</a> + <ul class="collapse"> + <li><a href="#understanding-the-algorithm-for-searching" id="toc-understanding-the-algorithm-for-searching" class="nav-link" data-scroll-target="#understanding-the-algorithm-for-searching"><span class="header-section-number">10.2.1</span> Understanding the algorithm for searching</a></li> + </ul></li> </ul> </nav> </div> @@ -316,7 +338,67 @@ V_f \ket{x} = \begin{cases} -\ket{x} & \text{if } f(x) = 1\\ \ket{x} & \ <p><span class="math inline">\(\operatorname{FLIP}_0\)</span> is here definied by the unitary <span class="math display">\[ \operatorname{FLIP}_0 \ket{x} = \begin{cases} \ket{0} & \text{if } x = 0\\ -\ket{x} & \text{else} \end{cases} \]</span></p> -<p>The rest of this section will be updated later on.</p> +</section> +</section> +<section id="the-algorithm-for-searching" class="level2" data-number="10.2"> +<h2 data-number="10.2" class="anchored" data-anchor-id="the-algorithm-for-searching"><span class="header-section-number">10.2</span> The algorithm for searching</h2> +<p>The actual algorithm takes a function <span class="math inline">\(f: \{0,1\}^n \rightarrow \{0,1\}\)</span> and outputs an <span class="math inline">\(x_0\)</span> with <span class="math inline">\(f(x_0)=1\)</span>. For simplicity, we assume, that there is only one <span class="math inline">\(x_0\)</span> for which <span class="math inline">\(f(x_0) = 1\)</span> holds and for each other <span class="math inline">\(x \neq x_0\)</span> it holds that <span class="math inline">\(f(x)=0\)</span>.</p> +<p>With the two new unitaries <span class="math inline">\(V_f\)</span> and <span class="math inline">\(\operatorname{FLIP}_*\)</span> defined, we can construct the circuit for G rover’s algorithm, which is shown in the following figure:</p> +<div class="quarto-figure quarto-figure-center"> +<figure class="figure"> +<p><img src="grover.svg" class="img-fluid figure-img" style="width:100.0%"></p> +<figcaption>The quantum circuit for Grover’s algorithm</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 qubit.</li> +<li>We bring the system into the superposition over all entries by applying <span class="math inline">\(H^{\otimes n}\)</span>. The quantum state is then <span class="math inline">\(2^\frac{-n}{2}\sum_x \ket{x}\)</span> which we also call <span class="math inline">\(\ket{*}\)</span>.</li> +<li>We apply the unitary <span class="math inline">\(V_f\)</span>.</li> +<li>We apply the unitary <span class="math inline">\(\operatorname{FLIP}_*\)</span>.</li> +<li>We repeat steps 3 and 4 <span class="math inline">\(t\)</span> times, and then do a measurement.</li> +</ol> +<p>The measurement in step 5 will then give us <span class="math inline">\(x_0\)</span> with high probability.</p> +<section id="understanding-the-algorithm-for-searching" class="level3" data-number="10.2.1"> +<h3 data-number="10.2.1" class="anchored" data-anchor-id="understanding-the-algorithm-for-searching"><span class="header-section-number">10.2.1</span> Understanding the algorithm for searching</h3> +<p>When looking at the quantum circuit, it is not completely intuitive why the algorithm gives the correct result. We therefore now look into what is happening in each step.</p> +<p>The desired quantum state after the algorithm finishes is <span class="math inline">\(\ket{x_0}\)</span>. At the beginning of the algorithm, we bring the system into the uniform superposition <span class="math inline">\(\ket{*} = 2^\frac{-n}{2}\sum_x \ket{x}\)</span>. We know that <span class="math inline">\(\ket{x_0}\)</span> is part of this superposition, therefore we can rewrite <span class="math inline">\(\ket{*}\)</span> as follows <span class="math display">\[ +\ket{*} = 2^{-\frac{n}{2}}\sum_x \ket{x} += \frac{1}{\sqrt{2^n}} \underbrace{\ket{x_0}}_{\textit{good}} + \sqrt{\frac{2^n-1}{2^n}} \underbrace{\sum_{x\neq x_0} \frac{1}{\sqrt{2^n-1}}\ket{x}}_{\textit{bad}} +\]</span></p> +<p>So the current state can be seen as a superposition of a “good” state <em>good</em> and a “bad” state <em>bad</em>.</p> +<p>The geometric interpretation of this superposition can be drawn as follows:</p> +<div class="quarto-figure quarto-figure-center"> +<figure class="figure"> +<p><img src="grover_plt1.svg" class="img-fluid figure-img" style="width:50.0%"></p> +<figcaption>Geometric interpretation of <span class="math inline">\(\ket{*}\)</span></figcaption> +</figure> +</div> +<p>The angel <span class="math inline">\(\theta\)</span> denotes, how “good” the resulting outcome will be. If <span class="math inline">\(\theta = 0\)</span>, the state is completely bad, if <span class="math inline">\(\theta = \frac{\pi}{2}\)</span>, the state is completely good.</p> +<p>We can calculate <span class="math inline">\(\cos \theta = \lvert\braket{*|bad}\rvert = \frac{\sqrt{2^n-1}}{\sqrt{2^n}}\)</span>. From this we can derivate, that the angle <span class="math inline">\(\theta\)</span> is <span class="math inline">\(\cos^{-1} \sqrt{\frac{2^n-1}{2^n}}\)</span> at the beginning, which is approximately <span class="math inline">\(\sqrt{\frac{1}{2^n}}\)</span>.</p> +<p>We now apply <span class="math inline">\(V_f\)</span> on this quantum state. This will negate the amplitude off our desired <span class="math inline">\(\ket{x_0}\)</span> and not change the amplitude to the rest of the state.</p> +<p><span class="math display">\[ +V_f\ket{*}= -\frac{1}{\sqrt{2^n}} \underbrace{\ket{x_0}}_{\text{good}} + \sqrt{\frac{2^n}{2^n-1}} \underbrace{\sum_{x\neq x_0} \ket{x}}_{\text{bad}} +\]</span></p> +<p>This looks like this in the geometric interpretation:</p> +<div class="quarto-figure quarto-figure-center"> +<figure class="figure"> +<p><img src="grover_plt2.svg" class="img-fluid figure-img" style="width:50.0%"></p> +<figcaption>Geometric interpretation after <span class="math inline">\(V_f\)</span></figcaption> +</figure> +</div> +<p>We can see, that by applying <span class="math inline">\(V_f\)</span>, we mirror the vector across the <em>bad</em> axis.</p> +<p>After <span class="math inline">\(V_f\)</span>, we apply the <span class="math inline">\(\operatorname{FLIP}_*\)</span> operation on the quantum state. Since <span class="math inline">\(\operatorname{FLIP}_*\)</span> does nothing on the <span class="math inline">\(\ket{*}\)</span> entries and negates the amplitude of any vector orthogonal to it, <span class="math inline">\(\operatorname{FLIP}_*\)</span> mirrors the vector across <span class="math inline">\(\ket{*}\)</span>. This can be seen in the following figure:</p> +<div class="quarto-figure quarto-figure-center"> +<figure class="figure"> +<p><img src="grover_plt3.svg" class="img-fluid figure-img" style="width:50.0%"></p> +<figcaption>Geometric interpretation after <span class="math inline">\(\operatorname{FLIP}_*\)</span></figcaption> +</figure> +</div> +<p>All in all, we have seen that by applying <span class="math inline">\(V_f\)</span> and <span class="math inline">\(\operatorname{FLIP}_*\)</span>, we can increase the angle of the quantum state in relation to the “good” and “bad” states by <span class="math inline">\(2\theta\)</span>. Therefore two reflection give rotation. By repeating this step often enough, we can get the amplitude of <span class="math inline">\(\ket{x_0}\)</span> close to 1.</p> +<p>To be more precise: Since we know <span class="math inline">\(\theta\)</span> and we know that we will increase the <em>good</em>-ness of our quantum state by <span class="math inline">\(2\theta\)</span> each time, we can calculate that only <span class="math inline">\(t\)</span> iterations are necessary with <span class="math display">\[ +t \approx \frac{\frac{\pi / 2}{\theta} - 1}{2} = \frac{\pi}{4 \theta} \approx \frac{\pi}{4} \cdot \sqrt{2^n} +\]</span> Grover’s algorithm therefore takes <span class="math inline">\(O(\sqrt{2^n})\)</span> steps, where an evaluation of <span class="math inline">\(t\)</span> counts as one step.</p> </section> @@ -739,6 +821,9 @@ window.document.addEventListener("DOMContentLoaded", function (event) { </a> </div> <div class="nav-page nav-page-next"> + <a href="./physicalBackground.html" class="pagination-link" aria-label="Physical Background"> + <span class="nav-page-text">Physical Background</span> <i class="bi bi-arrow-right-short"></i> + </a> </div> </nav> </div> <!-- /content --> diff --git a/_book/index.html b/_book/index.html index ca2943f8123e49d701fb6cbf74367b42fb7d19e6..1e061feeb5549595c2b56022a07d88993247dc16 100644 --- a/_book/index.html +++ b/_book/index.html @@ -8,7 +8,7 @@ <meta name="author" content="Jannik Hellenkamp"> <meta name="author" content="Dominique Unruh"> -<meta name="dcterms.date" content="2024-06-18"> +<meta name="dcterms.date" content="2024-06-27"> <title>Introduction to Quantum Computing</title> <style> @@ -213,6 +213,23 @@ ul.task-list li input[type="checkbox"] { <a href="./groversAlgorithm.html" class="sidebar-item-text sidebar-link"> <span class="menu-text"><span class="chapter-number">10</span> <span class="chapter-title">Grover’s algorithm</span></span></a> </div> +</li> + </ul> + </li> + <li class="sidebar-item sidebar-item-section"> + <div class="sidebar-item-container"> + <a href="./physicalBackground.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text">Physical Background</span></a> + <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="true" aria-label="Toggle section"> + <i class="bi bi-chevron-right ms-2"></i> + </a> + </div> + <ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 show"> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="./physics.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">11</span> <span class="chapter-title">Quantum Physics</span></span></a> + </div> </li> </ul> </li> @@ -257,7 +274,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">June 18, 2024</p> + <p class="date">June 27, 2024</p> </div> </div> @@ -277,6 +294,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.5-27.06.2024" class="level4"> +<h4 class="anchored" data-anchor-id="version-0.1.5-27.06.2024">Version 0.1.5 (27.06.2024)</h4> +<ul> +<li>finished chapter 10</li> +<li>stated chapter 11</li> +</ul> +</section> <section id="version-0.1.4-18.06.2024" class="level4"> <h4 class="anchored" data-anchor-id="version-0.1.4-18.06.2024">Version 0.1.4 (18.06.2024)</h4> <ul> diff --git a/_book/introduction.html b/_book/introduction.html index 6f3590bc023bc06d2e15ce763c3bc08621066518..af46c81477c39d2528b1ec96b2f3f27385fa665e 100644 --- a/_book/introduction.html +++ b/_book/introduction.html @@ -240,6 +240,23 @@ window.Quarto = { <a href="./groversAlgorithm.html" class="sidebar-item-text sidebar-link"> <span class="menu-text"><span class="chapter-number">10</span> <span class="chapter-title">Grover’s algorithm</span></span></a> </div> +</li> + </ul> + </li> + <li class="sidebar-item sidebar-item-section"> + <div class="sidebar-item-container"> + <a href="./physicalBackground.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text">Physical Background</span></a> + <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="true" aria-label="Toggle section"> + <i class="bi bi-chevron-right ms-2"></i> + </a> + </div> + <ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 show"> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="./physics.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">11</span> <span class="chapter-title">Quantum Physics</span></span></a> + </div> </li> </ul> </li> diff --git a/_book/observingSystems.html b/_book/observingSystems.html index d94cfc3a43997fc1a094e90652af2b7797557db6..d133716091ff104d4cf9263e11246a214548cbcf 100644 --- a/_book/observingSystems.html +++ b/_book/observingSystems.html @@ -211,6 +211,23 @@ ul.task-list li input[type="checkbox"] { <a href="./groversAlgorithm.html" class="sidebar-item-text sidebar-link"> <span class="menu-text"><span class="chapter-number">10</span> <span class="chapter-title">Grover’s algorithm</span></span></a> </div> +</li> + </ul> + </li> + <li class="sidebar-item sidebar-item-section"> + <div class="sidebar-item-container"> + <a href="./physicalBackground.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text">Physical Background</span></a> + <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="true" aria-label="Toggle section"> + <i class="bi bi-chevron-right ms-2"></i> + </a> + </div> + <ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 show"> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="./physics.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">11</span> <span class="chapter-title">Quantum Physics</span></span></a> + </div> </li> </ul> </li> diff --git a/_book/partialObserving.html b/_book/partialObserving.html index 92bdc560dbc18bdf1eebcb9ce6b6bdf517963aa8..b4f0e70fa1d3282d423fb78c20ab762c6c61eb9d 100644 --- a/_book/partialObserving.html +++ b/_book/partialObserving.html @@ -211,6 +211,23 @@ ul.task-list li input[type="checkbox"] { <a href="./groversAlgorithm.html" class="sidebar-item-text sidebar-link"> <span class="menu-text"><span class="chapter-number">10</span> <span class="chapter-title">Grover’s algorithm</span></span></a> </div> +</li> + </ul> + </li> + <li class="sidebar-item sidebar-item-section"> + <div class="sidebar-item-container"> + <a href="./physicalBackground.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text">Physical Background</span></a> + <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="true" aria-label="Toggle section"> + <i class="bi bi-chevron-right ms-2"></i> + </a> + </div> + <ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 show"> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="./physics.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">11</span> <span class="chapter-title">Quantum Physics</span></span></a> + </div> </li> </ul> </li> diff --git a/_book/physicalBackground.html b/_book/physicalBackground.html new file mode 100644 index 0000000000000000000000000000000000000000..c7e1224f3c49679f40aaddfc1bf9318e2a812e6e --- /dev/null +++ b/_book/physicalBackground.html @@ -0,0 +1,694 @@ +<!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 - Physical Background</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="./physics.html" rel="next"> +<link href="./groversAlgorithm.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="./physicalBackground.html">Physical Background</a></li></ol></nav> + <a class="flex-grow-1" role="button" data-bs-toggle="collapse" data-bs-target=".quarto-sidebar-collapse-item" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }"> + </a> + <button type="button" class="btn quarto-search-button" aria-label="" onclick="window.quartoOpenSearch();"> + <i class="bi bi-search"></i> + </button> + </div> + </nav> +</header> +<!-- content --> +<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article"> +<!-- sidebar --> + <nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation floating overflow-auto"> + <div class="pt-lg-2 mt-2 text-left sidebar-header"> + <div class="sidebar-title mb-0 py-0"> + <a href="./">Introduction to Quantum Computing</a> + <div class="sidebar-tools-main"> + <a href="https://git.rwth-aachen.de/j1/intro-qc/" title="Source Code" class="quarto-navigation-tool px-1" aria-label="Source Code"><i class="bi bi-git"></i></a> + <div class="dropdown"> + <a href="" title="Download" id="quarto-navigation-tool-dropdown-0" class="quarto-navigation-tool dropdown-toggle px-1" data-bs-toggle="dropdown" aria-expanded="false" aria-label="Download"><i class="bi bi-download"></i></a> + <ul class="dropdown-menu" aria-labelledby="quarto-navigation-tool-dropdown-0"> + <li> + <a class="dropdown-item sidebar-tools-main-item" href="./Introduction-to-Quantum-Computing.pdf"> + <i class="bi bi-bi-file-pdf pe-1"></i> + Download PDF + </a> + </li> + <li> + <a class="dropdown-item sidebar-tools-main-item" href="./Introduction-to-Quantum-Computing.epub"> + <i class="bi bi-bi-journal pe-1"></i> + Download ePub + </a> + </li> + </ul> + </div> +</div> + </div> + </div> + <div class="mt-2 flex-shrink-0 align-items-center"> + <div class="sidebar-search"> + <div id="quarto-search" class="" title="Search"></div> + </div> + </div> + <div class="sidebar-menu-container"> + <ul class="list-unstyled mt-1"> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="./index.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text">Welcome</span></a> + </div> +</li> + <li class="sidebar-item sidebar-item-section"> + <div class="sidebar-item-container"> + <a href="./quantumBasics.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text">Quantum Basics</span></a> + <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="true" aria-label="Toggle section"> + <i class="bi bi-chevron-right ms-2"></i> + </a> + </div> + <ul id="quarto-sidebar-section-1" class="collapse list-unstyled sidebar-section depth1 show"> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="./introduction.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">1</span> <span class="chapter-title">Introduction</span></span></a> + </div> +</li> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="./probabilisticSystems.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">2</span> <span class="chapter-title">Probabilistic systems</span></span></a> + </div> +</li> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="./quantumSystems.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">3</span> <span class="chapter-title">Quantum systems</span></span></a> + </div> +</li> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="./observingSystems.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">4</span> <span class="chapter-title">Observing probabilistic and measuring quantum systems</span></span></a> + </div> +</li> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="./partialObserving.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">5</span> <span class="chapter-title">Partial observing and measuring systems</span></span></a> + </div> +</li> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="./compositeSystems.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">6</span> <span class="chapter-title">Composite Systems</span></span></a> + </div> +</li> + <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> <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> <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> <span class="chapter-title">Shor’s Algorithm</span></span></a> + </div> +</li> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="./groversAlgorithm.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">10</span> <span class="chapter-title">Grover’s algorithm</span></span></a> + </div> +</li> + </ul> + </li> + <li class="sidebar-item sidebar-item-section"> + <div class="sidebar-item-container"> + <a href="./physicalBackground.html" class="sidebar-item-text sidebar-link active"> + <span class="menu-text">Physical Background</span></a> + <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="true" aria-label="Toggle section"> + <i class="bi bi-chevron-right ms-2"></i> + </a> + </div> + <ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 show"> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="./physics.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">11</span> <span class="chapter-title">Quantum Physics</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">Physical Background</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="./groversAlgorithm.html" class="pagination-link" aria-label="Grover's algorithm"> + <i class="bi bi-arrow-left-short"></i> <span class="nav-page-text"><span class="chapter-number">10</span> <span class="chapter-title">Grover’s algorithm</span></span> + </a> + </div> + <div class="nav-page nav-page-next"> + <a href="./physics.html" class="pagination-link" aria-label="Quantum Physics"> + <span class="nav-page-text"><span class="chapter-number">11</span> <span class="chapter-title">Quantum Physics</span></span> <i class="bi bi-arrow-right-short"></i> + </a> + </div> +</nav> +</div> <!-- /content --> + + + + +</body></html> \ No newline at end of file diff --git a/_book/physics.html b/_book/physics.html new file mode 100644 index 0000000000000000000000000000000000000000..ac852d01cdb81b7b316d4ee6f6c7ebaa3c924e50 --- /dev/null +++ b/_book/physics.html @@ -0,0 +1,795 @@ +<!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 - 11 Quantum Physics</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="./physicalBackground.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="./physicalBackground.html">Physical Background</a></li><li class="breadcrumb-item"><a href="./physics.html"><span class="chapter-number">11</span> <span class="chapter-title">Quantum Physics</span></a></li></ol></nav> + <a class="flex-grow-1" role="button" data-bs-toggle="collapse" data-bs-target=".quarto-sidebar-collapse-item" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }"> + </a> + <button type="button" class="btn quarto-search-button" aria-label="" onclick="window.quartoOpenSearch();"> + <i class="bi bi-search"></i> + </button> + </div> + </nav> +</header> +<!-- content --> +<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article"> +<!-- sidebar --> + <nav id="quarto-sidebar" class="sidebar collapse collapse-horizontal quarto-sidebar-collapse-item sidebar-navigation floating overflow-auto"> + <div class="pt-lg-2 mt-2 text-left sidebar-header"> + <div class="sidebar-title mb-0 py-0"> + <a href="./">Introduction to Quantum Computing</a> + <div class="sidebar-tools-main"> + <a href="https://git.rwth-aachen.de/j1/intro-qc/" title="Source Code" class="quarto-navigation-tool px-1" aria-label="Source Code"><i class="bi bi-git"></i></a> + <div class="dropdown"> + <a href="" title="Download" id="quarto-navigation-tool-dropdown-0" class="quarto-navigation-tool dropdown-toggle px-1" data-bs-toggle="dropdown" aria-expanded="false" aria-label="Download"><i class="bi bi-download"></i></a> + <ul class="dropdown-menu" aria-labelledby="quarto-navigation-tool-dropdown-0"> + <li> + <a class="dropdown-item sidebar-tools-main-item" href="./Introduction-to-Quantum-Computing.pdf"> + <i class="bi bi-bi-file-pdf pe-1"></i> + Download PDF + </a> + </li> + <li> + <a class="dropdown-item sidebar-tools-main-item" href="./Introduction-to-Quantum-Computing.epub"> + <i class="bi bi-bi-journal pe-1"></i> + Download ePub + </a> + </li> + </ul> + </div> +</div> + </div> + </div> + <div class="mt-2 flex-shrink-0 align-items-center"> + <div class="sidebar-search"> + <div id="quarto-search" class="" title="Search"></div> + </div> + </div> + <div class="sidebar-menu-container"> + <ul class="list-unstyled mt-1"> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="./index.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text">Welcome</span></a> + </div> +</li> + <li class="sidebar-item sidebar-item-section"> + <div class="sidebar-item-container"> + <a href="./quantumBasics.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text">Quantum Basics</span></a> + <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="true" aria-label="Toggle section"> + <i class="bi bi-chevron-right ms-2"></i> + </a> + </div> + <ul id="quarto-sidebar-section-1" class="collapse list-unstyled sidebar-section depth1 show"> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="./introduction.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">1</span> <span class="chapter-title">Introduction</span></span></a> + </div> +</li> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="./probabilisticSystems.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">2</span> <span class="chapter-title">Probabilistic systems</span></span></a> + </div> +</li> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="./quantumSystems.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">3</span> <span class="chapter-title">Quantum systems</span></span></a> + </div> +</li> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="./observingSystems.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">4</span> <span class="chapter-title">Observing probabilistic and measuring quantum systems</span></span></a> + </div> +</li> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="./partialObserving.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">5</span> <span class="chapter-title">Partial observing and measuring systems</span></span></a> + </div> +</li> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="./compositeSystems.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">6</span> <span class="chapter-title">Composite Systems</span></span></a> + </div> +</li> + <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> <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> <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> <span class="chapter-title">Shor’s Algorithm</span></span></a> + </div> +</li> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="./groversAlgorithm.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">10</span> <span class="chapter-title">Grover’s algorithm</span></span></a> + </div> +</li> + </ul> + </li> + <li class="sidebar-item sidebar-item-section"> + <div class="sidebar-item-container"> + <a href="./physicalBackground.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text">Physical Background</span></a> + <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="true" aria-label="Toggle section"> + <i class="bi bi-chevron-right ms-2"></i> + </a> + </div> + <ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 show"> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="./physics.html" class="sidebar-item-text sidebar-link active"> + <span class="menu-text"><span class="chapter-number">11</span> <span class="chapter-title">Quantum Physics</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="#wave-function" id="toc-wave-function" class="nav-link active" data-scroll-target="#wave-function"><span class="header-section-number">11.1</span> Wave function</a></li> + <li><a href="#energy-hamiltonian" id="toc-energy-hamiltonian" class="nav-link" data-scroll-target="#energy-hamiltonian"><span class="header-section-number">11.2</span> Energy / Hamiltonian</a></li> + <li><a href="#schrödinger-equation" id="toc-schrödinger-equation" class="nav-link" data-scroll-target="#schrödinger-equation"><span class="header-section-number">11.3</span> Schrödinger equation</a> + <ul class="collapse"> + <li><a href="#time-dependent-schrödinger-equation" id="toc-time-dependent-schrödinger-equation" class="nav-link" data-scroll-target="#time-dependent-schrödinger-equation"><span class="header-section-number">11.3.1</span> Time-dependent Schrödinger equation</a></li> + <li><a href="#time-independent-schrödinger-equation" id="toc-time-independent-schrödinger-equation" class="nav-link" data-scroll-target="#time-independent-schrödinger-equation"><span class="header-section-number">11.3.2</span> Time-independent Schrödinger equation</a></li> + </ul></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="./physicalBackground.html">Physical Background</a></li><li class="breadcrumb-item"><a href="./physics.html"><span class="chapter-number">11</span> <span class="chapter-title">Quantum Physics</span></a></li></ol></nav> +<div class="quarto-title"> +<h1 class="title"><span class="chapter-number">11</span> <span class="chapter-title">Quantum Physics</span></h1> +</div> + + + +<div class="quarto-title-meta"> + + + + + </div> + + + +</header> + + +<p>To further understand, how quantum computers work, we take a look at the basics of quantum physics.</p> +<section id="wave-function" class="level2" data-number="11.1"> +<h2 data-number="11.1" class="anchored" data-anchor-id="wave-function"><span class="header-section-number">11.1</span> Wave function</h2> +<p>The first concept we look into is the wave function of quantum mechanics. For this we will look at the experiment “particle in a well”. To keep the math simple, we assume the space to be 1-dimensional, so the particle is confined to a line.</p> +<p>In this experiment, we have one particle and a potential, which is denoted by a function <span class="math inline">\(V: \mathbb{R} \rightarrow \mathbb{R}\)</span>. This function maps a position of a particle in <span class="math inline">\(\mathbb{R}\)</span> to the energy which is needed to hold the particle in that position.</p> +<p>Classically a state of a system at time <span class="math inline">\(t\)</span> is described by the position <span class="math inline">\(x(t) \in \mathbb{R}\)</span> and the momentum <span class="math inline">\(p(t) \in \mathbb{R}\)</span>.</p> +<p>In the quantum world, we have a wave function <span class="math inline">\(\psi_t(x)\)</span> with <span class="math inline">\(\psi_t: \mathbb{R} \rightarrow \mathbb{C}\)</span> under <span class="math inline">\(t\in\mathbb{R}\)</span>, which takes the position of a particle as an input and outputs the amplitude of that particle, with <span class="math inline">\(t\)</span> as the time.</p> +<p>To calculate the probability of a particle being in the interval <span class="math inline">\([a,b]\)</span> at time <span class="math inline">\(t_0\)</span>, we can use the integral over the wave function: <span class="math display">\[ +\Pr[\text{Particle is in }[a,b]\text{ a time }t_0] = \int_a^b \lvert \psi_{t_0}(x) \rvert^2 dx +\]</span></p> +<p>From this we can see, that the integral <span class="math inline">\(\int \lvert \psi_{t_0} \rvert ^2 dx = 1\)</span>. The momentum is not needed for the wave function.</p> +<p>In general, the wave function can have a different domain, e.g. <span class="math inline">\(\psi_t: \mathbb{R}^3 \rightarrow \mathbb{C}\)</span> for a particle in 3D-space. Everything below works analogously in that case.</p> +</section> +<section id="energy-hamiltonian" class="level2" data-number="11.2"> +<h2 data-number="11.2" class="anchored" data-anchor-id="energy-hamiltonian"><span class="header-section-number">11.2</span> Energy / Hamiltonian</h2> +<p>Given a particle in a state, this particle has some energy. Classically this energy is calculated from the potential and the momentum, with <span class="math display">\[ +\operatorname{Energy} := \underbrace{V(x)}_{\text{{potential energy}}} \cdot \underbrace{\frac{p^2}{2m}}_{\text{kinetic energy}} +\]</span></p> +<p>In the quantum world, we can calculate the potential energy using the wave function as follows: <span class="math display">\[ +\text{potential energy} := \int \underbrace{\lvert \psi(x) \rvert^2}_{\text{probability at pos. }x} \cdot V(x) dx +\]</span> The kinetic energy can be calculated as follows: <span class="math display">\[ +\text{kinetic energy}:= \int \overline{\psi(x)} \cdot \frac{\hbar}{2m} \cdot \frac{\partial^2 \psi(x)}{\partial x^2} dx +\]</span> <span class="math inline">\(\hbar\)</span> is the reduced Planck constant. We will not go further into reasoning for this definition.</p> +<p>From this we can calculate the energy in the quantum context: <span class="math display">\[ +\begin{aligned} +\text{energy} :=& \int \overline{\psi(x)} \left(\frac{\hbar}{2m} \frac{\partial^2 \psi(x)}{\partial x^2} + V(x)\psi(x)\right) dx\\ +=&\int \overline{\psi(x)} (H\psi)(x) dx\\ +=& \braket{\psi,H\psi} +\end{aligned} +\]</span></p> +<p>Note that the inner product of two functions <span class="math inline">\(\mathbb{R} \rightarrow \mathbb{C}\)</span> is defined by <span class="math display">\[ +\braket{\psi,\varphi} := \int \overline{\psi(x)} \cdot \varphi(x) dx +\]</span></p> +<p>The operator <span class="math inline">\(H\)</span> is called a Hamiltonian and is an operator that maps wave functions to wave functions, such that <span class="math inline">\(\braket{\psi,H\psi}\)</span> is the energy. <span class="math inline">\(H\)</span> is denoted by: <span class="math display">\[ +(H\psi)(x) = \frac{\hbar}{2m} \frac{\partial^2 \psi(x)}{\partial x^2} + V(x)\psi(x) +\]</span></p> +</section> +<section id="schrödinger-equation" class="level2" data-number="11.3"> +<h2 data-number="11.3" class="anchored" data-anchor-id="schrödinger-equation"><span class="header-section-number">11.3</span> Schrödinger equation</h2> +<section id="time-dependent-schrödinger-equation" class="level3" data-number="11.3.1"> +<h3 data-number="11.3.1" class="anchored" data-anchor-id="time-dependent-schrödinger-equation"><span class="header-section-number">11.3.1</span> Time-dependent Schrödinger equation</h3> +<p>The time-dependent Schrödinger equation is denoted by:</p> +<p><span class="math display">\[ +i\hbar \frac{\partial \psi_t(x)}{\partial t} = (H\psi_t)(x) +\]</span></p> +<p>From this we see that the time development of <span class="math inline">\(\psi_t\)</span> is determined by <span class="math inline">\(\psi_t\)</span> at that moment (via <span class="math inline">\(H\psi_t\)</span>).</p> +</section> +<section id="time-independent-schrödinger-equation" class="level3" data-number="11.3.2"> +<h3 data-number="11.3.2" class="anchored" data-anchor-id="time-independent-schrödinger-equation"><span class="header-section-number">11.3.2</span> Time-independent Schrödinger equation</h3> +<p>For the time-independent Schrödinger equation, we try to find a wave function <span class="math inline">\(\psi: \mathbb{R} \rightarrow \mathbb{C}\)</span> and an energy <span class="math inline">\(E\)</span> such that <span class="math display">\[ +H\psi = E\psi +\]</span> This means roughly, that we try to find <span class="math inline">\(\psi\)</span>, that has the same energy everywhere. That is, that we try to find a <span class="math inline">\(\psi\)</span> with energy <span class="math inline">\(E\)</span> (since the energy is <span class="math inline">\(\braket{\psi|H\psi}=\braket{\psi|E\psi}=E\braket{\psi|\psi}=1\)</span>) and not a superposition of different energies.</p> +<p>Such a <span class="math inline">\(\psi\)</span> is useful, since by the time-dependent Schrödinger equation, if <span class="math inline">\(H\psi = E \psi\)</span>, then <span class="math display">\[ +i\hbar \frac{\partial\psi_t(x)}{\partial t} = H\psi = E\psi_{t_0}(x) +\]</span></p> +<p>Solving this differential equation gives us <span class="math inline">\(\psi\)</span> with <span class="math display">\[ +\psi_t(x) = e^{-i E t/\hbar} \psi_{t_0}(x) +\]</span></p> +<p>So all in all: If <span class="math inline">\(\psi_0\)</span> is a solution of the time-independent Schrödinger equation, then <span class="math inline">\(\psi(x,t)= e ^{-i E t / \hbar} \psi_0(x)\)</span> is the solution to the time-dependent Schrödinger equation with initial condition <span class="math inline">\(\psi_0\)</span> (at time <span class="math inline">\(t=0\)</span>).</p> +<p>Given any <span class="math inline">\(\psi_0\)</span>, we can try to rewrite <span class="math inline">\(\psi_0\)</span> as <span class="math inline">\(\psi_0 = \sum_k a_k \psi^k\)</span>, where <span class="math inline">\(\psi^i, E_i\)</span> are solutions of the time-independent Schrödinger equation and then the solution of the time-dependent Schrödinger equation is <span class="math display">\[ +\psi_t(x) = \sum_k a_k e^{-i E t /\hbar} \psi^k(x) +\]</span></p> + + +</section> +</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="./physicalBackground.html" class="pagination-link" aria-label="Physical Background"> + <i class="bi bi-arrow-left-short"></i> <span class="nav-page-text">Physical Background</span> + </a> + </div> + <div class="nav-page nav-page-next"> + </div> +</nav> +</div> <!-- /content --> + + + + +</body></html> \ No newline at end of file diff --git a/_book/probabilisticSystems.html b/_book/probabilisticSystems.html index 98e6727b218cc8ba308b1e45bb9b4bba6628910e..b502fac665a2bb868c4796b7d2cddd2100731bb9 100644 --- a/_book/probabilisticSystems.html +++ b/_book/probabilisticSystems.html @@ -240,6 +240,23 @@ window.Quarto = { <a href="./groversAlgorithm.html" class="sidebar-item-text sidebar-link"> <span class="menu-text"><span class="chapter-number">10</span> <span class="chapter-title">Grover’s algorithm</span></span></a> </div> +</li> + </ul> + </li> + <li class="sidebar-item sidebar-item-section"> + <div class="sidebar-item-container"> + <a href="./physicalBackground.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text">Physical Background</span></a> + <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="true" aria-label="Toggle section"> + <i class="bi bi-chevron-right ms-2"></i> + </a> + </div> + <ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 show"> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="./physics.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">11</span> <span class="chapter-title">Quantum Physics</span></span></a> + </div> </li> </ul> </li> diff --git a/_book/quantumAlgorithms.html b/_book/quantumAlgorithms.html index 63966e309668ca999e5c7b7f6fe7e0d6ec853dd0..41cda2f894ee7f06dd4a242d42d304bcbf01ac4f 100644 --- a/_book/quantumAlgorithms.html +++ b/_book/quantumAlgorithms.html @@ -211,6 +211,23 @@ ul.task-list li input[type="checkbox"] { <a href="./groversAlgorithm.html" class="sidebar-item-text sidebar-link"> <span class="menu-text"><span class="chapter-number">10</span> <span class="chapter-title">Grover’s algorithm</span></span></a> </div> +</li> + </ul> + </li> + <li class="sidebar-item sidebar-item-section"> + <div class="sidebar-item-container"> + <a href="./physicalBackground.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text">Physical Background</span></a> + <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="true" aria-label="Toggle section"> + <i class="bi bi-chevron-right ms-2"></i> + </a> + </div> + <ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 show"> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="./physics.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">11</span> <span class="chapter-title">Quantum Physics</span></span></a> + </div> </li> </ul> </li> diff --git a/_book/quantumBasics.html b/_book/quantumBasics.html index ff0e26a4d19fae1f1bb0c1cd20d8ec75c7f49c4f..6b30051ba5e09f6808fdfa5628352bce00ff7ef2 100644 --- a/_book/quantumBasics.html +++ b/_book/quantumBasics.html @@ -211,6 +211,23 @@ ul.task-list li input[type="checkbox"] { <a href="./groversAlgorithm.html" class="sidebar-item-text sidebar-link"> <span class="menu-text"><span class="chapter-number">10</span> <span class="chapter-title">Grover’s algorithm</span></span></a> </div> +</li> + </ul> + </li> + <li class="sidebar-item sidebar-item-section"> + <div class="sidebar-item-container"> + <a href="./physicalBackground.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text">Physical Background</span></a> + <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="true" aria-label="Toggle section"> + <i class="bi bi-chevron-right ms-2"></i> + </a> + </div> + <ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 show"> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="./physics.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">11</span> <span class="chapter-title">Quantum Physics</span></span></a> + </div> </li> </ul> </li> diff --git a/_book/quantumCircutsKetNotation.html b/_book/quantumCircutsKetNotation.html index 762e1f1dcb0be1bc30ce8fcad2a5ca9d70ebde3c..716302a1bc0dd018d375176e074a4c6e538f94e5 100644 --- a/_book/quantumCircutsKetNotation.html +++ b/_book/quantumCircutsKetNotation.html @@ -211,6 +211,23 @@ ul.task-list li input[type="checkbox"] { <a href="./groversAlgorithm.html" class="sidebar-item-text sidebar-link"> <span class="menu-text"><span class="chapter-number">10</span> <span class="chapter-title">Grover’s algorithm</span></span></a> </div> +</li> + </ul> + </li> + <li class="sidebar-item sidebar-item-section"> + <div class="sidebar-item-container"> + <a href="./physicalBackground.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text">Physical Background</span></a> + <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="true" aria-label="Toggle section"> + <i class="bi bi-chevron-right ms-2"></i> + </a> + </div> + <ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 show"> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="./physics.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">11</span> <span class="chapter-title">Quantum Physics</span></span></a> + </div> </li> </ul> </li> diff --git a/_book/quantumSystems.html b/_book/quantumSystems.html index 468a38eec5c41aa58c5fe9b843c147f03dc6f020..f84770ce7a3c33d3ab2625e8d9a8c15b028cc5cb 100644 --- a/_book/quantumSystems.html +++ b/_book/quantumSystems.html @@ -240,6 +240,23 @@ window.Quarto = { <a href="./groversAlgorithm.html" class="sidebar-item-text sidebar-link"> <span class="menu-text"><span class="chapter-number">10</span> <span class="chapter-title">Grover’s algorithm</span></span></a> </div> +</li> + </ul> + </li> + <li class="sidebar-item sidebar-item-section"> + <div class="sidebar-item-container"> + <a href="./physicalBackground.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text">Physical Background</span></a> + <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="true" aria-label="Toggle section"> + <i class="bi bi-chevron-right ms-2"></i> + </a> + </div> + <ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 show"> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="./physics.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">11</span> <span class="chapter-title">Quantum Physics</span></span></a> + </div> </li> </ul> </li> diff --git a/_book/search.json b/_book/search.json index 85115604151c8cb212b8d5b1b58236afc83f79be..d83c80f735713d734eaf554e26d03861253568ad 100644 --- a/_book/search.json +++ b/_book/search.json @@ -14,7 +14,7 @@ "href": "index.html#changelog", "title": "Introduction to Quantum Computing", "section": "Changelog", - "text": "Changelog\n\nVersion 0.1.4 (18.06.2024)\n\nfinished chapter 9\nstated chapter 10\n\n\n\nVersion 0.1.3 (11.06.2024)\n\nadded/extended 9.4 + 9.5 (Post processing and Beginning of DFT circuit)\nupdated 9.3\nadded chapter 3 (Quantum systems)\nerror correction in chapter 9\n\n\n\nVersion 0.1.2 (31.05.2024)\n\nminor changes to chapter 2\nadded chapter 9\n\n\n\nVersion 0.1.1 (16.05.2024)\n\nStarted the lecture notes.", + "text": "Changelog\n\nVersion 0.1.5 (27.06.2024)\n\nfinished chapter 10\nstated chapter 11\n\n\n\nVersion 0.1.4 (18.06.2024)\n\nfinished chapter 9\nstated chapter 10\n\n\n\nVersion 0.1.3 (11.06.2024)\n\nadded/extended 9.4 + 9.5 (Post processing and Beginning of DFT circuit)\nupdated 9.3\nadded chapter 3 (Quantum systems)\nerror correction in chapter 9\n\n\n\nVersion 0.1.2 (31.05.2024)\n\nminor changes to chapter 2\nadded chapter 9\n\n\n\nVersion 0.1.1 (16.05.2024)\n\nStarted the lecture notes.", "crumbs": [ "Welcome" ] @@ -211,10 +211,54 @@ "href": "groversAlgorithm.html#preparations", "title": "10 Grover’s algorithm", "section": "", - "text": "10.1.1 Constructing the oracle \\(V_f\\)\nIn the previous algorithms, we have learned that we can implement a function \\(f\\) as a unitary \\(U_f\\) with \\(U_f\\ket{x,y} = \\ket{x, y \\oplus f(x)}\\). We construct a different unitary called \\(V_f\\) from this, which has the following behavior:\n\\[\nV_f \\ket{x} = \\begin{cases} -\\ket{x} & \\text{if } f(x) = 1\\\\ \\ket{x} & \\text{else} \\end{cases}\n\\]\nWe can construct \\(V_f\\) from \\(U_f\\) using the following circuit:\n\n\n\nThe circuit for \\(V_f\\)\n\n\nThe bottom wire can be discarded, since it always contains a \\(\\ket{-}\\) and thus is not entangled with the upper wire.\n\n\n10.1.2 Constructing \\(\\operatorname{FLIP}_*\\)\nAs a second ingredient for Grover’s algorithm, we define a unitary called \\(\\operatorname{FLIP}_*\\). This unitary does nothing, if it is applied on the uniform superposition \\(\\ket{*}\\). For any other quantum state \\(\\psi\\) with \\(\\psi\\) orthogonal to \\(\\ket{*}\\) it maps \\(\\psi\\) to \\(-\\psi\\). The uniform superposition \\(\\ket{*}\\) simply denotes the superposition over all classical possibilities \\(2^{-\\frac{n}{2}}\\sum_x \\ket{x}\\). We can construct this \\(\\operatorname{FLIP}_*\\) by the following quantum circuit:\n\n\n\nThe circuit for \\(\\operatorname{FLIP}_*\\)\n\n\n\\(\\operatorname{FLIP}_0\\) is here definied by the unitary \\[\n\\operatorname{FLIP}_0 \\ket{x} = \\begin{cases} \\ket{0} & \\text{if } x = 0\\\\ -\\ket{x} & \\text{else} \\end{cases}\n\\]\nThe rest of this section will be updated later on.", + "text": "10.1.1 Constructing the oracle \\(V_f\\)\nIn the previous algorithms, we have learned that we can implement a function \\(f\\) as a unitary \\(U_f\\) with \\(U_f\\ket{x,y} = \\ket{x, y \\oplus f(x)}\\). We construct a different unitary called \\(V_f\\) from this, which has the following behavior:\n\\[\nV_f \\ket{x} = \\begin{cases} -\\ket{x} & \\text{if } f(x) = 1\\\\ \\ket{x} & \\text{else} \\end{cases}\n\\]\nWe can construct \\(V_f\\) from \\(U_f\\) using the following circuit:\n\n\n\nThe circuit for \\(V_f\\)\n\n\nThe bottom wire can be discarded, since it always contains a \\(\\ket{-}\\) and thus is not entangled with the upper wire.\n\n\n10.1.2 Constructing \\(\\operatorname{FLIP}_*\\)\nAs a second ingredient for Grover’s algorithm, we define a unitary called \\(\\operatorname{FLIP}_*\\). This unitary does nothing, if it is applied on the uniform superposition \\(\\ket{*}\\). For any other quantum state \\(\\psi\\) with \\(\\psi\\) orthogonal to \\(\\ket{*}\\) it maps \\(\\psi\\) to \\(-\\psi\\). The uniform superposition \\(\\ket{*}\\) simply denotes the superposition over all classical possibilities \\(2^{-\\frac{n}{2}}\\sum_x \\ket{x}\\). We can construct this \\(\\operatorname{FLIP}_*\\) by the following quantum circuit:\n\n\n\nThe circuit for \\(\\operatorname{FLIP}_*\\)\n\n\n\\(\\operatorname{FLIP}_0\\) is here definied by the unitary \\[\n\\operatorname{FLIP}_0 \\ket{x} = \\begin{cases} \\ket{0} & \\text{if } x = 0\\\\ -\\ket{x} & \\text{else} \\end{cases}\n\\]", "crumbs": [ "Quantum Algorithms", "<span class='chapter-number'>10</span> <span class='chapter-title'>Grover's algorithm</span>" ] + }, + { + "objectID": "groversAlgorithm.html#the-algorithm-for-searching", + "href": "groversAlgorithm.html#the-algorithm-for-searching", + "title": "10 Grover’s algorithm", + "section": "10.2 The algorithm for searching", + "text": "10.2 The algorithm for searching\nThe actual algorithm takes a function \\(f: \\{0,1\\}^n \\rightarrow \\{0,1\\}\\) and outputs an \\(x_0\\) with \\(f(x_0)=1\\). For simplicity, we assume, that there is only one \\(x_0\\) for which \\(f(x_0) = 1\\) holds and for each other \\(x \\neq x_0\\) it holds that \\(f(x)=0\\).\nWith the two new unitaries \\(V_f\\) and \\(\\operatorname{FLIP}_*\\) defined, we can construct the circuit for G rover’s algorithm, which is shown in the following figure:\n\n\n\nThe quantum circuit for Grover’s algorithm\n\n\nThe algorithm works as follows:\n\nWe start with a \\(\\ket{0}\\) entry on every qubit.\nWe bring the system into the superposition over all entries by applying \\(H^{\\otimes n}\\). The quantum state is then \\(2^\\frac{-n}{2}\\sum_x \\ket{x}\\) which we also call \\(\\ket{*}\\).\nWe apply the unitary \\(V_f\\).\nWe apply the unitary \\(\\operatorname{FLIP}_*\\).\nWe repeat steps 3 and 4 \\(t\\) times, and then do a measurement.\n\nThe measurement in step 5 will then give us \\(x_0\\) with high probability.\n\n10.2.1 Understanding the algorithm for searching\nWhen looking at the quantum circuit, it is not completely intuitive why the algorithm gives the correct result. We therefore now look into what is happening in each step.\nThe desired quantum state after the algorithm finishes is \\(\\ket{x_0}\\). At the beginning of the algorithm, we bring the system into the uniform superposition \\(\\ket{*} = 2^\\frac{-n}{2}\\sum_x \\ket{x}\\). We know that \\(\\ket{x_0}\\) is part of this superposition, therefore we can rewrite \\(\\ket{*}\\) as follows \\[\n\\ket{*} = 2^{-\\frac{n}{2}}\\sum_x \\ket{x}\n= \\frac{1}{\\sqrt{2^n}} \\underbrace{\\ket{x_0}}_{\\textit{good}} + \\sqrt{\\frac{2^n-1}{2^n}} \\underbrace{\\sum_{x\\neq x_0} \\frac{1}{\\sqrt{2^n-1}}\\ket{x}}_{\\textit{bad}}\n\\]\nSo the current state can be seen as a superposition of a “good” state good and a “bad” state bad.\nThe geometric interpretation of this superposition can be drawn as follows:\n\n\n\nGeometric interpretation of \\(\\ket{*}\\)\n\n\nThe angel \\(\\theta\\) denotes, how “good” the resulting outcome will be. If \\(\\theta = 0\\), the state is completely bad, if \\(\\theta = \\frac{\\pi}{2}\\), the state is completely good.\nWe can calculate \\(\\cos \\theta = \\lvert\\braket{*|bad}\\rvert = \\frac{\\sqrt{2^n-1}}{\\sqrt{2^n}}\\). From this we can derivate, that the angle \\(\\theta\\) is \\(\\cos^{-1} \\sqrt{\\frac{2^n-1}{2^n}}\\) at the beginning, which is approximately \\(\\sqrt{\\frac{1}{2^n}}\\).\nWe now apply \\(V_f\\) on this quantum state. This will negate the amplitude off our desired \\(\\ket{x_0}\\) and not change the amplitude to the rest of the state.\n\\[\nV_f\\ket{*}= -\\frac{1}{\\sqrt{2^n}} \\underbrace{\\ket{x_0}}_{\\text{good}} + \\sqrt{\\frac{2^n}{2^n-1}} \\underbrace{\\sum_{x\\neq x_0} \\ket{x}}_{\\text{bad}}\n\\]\nThis looks like this in the geometric interpretation:\n\n\n\nGeometric interpretation after \\(V_f\\)\n\n\nWe can see, that by applying \\(V_f\\), we mirror the vector across the bad axis.\nAfter \\(V_f\\), we apply the \\(\\operatorname{FLIP}_*\\) operation on the quantum state. Since \\(\\operatorname{FLIP}_*\\) does nothing on the \\(\\ket{*}\\) entries and negates the amplitude of any vector orthogonal to it, \\(\\operatorname{FLIP}_*\\) mirrors the vector across \\(\\ket{*}\\). This can be seen in the following figure:\n\n\n\nGeometric interpretation after \\(\\operatorname{FLIP}_*\\)\n\n\nAll in all, we have seen that by applying \\(V_f\\) and \\(\\operatorname{FLIP}_*\\), we can increase the angle of the quantum state in relation to the “good” and “bad” states by \\(2\\theta\\). Therefore two reflection give rotation. By repeating this step often enough, we can get the amplitude of \\(\\ket{x_0}\\) close to 1.\nTo be more precise: Since we know \\(\\theta\\) and we know that we will increase the good-ness of our quantum state by \\(2\\theta\\) each time, we can calculate that only \\(t\\) iterations are necessary with \\[\nt \\approx \\frac{\\frac{\\pi / 2}{\\theta} - 1}{2} = \\frac{\\pi}{4 \\theta} \\approx \\frac{\\pi}{4} \\cdot \\sqrt{2^n}\n\\] Grover’s algorithm therefore takes \\(O(\\sqrt{2^n})\\) steps, where an evaluation of \\(t\\) counts as one step.", + "crumbs": [ + "Quantum Algorithms", + "<span class='chapter-number'>10</span> <span class='chapter-title'>Grover's algorithm</span>" + ] + }, + { + "objectID": "physics.html", + "href": "physics.html", + "title": "11 Quantum Physics", + "section": "", + "text": "11.1 Wave function\nThe first concept we look into is the wave function of quantum mechanics. For this we will look at the experiment “particle in a well”. To keep the math simple, we assume the space to be 1-dimensional, so the particle is confined to a line.\nIn this experiment, we have one particle and a potential, which is denoted by a function \\(V: \\mathbb{R} \\rightarrow \\mathbb{R}\\). This function maps a position of a particle in \\(\\mathbb{R}\\) to the energy which is needed to hold the particle in that position.\nClassically a state of a system at time \\(t\\) is described by the position \\(x(t) \\in \\mathbb{R}\\) and the momentum \\(p(t) \\in \\mathbb{R}\\).\nIn the quantum world, we have a wave function \\(\\psi_t(x)\\) with \\(\\psi_t: \\mathbb{R} \\rightarrow \\mathbb{C}\\) under \\(t\\in\\mathbb{R}\\), which takes the position of a particle as an input and outputs the amplitude of that particle, with \\(t\\) as the time.\nTo calculate the probability of a particle being in the interval \\([a,b]\\) at time \\(t_0\\), we can use the integral over the wave function: \\[\n\\Pr[\\text{Particle is in }[a,b]\\text{ a time }t_0] = \\int_a^b \\lvert \\psi_{t_0}(x) \\rvert^2 dx\n\\]\nFrom this we can see, that the integral \\(\\int \\lvert \\psi_{t_0} \\rvert ^2 dx = 1\\). The momentum is not needed for the wave function.\nIn general, the wave function can have a different domain, e.g. \\(\\psi_t: \\mathbb{R}^3 \\rightarrow \\mathbb{C}\\) for a particle in 3D-space. Everything below works analogously in that case.", + "crumbs": [ + "Physical Background", + "<span class='chapter-number'>11</span> <span class='chapter-title'>Quantum Physics</span>" + ] + }, + { + "objectID": "physics.html#energy-hamiltonian", + "href": "physics.html#energy-hamiltonian", + "title": "11 Quantum Physics", + "section": "11.2 Energy / Hamiltonian", + "text": "11.2 Energy / Hamiltonian\nGiven a particle in a state, this particle has some energy. Classically this energy is calculated from the potential and the momentum, with \\[\n\\operatorname{Energy} := \\underbrace{V(x)}_{\\text{{potential energy}}} \\cdot \\underbrace{\\frac{p^2}{2m}}_{\\text{kinetic energy}}\n\\]\nIn the quantum world, we can calculate the potential energy using the wave function as follows: \\[\n\\text{potential energy} := \\int \\underbrace{\\lvert \\psi(x) \\rvert^2}_{\\text{probability at pos. }x} \\cdot V(x) dx\n\\] The kinetic energy can be calculated as follows: \\[\n\\text{kinetic energy}:= \\int \\overline{\\psi(x)} \\cdot \\frac{\\hbar}{2m} \\cdot \\frac{\\partial^2 \\psi(x)}{\\partial x^2} dx\n\\] \\(\\hbar\\) is the reduced Planck constant. We will not go further into reasoning for this definition.\nFrom this we can calculate the energy in the quantum context: \\[\n\\begin{aligned}\n\\text{energy} :=& \\int \\overline{\\psi(x)} \\left(\\frac{\\hbar}{2m} \\frac{\\partial^2 \\psi(x)}{\\partial x^2} + V(x)\\psi(x)\\right) dx\\\\\n=&\\int \\overline{\\psi(x)} (H\\psi)(x) dx\\\\\n=& \\braket{\\psi,H\\psi}\n\\end{aligned}\n\\]\nNote that the inner product of two functions \\(\\mathbb{R} \\rightarrow \\mathbb{C}\\) is defined by \\[\n\\braket{\\psi,\\varphi} := \\int \\overline{\\psi(x)} \\cdot \\varphi(x) dx\n\\]\nThe operator \\(H\\) is called a Hamiltonian and is an operator that maps wave functions to wave functions, such that \\(\\braket{\\psi,H\\psi}\\) is the energy. \\(H\\) is denoted by: \\[\n(H\\psi)(x) = \\frac{\\hbar}{2m} \\frac{\\partial^2 \\psi(x)}{\\partial x^2} + V(x)\\psi(x)\n\\]", + "crumbs": [ + "Physical Background", + "<span class='chapter-number'>11</span> <span class='chapter-title'>Quantum Physics</span>" + ] + }, + { + "objectID": "physics.html#schrödinger-equation", + "href": "physics.html#schrödinger-equation", + "title": "11 Quantum Physics", + "section": "11.3 Schrödinger equation", + "text": "11.3 Schrödinger equation\n\n11.3.1 Time-dependent Schrödinger equation\nThe time-dependent Schrödinger equation is denoted by:\n\\[\ni\\hbar \\frac{\\partial \\psi_t(x)}{\\partial t} = (H\\psi_t)(x)\n\\]\nFrom this we see that the time development of \\(\\psi_t\\) is determined by \\(\\psi_t\\) at that moment (via \\(H\\psi_t\\)).\n\n\n11.3.2 Time-independent Schrödinger equation\nFor the time-independent Schrödinger equation, we try to find a wave function \\(\\psi: \\mathbb{R} \\rightarrow \\mathbb{C}\\) and an energy \\(E\\) such that \\[\nH\\psi = E\\psi\n\\] This means roughly, that we try to find \\(\\psi\\), that has the same energy everywhere. That is, that we try to find a \\(\\psi\\) with energy \\(E\\) (since the energy is \\(\\braket{\\psi|H\\psi}=\\braket{\\psi|E\\psi}=E\\braket{\\psi|\\psi}=1\\)) and not a superposition of different energies.\nSuch a \\(\\psi\\) is useful, since by the time-dependent Schrödinger equation, if \\(H\\psi = E \\psi\\), then \\[\ni\\hbar \\frac{\\partial\\psi_t(x)}{\\partial t} = H\\psi = E\\psi_{t_0}(x)\n\\]\nSolving this differential equation gives us \\(\\psi\\) with \\[\n\\psi_t(x) = e^{-i E t/\\hbar} \\psi_{t_0}(x)\n\\]\nSo all in all: If \\(\\psi_0\\) is a solution of the time-independent Schrödinger equation, then \\(\\psi(x,t)= e ^{-i E t / \\hbar} \\psi_0(x)\\) is the solution to the time-dependent Schrödinger equation with initial condition \\(\\psi_0\\) (at time \\(t=0\\)).\nGiven any \\(\\psi_0\\), we can try to rewrite \\(\\psi_0\\) as \\(\\psi_0 = \\sum_k a_k \\psi^k\\), where \\(\\psi^i, E_i\\) are solutions of the time-independent Schrödinger equation and then the solution of the time-dependent Schrödinger equation is \\[\n\\psi_t(x) = \\sum_k a_k e^{-i E t /\\hbar} \\psi^k(x)\n\\]", + "crumbs": [ + "Physical Background", + "<span class='chapter-number'>11</span> <span class='chapter-title'>Quantum Physics</span>" + ] } ] \ No newline at end of file diff --git a/_book/shorsAlgorithm.html b/_book/shorsAlgorithm.html index 90547530cf3aa4beab0ec147363901aa42e5086c..b611b7ace2c34ae9a238ea49fd935221ab6e00b6 100644 --- a/_book/shorsAlgorithm.html +++ b/_book/shorsAlgorithm.html @@ -240,6 +240,23 @@ window.Quarto = { <a href="./groversAlgorithm.html" class="sidebar-item-text sidebar-link"> <span class="menu-text"><span class="chapter-number">10</span> <span class="chapter-title">Grover’s algorithm</span></span></a> </div> +</li> + </ul> + </li> + <li class="sidebar-item sidebar-item-section"> + <div class="sidebar-item-container"> + <a href="./physicalBackground.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text">Physical Background</span></a> + <a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="true" aria-label="Toggle section"> + <i class="bi bi-chevron-right ms-2"></i> + </a> + </div> + <ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 show"> + <li class="sidebar-item"> + <div class="sidebar-item-container"> + <a href="./physics.html" class="sidebar-item-text sidebar-link"> + <span class="menu-text"><span class="chapter-number">11</span> <span class="chapter-title">Quantum Physics</span></span></a> + </div> </li> </ul> </li> diff --git a/_book/sitemap.xml b/_book/sitemap.xml index 8e3151fabd9517133be541b13fedf4f59db2ce20..66e7c28f3d93a6e762facdb4cec5229c224e6696 100644 --- a/_book/sitemap.xml +++ b/_book/sitemap.xml @@ -2,7 +2,7 @@ <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-06-17T23:33:02.490Z</lastmod> + <lastmod>2024-06-27T16:32:27.607Z</lastmod> </url> <url> <loc>https://qis.rwth-aachen.de/teaching/24ss/intro-quantum-computing/script/quantumBasics.html</loc> @@ -50,14 +50,22 @@ </url> <url> <loc>https://qis.rwth-aachen.de/teaching/24ss/intro-quantum-computing/script/groversAlgorithm.html</loc> - <lastmod>2024-06-18T21:28:50.403Z</lastmod> + <lastmod>2024-06-27T15:18:57.944Z</lastmod> + </url> + <url> + <loc>https://qis.rwth-aachen.de/teaching/24ss/intro-quantum-computing/script/physicalBackground.html</loc> + <lastmod>2024-06-27T03:31:55.722Z</lastmod> + </url> + <url> + <loc>https://qis.rwth-aachen.de/teaching/24ss/intro-quantum-computing/script/physics.html</loc> + <lastmod>2024-06-27T16:28:00.770Z</lastmod> </url> <url> <loc>https://qis.rwth-aachen.de/teaching/24ss/intro-quantum-computing/script/Introduction-to-Quantum-Computing.pdf</loc> - <lastmod>2024-06-18T21:29:48.381Z</lastmod> + <lastmod>2024-06-27T16:33:08.826Z</lastmod> </url> <url> <loc>https://qis.rwth-aachen.de/teaching/24ss/intro-quantum-computing/script/Introduction-to-Quantum-Computing.epub</loc> - <lastmod>2024-06-18T21:29:50.025Z</lastmod> + <lastmod>2024-06-27T16:33:10.539Z</lastmod> </url> </urlset> diff --git a/_quarto.yml b/_quarto.yml index 57020bccd3e545ebb92ed31b7a8cf940608eb70e..daf51ea2053a24bc90ed9e762054a84dac5cf33b 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -8,7 +8,7 @@ book: - name: Jannik Hellenkamp - name: Dominique Unruh downloads: [pdf, epub] - version: 0.1.4 + version: 0.1.5 search: true page-navigation: true site-url: https://qis.rwth-aachen.de/teaching/24ss/intro-quantum-computing/script/ @@ -32,6 +32,9 @@ book: - bernsteinVazirani.qmd - shorsAlgorithm.qmd - groversAlgorithm.qmd + - part: physicalBackground.qmd + chapters: + - physics.qmd bibliography: references.bib diff --git a/grover.pdf b/grover.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7ae5ed5e79afe039292105a82d10c561efd87174 Binary files /dev/null and b/grover.pdf differ diff --git a/grover.svg b/grover.svg new file mode 100644 index 0000000000000000000000000000000000000000..83e499ddc7aa38db97841c8452cb00b7bcc9aa7e --- /dev/null +++ b/grover.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="269.348" height="62.579" viewBox="0 0 202.011 46.934"><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#000" d="m29.402 33.618 4.535-6.802"/><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 34.665 26.487)"/><path stroke-width=".797" stroke-linecap="round" stroke-miterlimit="10" fill="none" stroke="#000" d="M38.756 30.217H24.583M52.93 30.217H38.756M95.814 30.217H81.64M128.934 30.217H114.76M178.766 30.217h-14.174"/><symbol id="b"><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="#b" transform="matrix(9.9626 0 0 -9.9626 4.507 35.198)"/><symbol id="c"><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="#c" transform="matrix(9.9626 0 0 -9.9626 6.477 32.926)"/><use xlink:href="#a" transform="matrix(6.9738 0 0 -6.9738 11.397 29.162)"/><symbol id="d"><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="#d" transform="matrix(9.9626 0 0 -9.9626 17.04 35.198)"/><path d="M52.93 38.168h28.71V22.266H52.93z" fill="#fff"/><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#000" d="M52.93 38.168h28.71V22.266H52.93z"/><symbol id="e"><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="#e" transform="matrix(9.9626 0 0 -9.9626 57.304 34.183)"/><symbol id="f"><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="#f" transform="matrix(6.9738 0 0 -6.9738 66.543 31.39)"/><use xlink:href="#a" transform="matrix(6.9738 0 0 -6.9738 72.56 30.637)"/><path d="M95.814 39.031h18.946V21.403H95.814z" fill="#fff"/><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#000" d="M95.814 39.031h18.946V21.403H95.814z"/><symbol id="g"><path d="M.572.591C.621.669.663.672.7.674c.012.001.013.018.013.019C.713.701.708.705.7.705L.618.702.519.705C.513.705.5.705.5.686.5.675.509.674.516.674.543.672.562.662.562.641.562.626.547.604.547.603L.24.115.172.644c0 .017.023.03.069.03.014 0 .025 0 .025.02 0 .009-.008.011-.014.011L.128.702.073.703.019.705C.012.705 0 .705 0 .686 0 .674.009.674.025.674.081.674.082.665.085.64L.164.023C.167.003.171 0 .184 0 .2 0 .204.005.212.018l.36.573z"/></symbol><use xlink:href="#g" transform="matrix(9.9626 0 0 -9.9626 100.357 32.414)"/><symbol id="h"><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="#h" transform="matrix(6.9738 0 0 -6.9738 106.12 35.113)"/><path d="M128.934 38.353h35.658V22.081h-35.658z" fill="#fff"/><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#000" d="M128.934 38.353h35.658V22.081h-35.658z"/><symbol id="i"><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="j"><path d="M.549.258H.524C.513.156.499.031.323.031H.241c-.047 0-.049.007-.049.04v.533c0 .034 0 .048.095.048H.32v.031C.284.68.193.68.152.68.113.68.035.68 0 .683V.652h.024C.101.652.103.641.103.605V.078C.103.042.101.031.024.031H0V0h.521l.028.258z"/></symbol><symbol id="k"><path d="M.197.605c0 .036.003.047.082.047h.026v.031C.27.68.191.68.153.68.114.68.035.68 0 .683V.652h.026C.105.652.108.641.108.605V.078C.108.042.105.031.026.031H0V0c.035.003.114.003.152.003C.191.003.27.003.305 0v.031H.279C.2.031.197.042.197.078v.527z"/></symbol><symbol id="l"><path d="M.192.316h.169c.12 0 .228.081.228.181C.589.595.49.683.353.683H0V.652h.024C.101.652.103.641.103.605V.078C.103.042.101.031.024.031H0V0c.035.003.109.003.147.003C.185.003.26.003.295 0v.031H.271C.194.031.192.042.192.078v.238M.189.342v.27c0 .033.002.04.049.04h.089C.486.652.486.546.486.497c0-.047 0-.155-.159-.155H.189z"/></symbol><use xlink:href="#i" transform="matrix(9.9626 0 0 -9.9626 133.248 32.873)"/><use xlink:href="#j" transform="matrix(9.9626 0 0 -9.9626 139.753 32.873)"/><use xlink:href="#k" transform="matrix(9.9626 0 0 -9.9626 145.93 32.873)"/><use xlink:href="#l" transform="matrix(9.9626 0 0 -9.9626 149.596 32.873)"/><symbol id="m"><path d="M.234.215c.082.036.119.05.144.062.019.008.028.012.028.031A.031.031 0 0 1 .375.34C.368.34.366.34.354.331L.218.24l.015.148c.002.018 0 .043-.03.043C.191.431.172.423.172.401L.177.352.188.24.053.331C.043.337.04.34.031.34A.031.031 0 0 1 0 .308C0 .288.012.283.021.279L.172.216C.09.18.053.166.028.154.009.146 0 .142 0 .123 0 .106.013.091.031.091.038.091.04.091.052.1l.136.091L.172.03C.172.008.191 0 .203 0s.031.008.031.03L.229.079a7.187 7.187 0 0 0-.011.112l.12-.08c.026-.02.028-.02.037-.02.018 0 .031.015.031.032 0 .02-.012.025-.021.029L.234.215z"/></symbol><use xlink:href="#m" transform="matrix(6.9738 0 0 -6.9738 156.648 34.13)"/><path d="M178.766 37.69h19.925V22.744h-19.925z" fill="#fff"/><clipPath id="n"><path transform="matrix(1 0 0 -1 111.637 30.217)" d="M67.129-7.472h19.925V7.472H67.13z"/></clipPath><g clip-path="url(#n)"><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#000" d="M181.6 31.918c3.574-4.259 10.683-4.259 14.256 0M188.729 33.052l4.847-5.783"/><path d="M194.812 25.794c-.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="M194.812 25.794c-.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="M178.766 37.69h19.925V22.744h-19.925zM88.309 46.536h83.788V13.898H88.31z"/><symbol id="o"><path d="M.139.332v.11L0 .431V.4C.07.4.078.393.078.344V.076C.078.031.067.031 0 .031V0l.114.003c.04 0 .087 0 .127-.003v.031H.22C.146.031.144.042.144.078v.154c0 .099.042.188.118.188L.273.419A.043.043 0 0 1 .25.38C.25.352.271.337.293.337c.018 0 .043.012.043.044S.305.442.262.442C.189.442.153.375.139.332z"/></symbol><symbol id="p"><path d="M.084.263c.006.149.09.174.124.174.103 0 .113-.135.113-.174H.084M.083.242h.279c.022 0 .025 0 .025.021 0 .099-.054.196-.179.196C.092.459 0 .356 0 .231 0 .097.105 0 .22 0a.17.17 0 0 1 .167.13c0 .01-.008.012-.013.012C.365.142.363.136.361.128.326.025.236.025.226.025c-.05 0-.09.03-.113.067-.03.048-.03.114-.03.15z"/></symbol><symbol id="q"><path d="M.144.57v.066L0 .625V.594c.071 0 .078-.006.078-.05V.076C.078.031.067.031 0 .031V0l.112.003L.225 0v.031c-.067 0-.078 0-.078.045V.253C.152.237.194.183.27.183c.119 0 .223.098.223.227 0 .127-.097.226-.209.226A.18.18 0 0 1 .144.57M.147.308v.223a.15.15 0 0 0 .129.08C.349.611.41.523.41.41.41.289.34.205.266.205c-.04 0-.078.02-.105.061C.147.287.147.288.147.308z"/></symbol><symbol id="r"><path d="M.291.087C.295.047.322.005.369.005.39.005.451.019.451.1v.056H.426V.1C.426.042.401.036.39.036c-.033 0-.037.045-.037.05v.2c0 .042 0 .081-.036.118A.191.191 0 0 1 .18.459C.098.459.029.412.029.346c0-.03.02-.047.046-.047.028 0 .046.02.046.046C.121.357.116.39.07.391c.027.035.076.046.108.046.049 0 .106-.039.106-.128V.272C.233.269.163.266.1.236.025.202 0 .15 0 .106 0 .025.097 0 .16 0c.066 0 .112.04.131.087M.284.251v-.1C.284.056.212.022.167.022c-.049 0-.09.035-.09.085 0 .055.042.138.207.144z"/></symbol><symbol id="s"><path d="M.154.411h.143v.031H.154v.184H.129C.128.544.098.437 0 .433V.411h.085V.135C.085.012.178 0 .214 0c.071 0 .099.071.099.135v.057H.288V.137C.288.063.258.025.221.025.154.025.154.116.154.133v.278z"/></symbol><use xlink:href="#o" transform="matrix(9.9626 0 0 -9.9626 99.999 9.975)"/><use xlink:href="#p" transform="matrix(9.9626 0 0 -9.9626 103.904 10.085)"/><use xlink:href="#q" transform="matrix(9.9626 0 0 -9.9626 108.328 11.908)"/><use xlink:href="#p" transform="matrix(9.9626 0 0 -9.9626 114.146 10.085)"/><use xlink:href="#r" transform="matrix(9.9626 0 0 -9.9626 118.709 10.085)"/><use xlink:href="#s" transform="matrix(9.9626 0 0 -9.9626 123.46 10.085)"/><symbol id="t"><path d="M.183.411h.094c.02 0 .03 0 .03.02 0 .011-.01.011-.028.011H.191C.227.584.232.604.232.61.232.627.22.637.203.637.2.637.172.636.163.601L.124.442H.03c-.02 0-.03 0-.03-.019C0 .411.008.411.028.411h.088C.044.127.04.11.04.092.04.038.078 0 .132 0c.102 0 .159.146.159.154 0 .01-.008.01-.012.01C.27.164.269.161.264.15.221.046.168.022.134.022.113.022.103.035.103.068c0 .024.002.031.006.048l.074.295z"/></symbol><use xlink:href="#t" transform="matrix(9.9626 0 0 -9.9626 130.695 10.085)"/><symbol id="u"><path d="M.144.442.004.431V.4C.069.4.078.394.078.345V.076C.078.031.067.031 0 .031V0l.11.003C.145.003.18.001.214 0v.031c-.066 0-.07.005-.07.044v.367m.004.174a.052.052 0 0 1-.053.053.054.054 0 0 1-.053-.053c0-.027.022-.053.053-.053.028 0 .053.021.053.053z"/></symbol><symbol id="v"><path d="M.078.344V.076C.078.031.067.031 0 .031V0l.113.003L.225 0v.031c-.067 0-.078 0-.078.045V.26c0 .104.071.16.135.16C.345.42.356.366.356.309V.076C.356.031.345.031.278.031V0l.113.003L.503 0v.031c-.067 0-.078 0-.078.045V.26c0 .104.071.16.135.16C.623.42.634.366.634.309V.076C.634.031.623.031.556.031V0l.113.003L.781 0v.031c-.052 0-.077 0-.078.03v.191c0 .086 0 .117-.031.153C.658.422.625.442.567.442A.158.158 0 0 1 .422.344C.408.431.334.442.289.442.216.442.169.399.141.337v.105L0 .431V.4C.07.4.078.393.078.344z"/></symbol><symbol id="w"><path d="M.175.205C.197.201.279.185.279.113.279.062.244.022.166.022c-.084 0-.12.057-.139.142C.024.177.023.181.013.181 0 .181 0 .174 0 .156V.024C0 .007 0 0 .011 0c.005 0 .006.001.025.02.002.002.002.004.02.023A.15.15 0 0 1 .166 0c.115 0 .161.067.161.139 0 .053-.03.083-.042.095C.252.266.213.274.171.282.115.293.048.306.048.364.048.399.074.44.16.44.27.44.275.35.277.319.278.31.287.31.289.31c.013 0 .013.005.013.024v.101c0 .017 0 .024-.011.024-.005 0-.007 0-.02-.012A.129.129 0 0 0 .254.431C.216.459.175.459.16.459.038.459 0 .392 0 .336 0 .301.016.273.043.251.075.225.103.219.175.205z"/></symbol><use xlink:href="#s" transform="matrix(9.9626 0 0 -9.9626 137.573 10.085)"/><use xlink:href="#u" transform="matrix(9.9626 0 0 -9.9626 141.588 9.975)"/><use xlink:href="#v" transform="matrix(9.9626 0 0 -9.9626 144.348 9.975)"/><use xlink:href="#p" transform="matrix(9.9626 0 0 -9.9626 152.607 10.085)"/><use xlink:href="#w" transform="matrix(9.9626 0 0 -9.9626 157.08 10.085)"/></svg> \ No newline at end of file diff --git a/grover_plt1.pdf b/grover_plt1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c01b1713fc4b5acc2f8bfa887f304358c1a935f0 Binary files /dev/null and b/grover_plt1.pdf differ diff --git a/grover_plt1.svg b/grover_plt1.svg new file mode 100644 index 0000000000000000000000000000000000000000..ac0a7880662c39f66f4c5ba95f4a8ab0afcec082 --- /dev/null +++ b/grover_plt1.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="198.624" height="190.985" viewBox="0 0 148.968 143.239"><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#00f" d="m13.255 129.281 110.005-24.387"/><path stroke-width=".6379617200000001" stroke-linecap="round" stroke-linejoin="round" fill="none" stroke="#00f" d="M121.294 103.207c.294.73 1.937 1.56 2.345 1.603-.351.21-1.49 1.656-1.448 2.443"/><symbol id="a"><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><symbol id="b"><path d="M.21.393C.211.407.211.431.185.431.169.431.156.418.159.405V.392L.173.237.045.33C.036.335.034.337.027.337.013.337 0 .323 0 .309 0 .293.01.289.02.284L.162.216.024.149C.008.141 0 .137 0 .122S.013.094.027.094c.007 0 .009 0 .034.019l.112.081L.158.026C.158.005.176 0 .184 0c.012 0 .027.007.027.026L.196.194.324.101C.333.096.335.094.342.094c.014 0 .027.014.027.028 0 .015-.009.02-.021.026-.06.03-.062.03-.141.067l.138.067C.361.29.369.294.369.309S.356.337.342.337c-.007 0-.009 0-.034-.019L.196.237.21.393z"/></symbol><symbol id="c"><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="#a" transform="matrix(9.9626 0 0 -9.9626 128.854 101.022)" fill="#00f"/><use xlink:href="#b" transform="matrix(9.9626 0 0 -9.9626 131.085 98.192)" fill="#00f"/><use xlink:href="#c" transform="matrix(9.9626 0 0 -9.9626 135.967 101.022)" fill="#00f"/><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#000" d="M13.255 129.281h112.68"/><path stroke-width=".638" stroke-linecap="round" stroke-linejoin="round" fill="none" stroke="#000" d="M124.38 127.209c.13.777 1.555 1.942 1.943 2.072-.388.13-1.813 1.295-1.942 2.072"/><symbol id="d"><path d="M.188.68a.079.079 0 0 1 .003.013c0 .009-.006.012-.014.012A.088.088 0 0 1 .161.703L.062.695C.05.694.039.693.039.674c0-.011.01-.011.024-.011.048 0 .05-.007.05-.017L.11.629.011.234A.366.366 0 0 1 0 .152C0 .068.042 0 .115 0c.112 0 .229.15.229.297 0 .107-.06.156-.12.156C.186.453.152.432.118.4l.07.28M.115.022C.09.022.057.043.057.118c0 .044.009.079.038.193.007.024.007.026.022.046.029.04.067.074.105.074.045 0 .055-.057.055-.089A.783.783 0 0 0 .221.117C.209.092.166.022.115.022z"/></symbol><symbol id="e"><path d="M.241.07A.084.084 0 0 1 .324 0c.037 0 .058.025.073.056.018.038.03.096.03.098 0 .01-.008.01-.015.01C.4.164.399.163.393.141.379.085.36.022.326.022.3.022.3.049.3.063.3.07.3.086.307.114l.068.272C.379.4.379.402.379.407c0 .021-.017.026-.027.026C.32.433.313.399.312.394.293.437.261.453.229.453.118.453 0 .301 0 .155 0 .07.046 0 .121 0c.036 0 .08.021.12.07m.054.254L.248.135C.24.103.178.022.123.022.076.022.068.081.068.111c0 .05.031.167.049.209.025.061.071.111.112.111.044 0 .069-.052.069-.094A.053.053 0 0 0 .295.324z"/></symbol><symbol id="f"><path d="M.449.68a.079.079 0 0 1 .003.013c0 .009-.006.012-.014.012A.088.088 0 0 1 .422.703L.323.695C.311.694.3.693.3.674.3.663.31.663.324.663c.048 0 .05-.007.05-.017L.371.629.313.395C.298.426.271.453.229.453.118.453 0 .301 0 .155 0 .07.046 0 .121 0c.036 0 .08.021.12.07A.084.084 0 0 1 .324 0c.037 0 .058.025.073.056.018.038.03.096.03.098 0 .01-.008.01-.015.01C.4.164.399.163.393.141.379.085.36.022.326.022.3.022.3.049.3.063.3.07.3.085.306.109L.449.68M.247.133C.239.102.178.022.123.022.076.022.068.081.068.111c0 .05.031.167.049.209.025.061.071.111.112.111C.237.431.26.43.278.402a.146.146 0 0 0 .02-.064.045.045 0 0 0-.003-.013L.247.133z"/></symbol><use xlink:href="#d" transform="matrix(9.9626 0 0 -9.9626 131.506 140.028)"/><use xlink:href="#e" transform="matrix(9.9626 0 0 -9.9626 135.51 140.028)"/><use xlink:href="#f" transform="matrix(9.9626 0 0 -9.9626 140.602 140.028)"/><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#000" d="M13.255 129.281V16.601"/><path stroke-width=".638" stroke-linecap="round" stroke-linejoin="round" fill="none" stroke="#000" d="M11.183 18.155c.777-.13 1.943-1.554 2.072-1.942.13.388 1.295 1.813 2.072 1.942"/><symbol id="g"><path d="M.285.258.264.174A.211.211 0 0 0 .218.069C.178.022.138.022.123.022c-.013 0-.044 0-.071.011.02.008.032.029.032.046 0 .013-.009.032-.035.032A.05.05 0 0 1 0 .058C0 .018.037 0 .121 0c.105 0 .181.066.2.142L.43.58c.004.015.004.017.004.021 0 .021-.017.026-.027.026A.04.04 0 0 1 .368.59C.354.619.327.647.284.647.172.647.057.499.057.358c0-.085.047-.153.122-.153.051 0 .094.041.106.053M.35.519.305.337C.297.305.236.227.181.227.127.227.125.303.125.314c0 .048.03.165.051.212.025.054.069.099.108.099.06 0 .069-.084.069-.092L.35.519z"/></symbol><symbol id="h"><path d="M.399.289C.399.384.34.453.253.453.129.453 0 .311 0 .165 0 .062.063 0 .146 0 .27 0 .399.142.399.289M.146.022C.107.022.07.053.07.125c0 .05.026.161.058.215.037.061.085.091.124.091.049 0 .077-.044.077-.103A.568.568 0 0 0 .275.122C.246.067.195.022.146.022z"/></symbol><use xlink:href="#g" transform="matrix(9.9626 0 0 -9.9626 3.848 12.281)"/><use xlink:href="#h" transform="matrix(9.9626 0 0 -9.9626 8.999 10.349)"/><use xlink:href="#h" transform="matrix(9.9626 0 0 -9.9626 13.581 10.349)"/><use xlink:href="#f" transform="matrix(9.9626 0 0 -9.9626 18.144 10.349)"/><path stroke-width=".399" stroke-miterlimit="10" fill="none" stroke="#000" d="M69.949 129.281c0-4.126-.454-8.243-1.346-12.27"/><symbol id="i"><path d="M.413.511c0 .066-.018.205-.12.205C.154.716 0 .434 0 .205 0 .111.029 0 .12 0c.141 0 .293.287.293.511M.106.374c.017.064.037.144.077.215.027.049.064.105.109.105C.341.694.347.63.347.573c0-.049-.008-.1-.032-.199H.106m.2-.032a.893.893 0 0 0-.07-.203C.201.071.163.022.12.022.087.022.066.051.066.144c0 .042.006.1.032.198h.208z"/></symbol><use xlink:href="#i" transform="matrix(9.9626 0 0 -9.9626 73.886 125.87)"/></svg> \ No newline at end of file diff --git a/grover_plt2.pdf b/grover_plt2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5d475e6df054ad42fc1d2de95f11284c0d028a6b Binary files /dev/null and b/grover_plt2.pdf differ diff --git a/grover_plt2.svg b/grover_plt2.svg new file mode 100644 index 0000000000000000000000000000000000000000..f0e45d8a05aad3916154f11658c7b3749ca9545e --- /dev/null +++ b/grover_plt2.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="198.624" height="228.244" viewBox="0 0 148.968 171.183"><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#00f" d="m13.255 129.281 110.005-24.387"/><path stroke-width=".6379617200000001" stroke-linecap="round" stroke-linejoin="round" fill="none" stroke="#00f" d="M121.294 103.207c.294.73 1.937 1.56 2.345 1.603-.351.21-1.49 1.656-1.448 2.443"/><symbol id="a"><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><symbol id="b"><path d="M.21.393C.211.407.211.431.185.431.169.431.156.418.159.405V.392L.173.237.045.33C.036.335.034.337.027.337.013.337 0 .323 0 .309 0 .293.01.289.02.284L.162.216.024.149C.008.141 0 .137 0 .122S.013.094.027.094c.007 0 .009 0 .034.019l.112.081L.158.026C.158.005.176 0 .184 0c.012 0 .027.007.027.026L.196.194.324.101C.333.096.335.094.342.094c.014 0 .027.014.027.028 0 .015-.009.02-.021.026-.06.03-.062.03-.141.067l.138.067C.361.29.369.294.369.309S.356.337.342.337c-.007 0-.009 0-.034-.019L.196.237.21.393z"/></symbol><symbol id="c"><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="#a" transform="matrix(9.9626 0 0 -9.9626 128.854 101.022)" fill="#00f"/><use xlink:href="#b" transform="matrix(9.9626 0 0 -9.9626 131.085 98.192)" fill="#00f"/><use xlink:href="#c" transform="matrix(9.9626 0 0 -9.9626 135.967 101.022)" fill="#00f"/><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#000" d="M13.255 129.281h112.68"/><path stroke-width=".638" stroke-linecap="round" stroke-linejoin="round" fill="none" stroke="#000" d="M124.38 127.209c.13.777 1.555 1.942 1.943 2.072-.388.13-1.813 1.295-1.942 2.072"/><symbol id="d"><path d="M.188.68a.079.079 0 0 1 .003.013c0 .009-.006.012-.014.012A.088.088 0 0 1 .161.703L.062.695C.05.694.039.693.039.674c0-.011.01-.011.024-.011.048 0 .05-.007.05-.017L.11.629.011.234A.366.366 0 0 1 0 .152C0 .068.042 0 .115 0c.112 0 .229.15.229.297 0 .107-.06.156-.12.156C.186.453.152.432.118.4l.07.28M.115.022C.09.022.057.043.057.118c0 .044.009.079.038.193.007.024.007.026.022.046.029.04.067.074.105.074.045 0 .055-.057.055-.089A.783.783 0 0 0 .221.117C.209.092.166.022.115.022z"/></symbol><symbol id="e"><path d="M.241.07A.084.084 0 0 1 .324 0c.037 0 .058.025.073.056.018.038.03.096.03.098 0 .01-.008.01-.015.01C.4.164.399.163.393.141.379.085.36.022.326.022.3.022.3.049.3.063.3.07.3.086.307.114l.068.272C.379.4.379.402.379.407c0 .021-.017.026-.027.026C.32.433.313.399.312.394.293.437.261.453.229.453.118.453 0 .301 0 .155 0 .07.046 0 .121 0c.036 0 .08.021.12.07m.054.254L.248.135C.24.103.178.022.123.022.076.022.068.081.068.111c0 .05.031.167.049.209.025.061.071.111.112.111.044 0 .069-.052.069-.094A.053.053 0 0 0 .295.324z"/></symbol><symbol id="f"><path d="M.449.68a.079.079 0 0 1 .003.013c0 .009-.006.012-.014.012A.088.088 0 0 1 .422.703L.323.695C.311.694.3.693.3.674.3.663.31.663.324.663c.048 0 .05-.007.05-.017L.371.629.313.395C.298.426.271.453.229.453.118.453 0 .301 0 .155 0 .07.046 0 .121 0c.036 0 .08.021.12.07A.084.084 0 0 1 .324 0c.037 0 .058.025.073.056.018.038.03.096.03.098 0 .01-.008.01-.015.01C.4.164.399.163.393.141.379.085.36.022.326.022.3.022.3.049.3.063.3.07.3.085.306.109L.449.68M.247.133C.239.102.178.022.123.022.076.022.068.081.068.111c0 .05.031.167.049.209.025.061.071.111.112.111C.237.431.26.43.278.402a.146.146 0 0 0 .02-.064.045.045 0 0 0-.003-.013L.247.133z"/></symbol><use xlink:href="#d" transform="matrix(9.9626 0 0 -9.9626 131.506 140.028)"/><use xlink:href="#e" transform="matrix(9.9626 0 0 -9.9626 135.51 140.028)"/><use xlink:href="#f" transform="matrix(9.9626 0 0 -9.9626 140.602 140.028)"/><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#000" d="M13.255 129.281V16.601"/><path stroke-width=".638" stroke-linecap="round" stroke-linejoin="round" fill="none" stroke="#000" d="M11.183 18.155c.777-.13 1.943-1.554 2.072-1.942.13.388 1.295 1.813 2.072 1.942"/><symbol id="g"><path d="M.285.258.264.174A.211.211 0 0 0 .218.069C.178.022.138.022.123.022c-.013 0-.044 0-.071.011.02.008.032.029.032.046 0 .013-.009.032-.035.032A.05.05 0 0 1 0 .058C0 .018.037 0 .121 0c.105 0 .181.066.2.142L.43.58c.004.015.004.017.004.021 0 .021-.017.026-.027.026A.04.04 0 0 1 .368.59C.354.619.327.647.284.647.172.647.057.499.057.358c0-.085.047-.153.122-.153.051 0 .094.041.106.053M.35.519.305.337C.297.305.236.227.181.227.127.227.125.303.125.314c0 .048.03.165.051.212.025.054.069.099.108.099.06 0 .069-.084.069-.092L.35.519z"/></symbol><symbol id="h"><path d="M.399.289C.399.384.34.453.253.453.129.453 0 .311 0 .165 0 .062.063 0 .146 0 .27 0 .399.142.399.289M.146.022C.107.022.07.053.07.125c0 .05.026.161.058.215.037.061.085.091.124.091.049 0 .077-.044.077-.103A.568.568 0 0 0 .275.122C.246.067.195.022.146.022z"/></symbol><use xlink:href="#g" transform="matrix(9.9626 0 0 -9.9626 3.848 12.281)"/><use xlink:href="#h" transform="matrix(9.9626 0 0 -9.9626 8.999 10.349)"/><use xlink:href="#h" transform="matrix(9.9626 0 0 -9.9626 13.581 10.349)"/><use xlink:href="#f" transform="matrix(9.9626 0 0 -9.9626 18.144 10.349)"/><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="red" d="m13.255 129.281 110.005 24.387"/><path stroke-width=".6379617200000001" stroke-linecap="round" stroke-linejoin="round" fill="none" stroke="red" d="M122.19 151.309c-.041.787 1.098 2.233 1.449 2.443-.408.043-2.05.872-2.345 1.603"/><symbol id="i"><path d="M.572.591C.621.669.663.672.7.674c.012.001.013.018.013.019C.713.701.708.705.7.705L.618.702.519.705C.513.705.5.705.5.686.5.675.509.674.516.674.543.672.562.662.562.641.562.626.547.604.547.603L.24.115.172.644c0 .017.023.03.069.03.014 0 .025 0 .025.02 0 .009-.008.011-.014.011L.128.702.073.703.019.705C.012.705 0 .705 0 .686 0 .674.009.674.025.674.081.674.082.665.085.64L.164.023C.167.003.171 0 .184 0 .2 0 .204.005.212.018l.36.573z"/></symbol><use xlink:href="#i" transform="matrix(9.9626 0 0 -9.9626 112.377 165.231)" fill="red"/><symbol id="j"><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="#j" transform="matrix(6.9738 0 0 -6.9738 118.14 167.929)" fill="red"/><use xlink:href="#a" transform="matrix(9.9626 0 0 -9.9626 125.642 167.503)" fill="red"/><use xlink:href="#b" transform="matrix(9.9626 0 0 -9.9626 127.873 164.673)" fill="red"/><use xlink:href="#c" transform="matrix(9.9626 0 0 -9.9626 132.755 167.503)" fill="red"/><path stroke-width=".399" stroke-miterlimit="10" fill="none" stroke="#000" d="M69.949 129.281c0-4.126-.454-8.243-1.346-12.27"/><symbol id="k"><path d="M.413.511c0 .066-.018.205-.12.205C.154.716 0 .434 0 .205 0 .111.029 0 .12 0c.141 0 .293.287.293.511M.106.374c.017.064.037.144.077.215.027.049.064.105.109.105C.341.694.347.63.347.573c0-.049-.008-.1-.032-.199H.106m.2-.032a.893.893 0 0 0-.07-.203C.201.071.163.022.12.022.087.022.066.051.066.144c0 .042.006.1.032.198h.208z"/></symbol><use xlink:href="#k" transform="matrix(9.9626 0 0 -9.9626 73.886 125.87)"/><path stroke-width=".399" stroke-miterlimit="10" fill="none" stroke="#000" d="M58.61 129.281c0 3.3-.363 6.595-1.078 9.816"/><use xlink:href="#k" transform="matrix(9.9626 0 0 -9.9626 62.547 139.829)"/></svg> \ No newline at end of file diff --git a/grover_plt3.pdf b/grover_plt3.pdf new file mode 100644 index 0000000000000000000000000000000000000000..33ac47c2977d9a5f75f98df22505c3abe5f45639 Binary files /dev/null and b/grover_plt3.pdf differ diff --git a/grover_plt3.svg b/grover_plt3.svg new file mode 100644 index 0000000000000000000000000000000000000000..f575fd33249fd994db60d7e624303624df88281d --- /dev/null +++ b/grover_plt3.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="218.472" height="228.244" viewBox="0 0 163.854 171.183"><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#00f" d="m13.255 129.281 110.005-24.387"/><path stroke-width=".6379617200000001" stroke-linecap="round" stroke-linejoin="round" fill="none" stroke="#00f" d="M121.294 103.207c.294.73 1.937 1.56 2.345 1.603-.351.21-1.49 1.656-1.448 2.443"/><symbol id="a"><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><symbol id="b"><path d="M.21.393C.211.407.211.431.185.431.169.431.156.418.159.405V.392L.173.237.045.33C.036.335.034.337.027.337.013.337 0 .323 0 .309 0 .293.01.289.02.284L.162.216.024.149C.008.141 0 .137 0 .122S.013.094.027.094c.007 0 .009 0 .034.019l.112.081L.158.026C.158.005.176 0 .184 0c.012 0 .027.007.027.026L.196.194.324.101C.333.096.335.094.342.094c.014 0 .027.014.027.028 0 .015-.009.02-.021.026-.06.03-.062.03-.141.067l.138.067C.361.29.369.294.369.309S.356.337.342.337c-.007 0-.009 0-.034-.019L.196.237.21.393z"/></symbol><symbol id="c"><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="#a" transform="matrix(9.9626 0 0 -9.9626 128.854 101.022)" fill="#00f"/><use xlink:href="#b" transform="matrix(9.9626 0 0 -9.9626 131.085 98.192)" fill="#00f"/><use xlink:href="#c" transform="matrix(9.9626 0 0 -9.9626 135.967 101.022)" fill="#00f"/><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#000" d="M13.255 129.281h112.68"/><path stroke-width=".638" stroke-linecap="round" stroke-linejoin="round" fill="none" stroke="#000" d="M124.38 127.209c.13.777 1.555 1.942 1.943 2.072-.388.13-1.813 1.295-1.942 2.072"/><symbol id="d"><path d="M.188.68a.079.079 0 0 1 .003.013c0 .009-.006.012-.014.012A.088.088 0 0 1 .161.703L.062.695C.05.694.039.693.039.674c0-.011.01-.011.024-.011.048 0 .05-.007.05-.017L.11.629.011.234A.366.366 0 0 1 0 .152C0 .068.042 0 .115 0c.112 0 .229.15.229.297 0 .107-.06.156-.12.156C.186.453.152.432.118.4l.07.28M.115.022C.09.022.057.043.057.118c0 .044.009.079.038.193.007.024.007.026.022.046.029.04.067.074.105.074.045 0 .055-.057.055-.089A.783.783 0 0 0 .221.117C.209.092.166.022.115.022z"/></symbol><symbol id="e"><path d="M.241.07A.084.084 0 0 1 .324 0c.037 0 .058.025.073.056.018.038.03.096.03.098 0 .01-.008.01-.015.01C.4.164.399.163.393.141.379.085.36.022.326.022.3.022.3.049.3.063.3.07.3.086.307.114l.068.272C.379.4.379.402.379.407c0 .021-.017.026-.027.026C.32.433.313.399.312.394.293.437.261.453.229.453.118.453 0 .301 0 .155 0 .07.046 0 .121 0c.036 0 .08.021.12.07m.054.254L.248.135C.24.103.178.022.123.022.076.022.068.081.068.111c0 .05.031.167.049.209.025.061.071.111.112.111.044 0 .069-.052.069-.094A.053.053 0 0 0 .295.324z"/></symbol><symbol id="f"><path d="M.449.68a.079.079 0 0 1 .003.013c0 .009-.006.012-.014.012A.088.088 0 0 1 .422.703L.323.695C.311.694.3.693.3.674.3.663.31.663.324.663c.048 0 .05-.007.05-.017L.371.629.313.395C.298.426.271.453.229.453.118.453 0 .301 0 .155 0 .07.046 0 .121 0c.036 0 .08.021.12.07A.084.084 0 0 1 .324 0c.037 0 .058.025.073.056.018.038.03.096.03.098 0 .01-.008.01-.015.01C.4.164.399.163.393.141.379.085.36.022.326.022.3.022.3.049.3.063.3.07.3.085.306.109L.449.68M.247.133C.239.102.178.022.123.022.076.022.068.081.068.111c0 .05.031.167.049.209.025.061.071.111.112.111C.237.431.26.43.278.402a.146.146 0 0 0 .02-.064.045.045 0 0 0-.003-.013L.247.133z"/></symbol><use xlink:href="#d" transform="matrix(9.9626 0 0 -9.9626 131.506 140.028)"/><use xlink:href="#e" transform="matrix(9.9626 0 0 -9.9626 135.51 140.028)"/><use xlink:href="#f" transform="matrix(9.9626 0 0 -9.9626 140.602 140.028)"/><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#000" d="M13.255 129.281V16.601"/><path stroke-width=".638" stroke-linecap="round" stroke-linejoin="round" fill="none" stroke="#000" d="M11.183 18.155c.777-.13 1.943-1.554 2.072-1.942.13.388 1.295 1.813 2.072 1.942"/><symbol id="g"><path d="M.285.258.264.174A.211.211 0 0 0 .218.069C.178.022.138.022.123.022c-.013 0-.044 0-.071.011.02.008.032.029.032.046 0 .013-.009.032-.035.032A.05.05 0 0 1 0 .058C0 .018.037 0 .121 0c.105 0 .181.066.2.142L.43.58c.004.015.004.017.004.021 0 .021-.017.026-.027.026A.04.04 0 0 1 .368.59C.354.619.327.647.284.647.172.647.057.499.057.358c0-.085.047-.153.122-.153.051 0 .094.041.106.053M.35.519.305.337C.297.305.236.227.181.227.127.227.125.303.125.314c0 .048.03.165.051.212.025.054.069.099.108.099.06 0 .069-.084.069-.092L.35.519z"/></symbol><symbol id="h"><path d="M.399.289C.399.384.34.453.253.453.129.453 0 .311 0 .165 0 .062.063 0 .146 0 .27 0 .399.142.399.289M.146.022C.107.022.07.053.07.125c0 .05.026.161.058.215.037.061.085.091.124.091.049 0 .077-.044.077-.103A.568.568 0 0 0 .275.122C.246.067.195.022.146.022z"/></symbol><use xlink:href="#g" transform="matrix(9.9626 0 0 -9.9626 3.848 12.281)"/><use xlink:href="#h" transform="matrix(9.9626 0 0 -9.9626 8.999 10.349)"/><use xlink:href="#h" transform="matrix(9.9626 0 0 -9.9626 13.581 10.349)"/><use xlink:href="#f" transform="matrix(9.9626 0 0 -9.9626 18.144 10.349)"/><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="red" d="m13.255 129.281 110.005 24.387"/><path stroke-width=".6379617200000001" stroke-linecap="round" stroke-linejoin="round" fill="none" stroke="red" d="M122.19 151.309c-.041.787 1.098 2.233 1.449 2.443-.408.043-2.05.872-2.345 1.603"/><symbol id="i"><path d="M.572.591C.621.669.663.672.7.674c.012.001.013.018.013.019C.713.701.708.705.7.705L.618.702.519.705C.513.705.5.705.5.686.5.675.509.674.516.674.543.672.562.662.562.641.562.626.547.604.547.603L.24.115.172.644c0 .017.023.03.069.03.014 0 .025 0 .025.02 0 .009-.008.011-.014.011L.128.702.073.703.019.705C.012.705 0 .705 0 .686 0 .674.009.674.025.674.081.674.082.665.085.64L.164.023C.167.003.171 0 .184 0 .2 0 .204.005.212.018l.36.573z"/></symbol><use xlink:href="#i" transform="matrix(9.9626 0 0 -9.9626 112.377 165.231)" fill="red"/><symbol id="j"><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="#j" transform="matrix(6.9738 0 0 -6.9738 118.14 167.929)" fill="red"/><use xlink:href="#a" transform="matrix(9.9626 0 0 -9.9626 125.642 167.503)" fill="red"/><use xlink:href="#b" transform="matrix(9.9626 0 0 -9.9626 127.873 164.673)" fill="red"/><use xlink:href="#c" transform="matrix(9.9626 0 0 -9.9626 132.755 167.503)" fill="red"/><path stroke-width=".797" stroke-miterlimit="10" fill="none" stroke="#0f0" d="m13.255 129.281 89.391-68.592"/><path stroke-width=".6379681" stroke-linecap="round" stroke-linejoin="round" fill="none" stroke="#0f0" d="M100.152 59.991c.576.538 2.415.595 2.802.461-.229.34-.65 2.132-.28 2.827"/><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.549.258H.524C.513.156.499.031.323.031H.241c-.047 0-.049.007-.049.04v.533c0 .034 0 .048.095.048H.32v.031C.284.68.193.68.152.68.113.68.035.68 0 .683V.652h.024C.101.652.103.641.103.605V.078C.103.042.101.031.024.031H0V0h.521l.028.258z"/></symbol><symbol id="m"><path d="M.197.605c0 .036.003.047.082.047h.026v.031C.27.68.191.68.153.68.114.68.035.68 0 .683V.652h.026C.105.652.108.641.108.605V.078C.108.042.105.031.026.031H0V0c.035.003.114.003.152.003C.191.003.27.003.305 0v.031H.279C.2.031.197.042.197.078v.527z"/></symbol><symbol id="n"><path d="M.192.316h.169c.12 0 .228.081.228.181C.589.595.49.683.353.683H0V.652h.024C.101.652.103.641.103.605V.078C.103.042.101.031.024.031H0V0c.035.003.109.003.147.003C.185.003.26.003.295 0v.031H.271C.194.031.192.042.192.078v.238M.189.342v.27c0 .033.002.04.049.04h.089C.486.652.486.546.486.497c0-.047 0-.155-.159-.155H.189z"/></symbol><use xlink:href="#k" transform="matrix(9.9626 0 0 -9.9626 107.254 53.69)" fill="#0f0"/><use xlink:href="#l" transform="matrix(9.9626 0 0 -9.9626 113.76 53.69)" fill="#0f0"/><use xlink:href="#m" transform="matrix(9.9626 0 0 -9.9626 119.936 53.69)" fill="#0f0"/><use xlink:href="#n" transform="matrix(9.9626 0 0 -9.9626 123.602 53.69)" fill="#0f0"/><symbol id="o"><path d="M.234.215c.082.036.119.05.144.062.019.008.028.012.028.031A.031.031 0 0 1 .375.34C.368.34.366.34.354.331L.218.24l.015.148c.002.018 0 .043-.03.043C.191.431.172.423.172.401L.177.352.188.24.053.331C.043.337.04.34.031.34A.031.031 0 0 1 0 .308C0 .288.012.283.021.279L.172.216C.09.18.053.166.028.154.009.146 0 .142 0 .123 0 .106.013.091.031.091.038.091.04.091.052.1l.136.091L.172.03C.172.008.191 0 .203 0s.031.008.031.03L.229.079a7.187 7.187 0 0 0-.011.112l.12-.08c.026-.02.028-.02.037-.02.018 0 .031.015.031.032 0 .02-.012.025-.021.029L.234.215z"/></symbol><use xlink:href="#o" transform="matrix(6.9738 0 0 -6.9738 130.654 54.947)" fill="#0f0"/><use xlink:href="#i" transform="matrix(9.9626 0 0 -9.9626 136.832 53.91)" fill="#0f0"/><use xlink:href="#j" transform="matrix(6.9738 0 0 -6.9738 142.594 56.607)" fill="#0f0"/><use xlink:href="#a" transform="matrix(9.9626 0 0 -9.9626 150.096 56.18)" fill="#0f0"/><use xlink:href="#b" transform="matrix(9.9626 0 0 -9.9626 152.327 53.351)" fill="#0f0"/><use xlink:href="#c" transform="matrix(9.9626 0 0 -9.9626 157.209 56.18)" fill="#0f0"/><path stroke-width=".399" stroke-miterlimit="10" fill="none" stroke="#000" d="M69.949 129.281c0-4.126-.454-8.243-1.346-12.27"/><symbol id="p"><path d="M.413.511c0 .066-.018.205-.12.205C.154.716 0 .434 0 .205 0 .111.029 0 .12 0c.141 0 .293.287.293.511M.106.374c.017.064.037.144.077.215.027.049.064.105.109.105C.341.694.347.63.347.573c0-.049-.008-.1-.032-.199H.106m.2-.032a.893.893 0 0 0-.07-.203C.201.071.163.022.12.022.087.022.066.051.066.144c0 .042.006.1.032.198h.208z"/></symbol><use xlink:href="#p" transform="matrix(9.9626 0 0 -9.9626 73.886 125.87)"/><path stroke-width=".399" stroke-miterlimit="10" fill="none" stroke="#000" d="M58.61 129.281c0 3.3-.363 6.595-1.078 9.816"/><use xlink:href="#p" transform="matrix(9.9626 0 0 -9.9626 62.547 139.829)"/><path stroke-width=".399" stroke-miterlimit="10" fill="none" stroke="#000" d="M81.288 113.974a68.053 68.053 0 0 0-12.446-26.69"/><symbol id="q"><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="#q" transform="matrix(9.9626 0 0 -9.9626 72.86 97.724)"/><use xlink:href="#p" transform="matrix(9.9626 0 0 -9.9626 77.76 97.834)"/></svg> \ No newline at end of file diff --git a/groversAlgorithm.qmd b/groversAlgorithm.qmd index 5e87f9ab680a13ba967628bfbcf419fd15426efa..9f4c9599109879b049cee740821b4134a1b765d1 100644 --- a/groversAlgorithm.qmd +++ b/groversAlgorithm.qmd @@ -38,9 +38,79 @@ $$ \operatorname{FLIP}_0 \ket{x} = \begin{cases} \ket{0} & \text{if } x = 0\\ -\ket{x} & \text{else} \end{cases} $$ +## The algorithm for searching + +The actual algorithm takes a function $f: \{0,1\}^n \rightarrow \{0,1\}$ and outputs an $x_0$ with $f(x_0)=1$. For simplicity, we assume, that there is only one $x_0$ for which $f(x_0) = 1$ holds and for each other $x \neq x_0$ it holds that $f(x)=0$. + +With the two new unitaries $V_f$ and $\operatorname{FLIP}_*$ defined, we can construct the circuit for G rover's algorithm, which is shown in the following figure: + +{width=100%} + +The algorithm works as follows: + +1. We start with a $\ket{0}$ entry on every qubit. +2. We bring the system into the superposition over all entries by applying $H^{\otimes n}$. The quantum state is then $2^\frac{-n}{2}\sum_x \ket{x}$ which we also call $\ket{*}$. +3. We apply the unitary $V_f$. +4. We apply the unitary $\operatorname{FLIP}_*$. +5. We repeat steps 3 and 4 $t$ times, and then do a measurement. + +The measurement in step 5 will then give us $x_0$ with high probability. + +### Understanding the algorithm for searching + +When looking at the quantum circuit, it is not completely intuitive why the algorithm gives the correct result. We therefore now look into what is happening in each step. + +The desired quantum state after the algorithm finishes is $\ket{x_0}$. At the beginning of the algorithm, we bring the system into the uniform superposition $\ket{*} = 2^\frac{-n}{2}\sum_x \ket{x}$. We know that $\ket{x_0}$ is part of this superposition, therefore we can rewrite $\ket{*}$ as follows +$$ +\ket{*} = 2^{-\frac{n}{2}}\sum_x \ket{x} += \frac{1}{\sqrt{2^n}} \underbrace{\ket{x_0}}_{\textit{good}} + \sqrt{\frac{2^n-1}{2^n}} \underbrace{\sum_{x\neq x_0} \frac{1}{\sqrt{2^n-1}}\ket{x}}_{\textit{bad}} +$$ + + +So the current state can be seen as a superposition of a "good" state *good* and a "bad" state *bad*. + +The geometric interpretation of this superposition can be drawn as follows: + +{width=50%} + + +The angel $\theta$ denotes, how "good" the resulting outcome will be. If $\theta = 0$, the state is completely bad, if $\theta = \frac{\pi}{2}$, the state is completely good. + + +We can calculate $\cos \theta = \lvert\braket{*|bad}\rvert = \frac{\sqrt{2^n-1}}{\sqrt{2^n}}$. From this we can derivate, that the angle $\theta$ is $\cos^{-1} \sqrt{\frac{2^n-1}{2^n}}$ at the beginning, which is approximately $\sqrt{\frac{1}{2^n}}$. + +We now apply $V_f$ on this quantum state. This will negate the amplitude off our desired $\ket{x_0}$ and not change the amplitude to the rest of the state. + +$$ +V_f\ket{*}= -\frac{1}{\sqrt{2^n}} \underbrace{\ket{x_0}}_{\text{good}} + \sqrt{\frac{2^n}{2^n-1}} \underbrace{\sum_{x\neq x_0} \ket{x}}_{\text{bad}} +$$ + +This looks like this in the geometric interpretation: + +{width=50%} + +We can see, that by applying $V_f$, we mirror the vector across the *bad* axis. + +After $V_f$, we apply the $\operatorname{FLIP}_*$ operation on the quantum state. Since $\operatorname{FLIP}_*$ does nothing on the $\ket{*}$ entries and negates the amplitude of any vector orthogonal to it, $\operatorname{FLIP}_*$ mirrors the vector across $\ket{*}$. This can be seen in the following figure: + +{width=50%} + + +All in all, we have seen that by applying $V_f$ and $\operatorname{FLIP}_*$, we can increase the angle of the quantum state in relation to the "good" and "bad" states by $2\theta$. Therefore two reflection give rotation. By repeating this step often enough, we can get the amplitude of $\ket{x_0}$ close to 1. + +To be more precise: Since we know $\theta$ and we know that we will increase the *good*-ness of our quantum state by $2\theta$ each time, we can calculate that only $t$ iterations are necessary with +$$ +t \approx \frac{\frac{\pi / 2}{\theta} - 1}{2} = \frac{\pi}{4 \theta} \approx \frac{\pi}{4} \cdot \sqrt{2^n} +$$ + Grover's algorithm therefore takes $O(\sqrt{2^n})$ steps, where an evaluation of $t$ counts as one step. + + + + + + -The rest of this section will be updated later on. diff --git a/index.qmd b/index.qmd index a5eabce904d6d851361dfc1c0434a5708259fbe6..4742635364e01bed694d0255894c18cc0f0474b1 100644 --- a/index.qmd +++ b/index.qmd @@ -12,6 +12,12 @@ These lecture notes are released under the CC BY-NC 4.0 license, which can be fo ## Changelog {.unnumbered} + + +#### Version 0.1.5 (27.06.2024) +- finished chapter 10 +- stated chapter 11 + #### Version 0.1.4 (18.06.2024) - finished chapter 9 - stated chapter 10 diff --git a/physicalBackground.qmd b/physicalBackground.qmd new file mode 100644 index 0000000000000000000000000000000000000000..b9fe524910bd3274d53ece2dc2059ef7e61eb267 --- /dev/null +++ b/physicalBackground.qmd @@ -0,0 +1 @@ +# Physical Background diff --git a/physics.qmd b/physics.qmd new file mode 100644 index 0000000000000000000000000000000000000000..ffba31498fcdfa8e5466e150f6c24e1204edb14f --- /dev/null +++ b/physics.qmd @@ -0,0 +1,94 @@ +# Quantum Physics + +To further understand, how quantum computers work, we take a look at the basics of quantum physics. + +## Wave function + +The first concept we look into is the wave function of quantum mechanics. For this we will look at the experiment "particle in a well". To keep the math simple, we assume the space to be 1-dimensional, so the particle is confined to a line. + +In this experiment, we have one particle and a potential, which is denoted by a function $V: \mathbb{R} \rightarrow \mathbb{R}$. This function maps a position of a particle in $\mathbb{R}$ to the energy which is needed to hold the particle in that position. + +Classically a state of a system at time $t$ is described by the position $x(t) \in \mathbb{R}$ and the momentum $p(t) \in \mathbb{R}$. + +In the quantum world, we have a wave function $\psi_t(x)$ with $\psi_t: \mathbb{R} \rightarrow \mathbb{C}$ under $t\in\mathbb{R}$, which takes the position of a particle as an input and outputs the amplitude of that particle, with $t$ as the time. + +To calculate the probability of a particle being in the interval $[a,b]$ at time $t_0$, we can use the integral over the wave function: +$$ +\Pr[\text{Particle is in }[a,b]\text{ a time }t_0] = \int_a^b \lvert \psi_{t_0}(x) \rvert^2 dx +$$ + +From this we can see, that the integral $\int \lvert \psi_{t_0} \rvert ^2 dx = 1$. The momentum is not needed for the wave function. + +In general, the wave function can have a different domain, e.g. $\psi_t: \mathbb{R}^3 \rightarrow \mathbb{C}$ for a particle in 3D-space. Everything below works analogously in that case. + +## Energy / Hamiltonian + +Given a particle in a state, this particle has some energy. Classically this energy is calculated from the potential and the momentum, with +$$ +\operatorname{Energy} := \underbrace{V(x)}_{\text{{potential energy}}} \cdot \underbrace{\frac{p^2}{2m}}_{\text{kinetic energy}} +$$ + +In the quantum world, we can calculate the potential energy using the wave function as follows: +$$ +\text{potential energy} := \int \underbrace{\lvert \psi(x) \rvert^2}_{\text{probability at pos. }x} \cdot V(x) dx +$$ +The kinetic energy can be calculated as follows: +$$ +\text{kinetic energy}:= \int \overline{\psi(x)} \cdot \frac{\hbar}{2m} \cdot \frac{\partial^2 \psi(x)}{\partial x^2} dx +$$ +$\hbar$ is the reduced Planck constant. We will not go further into reasoning for this definition. + +From this we can calculate the energy in the quantum context: +$$ +\begin{aligned} +\text{energy} :=& \int \overline{\psi(x)} \left(\frac{\hbar}{2m} \frac{\partial^2 \psi(x)}{\partial x^2} + V(x)\psi(x)\right) dx\\ +=&\int \overline{\psi(x)} (H\psi)(x) dx\\ +=& \braket{\psi,H\psi} +\end{aligned} +$$ + +Note that the inner product of two functions $\mathbb{R} \rightarrow \mathbb{C}$ is defined by +$$ +\braket{\psi,\varphi} := \int \overline{\psi(x)} \cdot \varphi(x) dx +$$ + +The operator $H$ is called a Hamiltonian and is an operator that maps wave functions to wave functions, such that $\braket{\psi,H\psi}$ is the energy. $H$ is denoted by: +$$ +(H\psi)(x) = \frac{\hbar}{2m} \frac{\partial^2 \psi(x)}{\partial x^2} + V(x)\psi(x) +$$ + +## Schrödinger equation + +### Time-dependent Schrödinger equation +The time-dependent Schrödinger equation is denoted by: + +$$ +i\hbar \frac{\partial \psi_t(x)}{\partial t} = (H\psi_t)(x) +$$ + +From this we see that the time development of $\psi_t$ is determined by $\psi_t$ at that moment (via $H\psi_t$). + +### Time-independent Schrödinger equation + +For the time-independent Schrödinger equation, we try to find a wave function $\psi: \mathbb{R} \rightarrow \mathbb{C}$ and an energy $E$ such that +$$ +H\psi = E\psi +$$ +This means roughly, that we try to find $\psi$, that has the same energy everywhere. That is, that we try to find a $\psi$ with energy $E$ (since the energy is $\braket{\psi|H\psi}=\braket{\psi|E\psi}=E\braket{\psi|\psi}=1$) and not a superposition of different energies. + +Such a $\psi$ is useful, since by the time-dependent Schrödinger equation, if $H\psi = E \psi$, then +$$ +i\hbar \frac{\partial\psi_t(x)}{\partial t} = H\psi = E\psi_{t_0}(x) +$$ + +Solving this differential equation gives us $\psi$ with +$$ +\psi_t(x) = e^{-i E t/\hbar} \psi_{t_0}(x) +$$ + +So all in all: If $\psi_0$ is a solution of the time-independent Schrödinger equation, then $\psi(x,t)= e ^{-i E t / \hbar} \psi_0(x)$ is the solution to the time-dependent Schrödinger equation with initial condition $\psi_0$ (at time $t=0$). + +Given any $\psi_0$, we can try to rewrite $\psi_0$ as $\psi_0 = \sum_k a_k \psi^k$, where $\psi^i, E_i$ are solutions of the time-independent Schrödinger equation and then the solution of the time-dependent Schrödinger equation is +$$ +\psi_t(x) = \sum_k a_k e^{-i E t /\hbar} \psi^k(x) +$$