Skip to content

Commit f563589

Browse files
Docs preview for PR #4271.
1 parent 6514221 commit f563589

20 files changed

Lines changed: 51 additions & 51 deletions

pr-4271/applications/python/adapt_qaoa.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,7 @@ <h1>ADAPT-QAOA algorithm<a class="headerlink" href="#ADAPT-QAOA-algorithm" title
11751175
parameter</p>
11761176
<p>3- Optimize all parameters currently in the Ansatz <span class="math notranslate nohighlight">\(\beta_m, \gamma_m = 1, 2, ...k\)</span> such that <span class="math notranslate nohighlight">\(\braket{\psi (k)|H_C|\psi(k)}\)</span> is minimized, and return to the second step.</p>
11771177
<p>Below is a schematic representation of the ADAPT-QAOA algorithm explained above.</p>
1178-
<div><p><img alt="ac96507499284e5bb174610da35e2e4a" class="no-scaled-link" src="../../_images/adapt-qaoa.png" style="width: 1000px;" /></p>
1178+
<div><p><img alt="8b228e6d38324e82b35cb569e8ffeb4e" class="no-scaled-link" src="../../_images/adapt-qaoa.png" style="width: 1000px;" /></p>
11791179
</div><div class="nbinput nblast docutils container">
11801180
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[15]:
11811181
</pre></div>

pr-4271/applications/python/adapt_qaoa.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2107,7 +2107,7 @@ explained above.
21072107

21082108
<div>
21092109

