Skip to content

Commit 8b077fb

Browse files
Docs preview for PR #3800.
1 parent 96dd9d0 commit 8b077fb

25 files changed

+84
-84
lines changed

pr-3800/api/languages/python_api.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2380,7 +2380,7 @@ <h3>Spin Operators<a class="headerlink" href="#spin-operators" title="Permalink
23802380
<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>
23812381
<dd><dl class="py function">
23822382
<dt class="sig sig-object py">
2383-
<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">3867101369</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>
2383+
<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">3191306024</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>
23842384
<dd></dd></dl>
23852385

23862386
<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
@@ -3580,7 +3580,7 @@ aria-hidden="true"}](../default_ops.html "Quantum Operations"){.btn
35803580

35813581
:
35823582

3583-
[[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}[[3867101369]{.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}
3583+
[[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}[[3191306024]{.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}
35843584

35853585
:
35863586

pr-3800/applications/python/adapt_qaoa.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,7 @@ <h1>ADAPT-QAOA algorithm<a class="headerlink" href="#ADAPT-QAOA-algorithm" title
10381038
parameter</p>
10391039
<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>
10401040
<p>Below is a schematic representation of the ADAPT-QAOA algorithm explained above.</p>
1041-
<div><p><img alt="427e4b30bcf24ad79983c230ac95ddf2" class="no-scaled-link" src="../../_images/adapt-qaoa.png" style="width: 1000px;" /></p>
1041+
<div><p><img alt="890b568c42484e64a811d2f0b0379dcd" class="no-scaled-link" src="../../_images/adapt-qaoa.png" style="width: 1000px;" /></p>
10421042
</div><div class="nbinput nblast docutils container">
10431043
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[15]:
10441044
</pre></div>

pr-3800/applications/python/adapt_qaoa.md

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

18281828
<div>
18291829

1830-
![427e4b30bcf24ad79983c230ac95ddf2](../../_images/adapt-qaoa.png){.no-scaled-link
1830+
![890b568c42484e64a811d2f0b0379dcd](../../_images/adapt-qaoa.png){.no-scaled-link
18311831
style="width: 1000px;"}
18321832

18331833
</div>

pr-3800/applications/python/adapt_vqe.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,7 @@ <h1>ADAPT-VQE algorithm<a class="headerlink" href="#ADAPT-VQE-algorithm" title="
10351035
<p>7- Perform a VQE experiment to re-optimize all parameters in the ansatz.</p>
10361036
<p>8- go to step 4</p>
10371037
<p>Below is a Schematic depiction of the ADAPT-VQE algorithm</p>
1038-
<div><p><img alt="1bc261faf85f46d89c52bb80700f7408" class="no-scaled-link" src="../../_images/adapt-vqe.png" style="width: 800px;" /></p>
1038+
<div><p><img alt="3acf8afcd92142c39ec2a8f0593927f3" class="no-scaled-link" src="../../_images/adapt-vqe.png" style="width: 800px;" /></p>
10391039
</div><div class="nbinput docutils container">
10401040
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[1]:
10411041
</pre></div>

pr-3800/applications/python/adapt_vqe.md

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

17961796
<div>
17971797

1798-
![1bc261faf85f46d89c52bb80700f7408](../../_images/adapt-vqe.png){.no-scaled-link
1798+
![3acf8afcd92142c39ec2a8f0593927f3](../../_images/adapt-vqe.png){.no-scaled-link
17991799
style="width: 800px;"}
18001800

18011801
</div>

pr-3800/applications/python/deutsch_algorithm.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,7 +1095,7 @@ <h2>XOR <span class="math notranslate nohighlight">\(\oplus\)</span><a class="he
10951095
</section>
10961096
<section id="Quantum-oracles">
10971097
<h2>Quantum oracles<a class="headerlink" href="#Quantum-oracles" title="Permalink to this heading"></a></h2>
1098-
<p><img alt="2a94167d40db49cba21771edaf9dfcff" class="no-scaled-link" src="../../_images/oracle.png" style="width: 300px; height: 150px;" /></p>
1098+
<p><img alt="78717210bcc64c5fb917e5e26acbc237" class="no-scaled-link" src="../../_images/oracle.png" style="width: 300px; height: 150px;" /></p>
10991099
<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>
11001100
<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>
11011101
<div class="math notranslate nohighlight">
@@ -1143,7 +1143,7 @@ <h2>Quantum parallelism<a class="headerlink" href="#Quantum-parallelism" title="
11431143
<h2>Deutsch’s Algorithm:<a class="headerlink" href="#Deutsch's-Algorithm:" title="Permalink to this heading"></a></h2>
11441144
<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>
11451145
<p>We step through the circuit diagram below and follow the math after the application of each gate.</p>
1146-
<p><img alt="456ad7dcf36c4b359879972324994f65" class="no-scaled-link" src="../../_images/deutsch.png" style="width: 500px; height: 210px;" /></p>
1146+
<p><img alt="de6c0923344f499c9d9e8ff445cf0095" class="no-scaled-link" src="../../_images/deutsch.png" style="width: 500px; height: 210px;" /></p>
11471147
<div class="math notranslate nohighlight">
11481148
\[\ket{\psi_0} = \ket{01}
11491149
\tag{1}\]</div>

pr-3800/applications/python/deutsch_algorithm.md

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

1879-
![2a94167d40db49cba21771edaf9dfcff](../../_images/oracle.png){.no-scaled-link
1879+
![78717210bcc64c5fb917e5e26acbc237](../../_images/oracle.png){.no-scaled-link
18801880
style="width: 300px; height: 150px;"}
18811881

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

1985-
![456ad7dcf36c4b359879972324994f65](../../_images/deutsch.png){.no-scaled-link
1985+
![de6c0923344f499c9d9e8ff445cf0095](../../_images/deutsch.png){.no-scaled-link
19861986
style="width: 500px; height: 210px;"}
19871987

19881988
::: {.math .notranslate .nohighlight}

pr-3800/applications/python/edge_detection.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,7 @@ <h2>Image<a class="headerlink" href="#Image" title="Permalink to this heading">
10751075
<section id="Quantum-Probability-Image-Encoding-(QPIE):">
10761076
<h2>Quantum Probability Image Encoding (QPIE):<a class="headerlink" href="#Quantum-Probability-Image-Encoding-(QPIE):" title="Permalink to this heading"></a></h2>
10771077
<p>Lets take as an example a classical 2x2 image (4 pixels). We can label each pixel with its position</p>
1078-
<div><p><img alt="9b9fef6b92c94c139b2edaf04b58d735" class="no-scaled-link" src="../../_images/pixels-img.png" style="width: 200px;" /></p>
1078+
<div><p><img alt="6e03fe2aa560433f9aa61fd0069e81cf" class="no-scaled-link" src="../../_images/pixels-img.png" style="width: 200px;" /></p>
10791079
</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>
10801080
<div class="math notranslate nohighlight">
10811081
\[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
@@ -1828,7 +1828,7 @@ each pixel with its position
18281828

18291829
<div>
18301830

1831-
![9b9fef6b92c94c139b2edaf04b58d735](../../_images/pixels-img.png){.no-scaled-link
1831+
![6e03fe2aa560433f9aa61fd0069e81cf](../../_images/pixels-img.png){.no-scaled-link
18321832
style="width: 200px;"}
18331833

18341834
</div>

0 commit comments

Comments
 (0)