Skip to content

Commit acb7c44

Browse files
Docs preview for PR #3800.
1 parent 6e7e172 commit acb7c44

22 files changed

+50
-50
lines changed

pr-3800/api/languages/python_api.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2578,7 +2578,7 @@ <h3>Spin Operators<a class="headerlink" href="#spin-operators" title="Permalink
25782578
<em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">random</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#cudaq.operators.spin.SpinOperator.random" title="Permalink to this definition">¶</a></dt>
25792579
<dd><dl class="py function">
25802580
<dt class="sig sig-object py">
2581-
<span class="sig-name descname"><span class="pre">random</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">qubit_count</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">term_count</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">seed</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">3703969214</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cudaq.operators.spin.SpinOperator" title="cudaq.operators.spin.SpinOperator"><span class="pre">SpinOperator</span></a></span></span></dt>
2581+
<span class="sig-name descname"><span class="pre">random</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">qubit_count</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">term_count</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">seed</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><span class="pre">int</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">3323047923</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference internal" href="#cudaq.operators.spin.SpinOperator" title="cudaq.operators.spin.SpinOperator"><span class="pre">SpinOperator</span></a></span></span></dt>
25822582
<dd></dd></dl>
25832583

25842584
<p>Return a random spin operator with the given number of terms (<code class="code docutils literal notranslate"><span class="pre">term_count</span></code>) where each term acts on all targets in the open range [0, qubit_count). An optional seed value may also be provided.</p>