2110-
![ac96507499284e5bb174610da35e2e4a](../../_images/adapt-qaoa.png){.no-scaled-link
2110+
![8b228e6d38324e82b35cb569e8ffeb4e](../../_images/adapt-qaoa.png){.no-scaled-link
21112111
style="width: 1000px;"}
21122112

21132113
</div>

pr-4271/applications/python/adapt_vqe.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1172,7 +1172,7 @@ <h1>ADAPT-VQE algorithm<a class="headerlink" href="#ADAPT-VQE-algorithm" title="
11721172
<p>7- Perform a VQE experiment to re-optimize all parameters in the ansatz.</p>
11731173
<p>8- go to step 4</p>
11741174
<p>Below is a Schematic depiction of the ADAPT-VQE algorithm</p>
1175-
<div><p><img alt="5a5b5040a6da4306857a297450c0b57d" class="no-scaled-link" src="../../_images/adapt-vqe.png" style="width: 800px;" /></p>
1175+
<div><p><img alt="98e6cd3961cc4814923d0b0af042e663" class="no-scaled-link" src="../../_images/adapt-vqe.png" style="width: 800px;" /></p>
11761176
</div><div class="nbinput docutils container">
11771177
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[1]:
11781178
</pre></div>

pr-4271/applications/python/adapt_vqe.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2075,7 +2075,7 @@ Below is a Schematic depiction of the ADAPT-VQE algorithm
20752075

20762076
<div>
20772077

2078-
![5a5b5040a6da4306857a297450c0b57d](../../_images/adapt-vqe.png){.no-scaled-link
2078+
![98e6cd3961cc4814923d0b0af042e663](../../_images/adapt-vqe.png){.no-scaled-link
20792079
style="width: 800px;"}
20802080

20812081
</div>

pr-4271/applications/python/deutsch_algorithm.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,7 +1232,7 @@ <h2>XOR <span class="math notranslate nohighlight">\(\oplus\)</span><a class="he
12321232
</section>
12331233
<section id="Quantum-oracles">
12341234
<h2>Quantum oracles<a class="headerlink" href="#Quantum-oracles" title="Permalink to this heading"></a></h2>
1235-
<p><img alt="e05dd6f7f7d44af39c5390f2a0370957" class="no-scaled-link" src="../../_images/oracle.png" style="width: 300px; height: 150px;" /></p>
1235+
<p><img alt="6fdef71f34b4410c875fc508533e9ad8" class="no-scaled-link" src="../../_images/oracle.png" style="width: 300px; height: 150px;" /></p>
12361236
<p>Suppose we have <span class="math notranslate nohighlight">\(f(x): \{0,1\} \longrightarrow \{0,1\}\)</span>. We can compute this function on a quantum computer using oracles which we treat as black box functions that yield the output with an appropriate sequence of logical gates.</p>
12371237
<p>Above you see an oracle represented as <span class="math notranslate nohighlight">\(U_f\)</span> which allows us to transform the state <span class="math notranslate nohighlight">\(\ket{x}\ket{y}\)</span> into:</p>
12381238
<div class="math notranslate nohighlight">
@@ -1280,7 +1280,7 @@ <h2>Quantum parallelism<a class="headerlink" href="#Quantum-parallelism" title="
12801280
<h2>Deutsch’s Algorithm:<a class="headerlink" href="#Deutsch's-Algorithm:" title="Permalink to this heading"></a></h2>
12811281
<p>Our aim is to find out if <span class="math notranslate nohighlight">\(f: \{0,1\} \longrightarrow \{0,1\}\)</span> is a constant or a balanced function? If constant, <span class="math notranslate nohighlight">\(f(0) = f(1)\)</span>, and if balanced, <span class="math notranslate nohighlight">\(f(0) \neq f(1)\)</span>.</p>
12821282
<p>We step through the circuit diagram below and follow the math after the application of each gate.</p>
1283-
<p><img alt="916ebb45f3f941a3b9bb03b5914ac8f4" class="no-scaled-link" src="../../_images/deutsch.png" style="width: 500px; height: 210px;" /></p>
1283+
<p><img alt="eb52d30ddebc430daed8549a75f644cc" class="no-scaled-link" src="../../_images/deutsch.png" style="width: 500px; height: 210px;" /></p>
12841284
<div class="math notranslate nohighlight">
12851285
\[\ket{\psi_0} = \ket{01}
12861286
\tag{1}\]</div>

pr-4271/applications/python/deutsch_algorithm.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2156,7 +2156,7 @@ number, the result is 0 otherwise 1.
21562156
::: {#Quantum-oracles .section}
21572157
## Quantum oracles[](#Quantum-oracles "Permalink to this heading"){.headerlink}
21582158

2159-
![e05dd6f7f7d44af39c5390f2a0370957](../../_images/oracle.png){.no-scaled-link
2159+
![6fdef71f34b4410c875fc508533e9ad8](../../_images/oracle.png){.no-scaled-link
21602160
style="width: 300px; height: 150px;"}
21612161

21622162
Suppose we have [\\(f(x): \\{0,1\\} \\longrightarrow \\{0,1\\}\\)]{.math
@@ -2262,7 +2262,7 @@ balanced function? If constant, [\\(f(0) = f(1)\\)]{.math .notranslate
22622262
We step through the circuit diagram below and follow the math after the
22632263
application of each gate.
22642264

2265-
![916ebb45f3f941a3b9bb03b5914ac8f4](../../_images/deutsch.png){.no-scaled-link
2265+
![eb52d30ddebc430daed8549a75f644cc](../../_images/deutsch.png){.no-scaled-link
22662266
style="width: 500px; height: 210px;"}
22672267

22682268
::: {.math .notranslate .nohighlight}

pr-4271/applications/python/edge_detection.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1212,7 +1212,7 @@ <h2>Image<a class="headerlink" href="#Image" title="Permalink to this heading">
12121212
<section id="Quantum-Probability-Image-Encoding-(QPIE):">
12131213
<h2>Quantum Probability Image Encoding (QPIE):<a class="headerlink" href="#Quantum-Probability-Image-Encoding-(QPIE):" title="Permalink to this heading"></a></h2>
12141214
<p>Lets take as an example a classical 2x2 image (4 pixels). We can label each pixel with its position</p>
1215-
<div><p><img alt="c8132cc863c34efebdc6ff4a7a33b648" class="no-scaled-link" src="../../_images/pixels-img.png" style="width: 200px;" /></p>
1215+
<div><p><img alt="d07ec0faab584bf789118c16f2a7f2f9" class="no-scaled-link" src="../../_images/pixels-img.png" style="width: 200px;" /></p>
12161216
</div><p>Each pixel will have its own color intensity represented along with its position label as an 8-bit black and white color. To convert the pixel intensity to probability amplitudes of a quantum state</p>
12171217
<div class="math notranslate nohighlight">
12181218
\[c_i = \frac{I_{yx}}{\sqrt(\sum I^2_{yx})}\]</div>

pr-4271/applications/python/edge_detection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2108,7 +2108,7 @@ each pixel with its position
21082108

21092109
<div>
21102110

2111-
![c8132cc863c34efebdc6ff4a7a33b648](../../_images/pixels-img.png){.no-scaled-link
2111+
![d07ec0faab584bf789118c16f2a7f2f9](../../_images/pixels-img.png){.no-scaled-link
21122112
style="width: 200px;"}
21132113

21142114
</div>

pr-4271/applications/python/grovers.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1254,7 +1254,7 @@ <h3>Good and Bad States<a class="headerlink" href="#Good-and-Bad-States" title="
12541254
<p>Let us now examine the geometric picture behind our current discussion. We’ll consider the ambient Hilbert space to be spanned by the standard basis vectors <span class="math notranslate nohighlight">\(|0\rangle, |1\rangle, \dots, |N-1\rangle\)</span>, where the full dimension is <span class="math notranslate nohighlight">\(N = 2^n\)</span>. Since the uniform superposition state <span class="math notranslate nohighlight">\(|\xi\rangle\)</span> can be expressed as a linear combination of the states <span class="math notranslate nohighlight">\(|G\rangle\)</span> and <span class="math notranslate nohighlight">\(|B\rangle\)</span> with real coefficients, all three states <span class="math notranslate nohighlight">\(|\xi\rangle, |G\rangle,\)</span> and <span class="math notranslate nohighlight">\(|B\rangle\)</span>
12551255
reside in a two-dimensional real subspace of the ambient Hilbert space, which we can visualize as a 2D plane as in the image below. Since, <span class="math notranslate nohighlight">\(|G\rangle\)</span> and <span class="math notranslate nohighlight">\(|B\rangle\)</span> are orthogonal, we can imagine them graphed as unit vectors in the positive <span class="math notranslate nohighlight">\(y\)</span> and positive <span class="math notranslate nohighlight">\(x\)</span> directions, respectively. From our previous expression, <span class="math notranslate nohighlight">\(\ket{\xi} = \sin(\theta) |G\rangle + \cos(\theta) |B\rangle,\)</span> we see that the state <span class="math notranslate nohighlight">\(|\xi\rangle\)</span> forms an angle <span class="math notranslate nohighlight">\(\theta\)</span> with
12561256
<span class="math notranslate nohighlight">\(|B\rangle\)</span>.</p>
1257-
<div style="text-align: center;"><p><img alt="f24707a62c7c4650855f67719e352a39" src="../../_images/grovers-2D-plane.png" /></p>
1257+
<div style="text-align: center;"><p><img alt="07a1b4b692094adb96e324951102e8f7" src="../../_images/grovers-2D-plane.png" /></p>
12581258
</div><p>Given that the number of marked states <span class="math notranslate nohighlight">\(t\)</span> is typically small compared to <span class="math notranslate nohighlight">\(N\)</span>, it follows that <span class="math notranslate nohighlight">\(\theta = \arcsin\left(\sqrt{\frac{t}{N}}\right)\)</span> is a small angle. This assumption is reasonable, as otherwise, a sufficient number of independent queries to the oracle would likely yield a solution through classical search methods.</p>
12591259
</section>
12601260
<section id="Step-2:-Oracle-application">
@@ -1369,9 +1369,9 @@ <h4>Completing Step 3<a class="headerlink" href="#Completing-Step-3" title="Perm
13691369
<div class="math notranslate nohighlight">
13701370
\[\mathcal{G} = r_\xi \circ r_B = H^{\otimes n} \big( 2|0^{\otimes n} \rangle \langle 0^{\otimes n}| - \text{Id} \big) H^{\otimes n} \mathcal{O}_f.\]</div>
13711371
<p>The circuit diagram below puts together steps 1 through 3:</p>
1372-
<div style="text-align: center;"><p><img alt="623438866d714fe7856e33e9bf202c6c" src="../../_images/grovers-steps1-3.png" /></p>
1372+
<div style="text-align: center;"><p><img alt="7e28bc462e8541b9a8f30fe95773661d" src="../../_images/grovers-steps1-3.png" /></p>
13731373
</div><p>Running this circuit initializes <span class="math notranslate nohighlight">\(\ket{\xi}\)</span> and performs a rotation by <span class="math notranslate nohighlight">\(2\theta\)</span> (twice the angle between <span class="math notranslate nohighlight">\(|\xi\rangle\)</span> and <span class="math notranslate nohighlight">\(|B\rangle\)</span>) in the direction from <span class="math notranslate nohighlight">\(|B\rangle\)</span> to <span class="math notranslate nohighlight">\(|G\rangle\)</span>.</p>
1374-
<div style="text-align: center;"><p><img alt="658d25fbdebb4a2e98a61c6e41a8f17d" src="../../_images/grovers-full-rotation.png" /></p>
1374+
<div style="text-align: center;"><p><img alt="93cb397184c142eaafdc124f406db713" src="../../_images/grovers-full-rotation.png" /></p>
13751375
</div><p>Let’s verify that the state resulting from one iteration of Grover’s algorithm brings us closer to the good state, <span class="math notranslate nohighlight">\(\ket{G}\)</span>. In particular, notice that the amplitudes of <code class="docutils literal notranslate"><span class="pre">1001</span></code> and <code class="docutils literal notranslate"><span class="pre">1111</span></code> in the resulting state have been amplified compared to the equal superposition of states.</p>
13761376
<div class="nbinput docutils container">
13771377
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[18]:

pr-4271/applications/python/grovers.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2300,7 +2300,7 @@ can imagine them graphed as unit vectors in the positive [\\(y\\)]{.math
23002300
[\\(\|B\\rangle\\)]{.math .notranslate .nohighlight}.
23012301

23022302
::: {style="text-align: center;"}
2303-
![f24707a62c7c4650855f67719e352a39](../../_images/grovers-2D-plane.png)
2303+
![07a1b4b692094adb96e324951102e8f7](../../_images/grovers-2D-plane.png)
23042304
:::
23052305

23062306
Given that the number of marked states [\\(t\\)]{.math .notranslate
@@ -2515,7 +2515,7 @@ which we will denote by [\\(\\mathcal{G}\\)]{.math .notranslate
25152515
The circuit diagram below puts together steps 1 through 3:
25162516

25172517
::: {style="text-align: center;"}
2518-
![623438866d714fe7856e33e9bf202c6c](../../_images/grovers-steps1-3.png)
2518+
![7e28bc462e8541b9a8f30fe95773661d](../../_images/grovers-steps1-3.png)
25192519
:::
25202520

25212521
Running this circuit initializes [\\(\\ket{\\xi}\\)]{.math .notranslate
@@ -2527,7 +2527,7 @@ from [\\(\|B\\rangle\\)]{.math .notranslate .nohighlight} to
25272527
[\\(\|G\\rangle\\)]{.math .notranslate .nohighlight}.
25282528

25292529
::: {style="text-align: center;"}
2530-
![658d25fbdebb4a2e98a61c6e41a8f17d](../../_images/grovers-full-rotation.png)
2530+
![93cb397184c142eaafdc124f406db713](../../_images/grovers-full-rotation.png)
25312531
:::
25322532

25332533
Let's verify that the state resulting from one iteration of Grover's

0 commit comments

Comments
 (0)