Skip to content

Commit 2165f2e

Browse files
Docs preview for PR #3553.
1 parent 387e1eb commit 2165f2e

19 files changed

+35
-35
lines changed

pr-3553/api/languages/python_api.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2475,7 +2475,7 @@ <h3>Spin Operators<a class="headerlink" href="#spin-operators" title="Permalink
24752475
<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>
24762476
<dd><dl class="py function">
24772477
<dt class="sig sig-object py">
2478-
<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">1591174623</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>
2478+
<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">4192306507</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>
24792479
<dd></dd></dl>
24802480

24812481
<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-3553/api/languages/python_api.md

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

36743674
:
36753675

3676-
[[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}[[1591174623]{.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}
3676+
[[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}[[4192306507]{.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}
36773677

36783678
:
36793679

pr-3553/applications/python/adapt_qaoa.html

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

pr-3553/applications/python/adapt_qaoa.md

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

18231823
<div>
18241824

1825-
![b7e86048ec4e49c9bc9e2398aff824a6](../../_images/adapt-qaoa.png){.no-scaled-link
1825+
![1012715231424cffba88608ac92d0823](../../_images/adapt-qaoa.png){.no-scaled-link
18261826
style="width: 1000px;"}
18271827

18281828
</div>

pr-3553/applications/python/adapt_vqe.html

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

pr-3553/applications/python/adapt_vqe.md

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

17911791
<div>
17921792

1793-
![899a0a12156341c9863931c340ab6f13](../../_images/adapt-vqe.png){.no-scaled-link
1793+
![6326830ef43f47ff8b579c2d9f59cab8](../../_images/adapt-vqe.png){.no-scaled-link
17941794
style="width: 800px;"}
17951795

17961796
</div>

pr-3553/applications/python/deutsch_algorithm.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,7 +1092,7 @@ <h2>XOR <span class="math notranslate nohighlight">\(\oplus\)</span><a class="he
10921092
</section>
10931093
<section id="Quantum-oracles">
10941094
<h2>Quantum oracles<a class="headerlink" href="#Quantum-oracles" title="Permalink to this heading"></a></h2>
1095-
<p><img alt="f6d98f93e9014f96adf0c4ab76b7518b" class="no-scaled-link" src="../../_images/oracle.png" style="width: 300px; height: 150px;" /></p>
1095+
<p><img alt="d05137e35104445bb65af82381653f76" class="no-scaled-link" src="../../_images/oracle.png" style="width: 300px; height: 150px;" /></p>
10961096
<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>
10971097
<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>
10981098
<div class="math notranslate nohighlight">
@@ -1140,7 +1140,7 @@ <h2>Quantum parallelism<a class="headerlink" href="#Quantum-parallelism" title="
11401140
<h2>Deutsch’s Algorithm:<a class="headerlink" href="#Deutsch's-Algorithm:" title="Permalink to this heading"></a></h2>
11411141
<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>
11421142
<p>We step through the circuit diagram below and follow the math after the application of each gate.</p>
1143-
<p><img alt="c43bd79183744544b4534636cfd56b0d" class="no-scaled-link" src="../../_images/deutsch.png" style="width: 500px; height: 210px;" /></p>
1143+
<p><img alt="6308537272684e45b0719770a7739362" class="no-scaled-link" src="../../_images/deutsch.png" style="width: 500px; height: 210px;" /></p>
11441144
<div class="math notranslate nohighlight">
11451145
\[\ket{\psi_0} = \ket{01}
11461146
\tag{1}\]</div>

pr-3553/applications/python/deutsch_algorithm.md

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

1874-
![f6d98f93e9014f96adf0c4ab76b7518b](../../_images/oracle.png){.no-scaled-link
1874+
![d05137e35104445bb65af82381653f76](../../_images/oracle.png){.no-scaled-link
18751875
style="width: 300px; height: 150px;"}
18761876

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

1980-
![c43bd79183744544b4534636cfd56b0d](../../_images/deutsch.png){.no-scaled-link
1980+
![6308537272684e45b0719770a7739362](../../_images/deutsch.png){.no-scaled-link
19811981
style="width: 500px; height: 210px;"}
19821982

19831983
::: {.math .notranslate .nohighlight}

pr-3553/applications/python/edge_detection.html

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

pr-3553/applications/python/edge_detection.md

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

18241824
<div>
18251825

1826-
![4ef8b7a168ec4d60bda1cef03c738d4e](../../_images/pixels-img.png){.no-scaled-link
1826+
![f600a361d6484836b70a2ddc8c5932ea](../../_images/pixels-img.png){.no-scaled-link
18271827
style="width: 200px;"}
18281828

18291829
</div>

0 commit comments

Comments
 (0)