pr-3800/api/languages/python_api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3916,7 +3916,7 @@ aria-hidden="true"}](../default_ops.html "Quantum Operations"){.btn
39163916

39173917
:
39183918

3919-
[[random]{.pre}]{.sig-name .descname}[(]{.sig-paren}*[[qubit_count]{.pre}]{.n}[[:]{.pre}]{.p}[ ]{.w}[[[int]{.pre}](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)"){.reference .external}]{.n}*, *[[term_count]{.pre}]{.n}[[:]{.pre}]{.p}[ ]{.w}[[[int]{.pre}](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)"){.reference .external}]{.n}*, *[[seed]{.pre}]{.n}[[:]{.pre}]{.p}[ ]{.w}[[[int]{.pre}](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)"){.reference .external}]{.n}[ ]{.w}[[=]{.pre}]{.o}[ ]{.w}[[3703969214]{.pre}]{.default_value}*[)]{.sig-paren} [[→]{.sig-return-icon} [[[SpinOperator]{.pre}](#cudaq.operators.spin.SpinOperator "cudaq.operators.spin.SpinOperator"){.reference .internal}]{.sig-return-typehint}]{.sig-return}
3919+
[[random]{.pre}]{.sig-name .descname}[(]{.sig-paren}*[[qubit_count]{.pre}]{.n}[[:]{.pre}]{.p}[ ]{.w}[[[int]{.pre}](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)"){.reference .external}]{.n}*, *[[term_count]{.pre}]{.n}[[:]{.pre}]{.p}[ ]{.w}[[[int]{.pre}](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)"){.reference .external}]{.n}*, *[[seed]{.pre}]{.n}[[:]{.pre}]{.p}[ ]{.w}[[[int]{.pre}](https://docs.python.org/3/library/functions.html#int "(in Python v3.14)"){.reference .external}]{.n}[ ]{.w}[[=]{.pre}]{.o}[ ]{.w}[[3323047923]{.pre}]{.default_value}*[)]{.sig-paren} [[→]{.sig-return-icon} [[[SpinOperator]{.pre}](#cudaq.operators.spin.SpinOperator "cudaq.operators.spin.SpinOperator"){.reference .internal}]{.sig-return-typehint}]{.sig-return}
39203920

39213921
:
39223922

pr-3800/applications/python/adapt_qaoa.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,7 @@ <h1>ADAPT-QAOA algorithm<a class="headerlink" href="#ADAPT-QAOA-algorithm" title
11911191
parameter</p>
11921192
<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>
11931193
<p>Below is a schematic representation of the ADAPT-QAOA algorithm explained above.</p>
1194-
<div><p><img alt="316b7d8feb82439b9950e895ceaaffa2" class="no-scaled-link" src="../../_images/adapt-qaoa.png" style="width: 1000px;" /></p>
1194+
<div><p><img alt="ea0a9732d8db4a879b59bac6b688564c" class="no-scaled-link" src="../../_images/adapt-qaoa.png" style="width: 1000px;" /></p>
11951195
</div><div class="nbinput nblast docutils container">
11961196
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[15]:
11971197
</pre></div>

pr-3800/applications/python/adapt_qaoa.md

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

21362136
<div>
21372137

2138-
![316b7d8feb82439b9950e895ceaaffa2](../../_images/adapt-qaoa.png){.no-scaled-link
2138+
![ea0a9732d8db4a879b59bac6b688564c](../../_images/adapt-qaoa.png){.no-scaled-link
21392139
style="width: 1000px;"}
21402140

21412141
</div>

pr-3800/applications/python/adapt_vqe.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,7 @@ <h1>ADAPT-VQE algorithm<a class="headerlink" href="#ADAPT-VQE-algorithm" title="
11881188
<p>7- Perform a VQE experiment to re-optimize all parameters in the ansatz.</p>
11891189
<p>8- go to step 4</p>
11901190
<p>Below is a Schematic depiction of the ADAPT-VQE algorithm</p>
1191-
<div><p><img alt="9dab3c4a9f574dea93d75c3ceb6d04db" class="no-scaled-link" src="../../_images/adapt-vqe.png" style="width: 800px;" /></p>
1191+
<div><p><img alt="65a90747141c49fbb0349f2debc1e311" class="no-scaled-link" src="../../_images/adapt-vqe.png" style="width: 800px;" /></p>
11921192
</div><div class="nbinput docutils container">
11931193
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[1]:
11941194
</pre></div>

pr-3800/applications/python/adapt_vqe.md

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

21042104
<div>
21052105

2106-
![9dab3c4a9f574dea93d75c3ceb6d04db](../../_images/adapt-vqe.png){.no-scaled-link
2106+
![65a90747141c49fbb0349f2debc1e311](../../_images/adapt-vqe.png){.no-scaled-link
21072107
style="width: 800px;"}
21082108

21092109
</div>

pr-3800/applications/python/deutsch_algorithm.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,7 +1248,7 @@ <h2>XOR <span class="math notranslate nohighlight">\(\oplus\)</span><a class="he
12481248
</section>
12491249
<section id="Quantum-oracles">
12501250
<h2>Quantum oracles<a class="headerlink" href="#Quantum-oracles" title="Permalink to this heading"></a></h2>
1251-
<p><img alt="7ae97f6ea3c4483591d8ed2c2b18c7f2" class="no-scaled-link" src="../../_images/oracle.png" style="width: 300px; height: 150px;" /></p>
1251+
<p><img alt="373ba9efb338463da5d9b89c3a7170c4" class="no-scaled-link" src="../../_images/oracle.png" style="width: 300px; height: 150px;" /></p>
12521252
<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>
12531253
<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>
12541254
<div class="math notranslate nohighlight">
@@ -1296,7 +1296,7 @@ <h2>Quantum parallelism<a class="headerlink" href="#Quantum-parallelism" title="
12961296
<h2>Deutsch’s Algorithm:<a class="headerlink" href="#Deutsch's-Algorithm:" title="Permalink to this heading"></a></h2>
12971297
<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>
12981298
<p>We step through the circuit diagram below and follow the math after the application of each gate.</p>
1299-
<p><img alt="0dbe0f96c8a5432f913accecb68d855c" class="no-scaled-link" src="../../_images/deutsch.png" style="width: 500px; height: 210px;" /></p>
1299+
<p><img alt="bde95c4bbaf84f4e99ca18a12720971e" class="no-scaled-link" src="../../_images/deutsch.png" style="width: 500px; height: 210px;" /></p>
13001300
<div class="math notranslate nohighlight">
13011301
\[\ket{\psi_0} = \ket{01}
13021302
\tag{1}\]</div>

pr-3800/applications/python/deutsch_algorithm.md

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

2187-
![7ae97f6ea3c4483591d8ed2c2b18c7f2](../../_images/oracle.png){.no-scaled-link
2187+
![373ba9efb338463da5d9b89c3a7170c4](../../_images/oracle.png){.no-scaled-link
21882188
style="width: 300px; height: 150px;"}
21892189

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

2293-
![0dbe0f96c8a5432f913accecb68d855c](../../_images/deutsch.png){.no-scaled-link
2293+
![bde95c4bbaf84f4e99ca18a12720971e](../../_images/deutsch.png){.no-scaled-link
22942294
style="width: 500px; height: 210px;"}
22952295

22962296
::: {.math .notranslate .nohighlight}

pr-3800/applications/python/edge_detection.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1228,7 +1228,7 @@ <h2>Image<a class="headerlink" href="#Image" title="Permalink to this heading">
12281228
<section id="Quantum-Probability-Image-Encoding-(QPIE):">
12291229
<h2>Quantum Probability Image Encoding (QPIE):<a class="headerlink" href="#Quantum-Probability-Image-Encoding-(QPIE):" title="Permalink to this heading"></a></h2>
12301230
<p>Lets take as an example a classical 2x2 image (4 pixels). We can label each pixel with its position</p>
1231-
<div><p><img alt="e6015c875e89423594c7daade30b62c3" class="no-scaled-link" src="../../_images/pixels-img.png" style="width: 200px;" /></p>
1231+
<div><p><img alt="83c2505f1dff4f569e2a6d8474bc5e60" class="no-scaled-link" src="../../_images/pixels-img.png" style="width: 200px;" /></p>
12321232
</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>
12331233
<div class="math notranslate nohighlight">
12341234
\[c_i = \frac{I_{yx}}{\sqrt(\sum I^2_{yx})}\]</div>

pr-3800/applications/python/edge_detection.md

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

21372137
<div>
21382138

2139-
![e6015c875e89423594c7daade30b62c3](../../_images/pixels-img.png){.no-scaled-link
2139+
![83c2505f1dff4f569e2a6d8474bc5e60](../../_images/pixels-img.png){.no-scaled-link
21402140
style="width: 200px;"}
21412141

21422142
</div>

0 commit comments

Comments
 (0)