Skip to content

Commit af3b28a

Browse files
Docs preview for PR #3308.
1 parent 5a35cdf commit af3b28a

19 files changed

+35
-35
lines changed

pr-3308/api/languages/python_api.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2320,7 +2320,7 @@ <h3>Spin Operators<a class="headerlink" href="#spin-operators" title="Permalink
23202320
<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>
23212321
<dd><dl class="py function">
23222322
<dt class="sig sig-object py">
2323-
<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.13)"><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.13)"><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.13)"><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">2318850421</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>
2323+
<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.13)"><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.13)"><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.13)"><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">2150440527</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>
23242324
<dd></dd></dl>
23252325

23262326
<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-3308/api/languages/python_api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3329,7 +3329,7 @@ Operators[¶](#operators "Permalink to this heading"){.headerlink}
33293329

33303330
:
33313331

3332-
[[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.13)"){.reference .external}]{.n}*, *[[term\_count]{.pre}]{.n}[[:]{.pre}]{.p}[ ]{.w}[[[int]{.pre}](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)"){.reference .external}]{.n}*, *[[seed]{.pre}]{.n}[[:]{.pre}]{.p}[ ]{.w}[[[int]{.pre}](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)"){.reference .external}]{.n}[ ]{.w}[[=]{.pre}]{.o}[ ]{.w}[[2318850421]{.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}
3332+
[[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.13)"){.reference .external}]{.n}*, *[[term\_count]{.pre}]{.n}[[:]{.pre}]{.p}[ ]{.w}[[[int]{.pre}](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)"){.reference .external}]{.n}*, *[[seed]{.pre}]{.n}[[:]{.pre}]{.p}[ ]{.w}[[[int]{.pre}](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)"){.reference .external}]{.n}[ ]{.w}[[=]{.pre}]{.o}[ ]{.w}[[2150440527]{.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}
33333333

33343334
:
33353335

pr-3308/applications/python/adapt_qaoa.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,7 @@ <h1>ADAPT-QAOA algorithm<a class="headerlink" href="#ADAPT-QAOA-algorithm" title
942942
parameter</p>
943943
<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>
944944
<p>Below is a schematic representation of the ADAPT-QAOA algorithm explained above.</p>
945-
<div><p><img alt="c4db85595e8a46efa07ef16d87409bad" class="no-scaled-link" src="../../_images/adapt-qaoa.png" style="width: 1000px;" /></p>
945+
<div><p><img alt="31e8c2fc2b1b4352bc1d1d4bef992000" class="no-scaled-link" src="../../_images/adapt-qaoa.png" style="width: 1000px;" /></p>
946946
</div><div class="nbinput nblast docutils container">
947947
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[15]:
948948
</pre></div>

pr-3308/applications/python/adapt_qaoa.md

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

16381638
<div>
16391639

1640-
![c4db85595e8a46efa07ef16d87409bad](../../_images/adapt-qaoa.png){.no-scaled-link}
1640+
![31e8c2fc2b1b4352bc1d1d4bef992000](../../_images/adapt-qaoa.png){.no-scaled-link}
16411641

16421642
</div>
16431643

pr-3308/applications/python/adapt_vqe.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ <h1>ADAPT-VQE algorithm<a class="headerlink" href="#ADAPT-VQE-algorithm" title="
939939
<p>7- Perform a VQE experiment to re-optimize all parameters in the ansatz.</p>
940940
<p>8- go to step 4</p>
941941
<p>Below is a Schematic depiction of the ADAPT-VQE algorithm</p>
942-
<div><p><img alt="0ef3ee5159664ff485ec16acb36c02fd" class="no-scaled-link" src="../../_images/adapt-vqe.png" style="width: 800px;" /></p>
942+
<div><p><img alt="e3be282745da4606a17fd7e37aae7d70" class="no-scaled-link" src="../../_images/adapt-vqe.png" style="width: 800px;" /></p>
943943
</div><div class="nbinput docutils container">
944944
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[1]:
945945
</pre></div>

pr-3308/applications/python/adapt_vqe.md

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

16071607
<div>
16081608

1609-
![0ef3ee5159664ff485ec16acb36c02fd](../../_images/adapt-vqe.png){.no-scaled-link}
1609+
![e3be282745da4606a17fd7e37aae7d70](../../_images/adapt-vqe.png){.no-scaled-link}
16101610

16111611
</div>
16121612

pr-3308/applications/python/deutsch_algorithm.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ <h2>XOR <span class="math notranslate nohighlight">\(\oplus\)</span><a class="he
999999
</section>
10001000
<section id="Quantum-oracles">
10011001
<h2>Quantum oracles<a class="headerlink" href="#Quantum-oracles" title="Permalink to this heading"></a></h2>
1002-
<p><img alt="fce6a65b25df43728347e6f78932e664" class="no-scaled-link" src="../../_images/oracle.png" style="width: 300px; height: 150px;" /></p>
1002+
<p><img alt="2918a9c5dc8a4741a54128415dab0460" class="no-scaled-link" src="../../_images/oracle.png" style="width: 300px; height: 150px;" /></p>
10031003
<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>
10041004
<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>
10051005
<div class="math notranslate nohighlight">
@@ -1047,7 +1047,7 @@ <h2>Quantum parallelism<a class="headerlink" href="#Quantum-parallelism" title="
10471047
<h2>Deutsch’s Algorithm:<a class="headerlink" href="#Deutsch's-Algorithm:" title="Permalink to this heading"></a></h2>
10481048
<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>
10491049
<p>We step through the circuit diagram below and follow the math after the application of each gate.</p>
1050-
<p><img alt="f6491b966c3147f7ae62398662948389" class="no-scaled-link" src="../../_images/deutsch.png" style="width: 500px; height: 210px;" /></p>
1050+
<p><img alt="45cbcb2474aa485489c15bbae7718e92" class="no-scaled-link" src="../../_images/deutsch.png" style="width: 500px; height: 210px;" /></p>
10511051
<div class="math notranslate nohighlight">
10521052
\[\ket{\psi_0} = \ket{01}
10531053
\tag{1}\]</div>

pr-3308/applications/python/deutsch_algorithm.md

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

1692-
![fce6a65b25df43728347e6f78932e664](../../_images/oracle.png){.no-scaled-link}
1692+
![2918a9c5dc8a4741a54128415dab0460](../../_images/oracle.png){.no-scaled-link}
16931693

16941694
Suppose we have [\\(f(x): \\{0,1\\} \\longrightarrow \\{0,1\\}\\)]{.math
16951695
.notranslate .nohighlight}. We can compute this function on a quantum
@@ -1796,7 +1796,7 @@ balanced function? If constant, [\\(f(0) = f(1)\\)]{.math .notranslate
17961796
We step through the circuit diagram below and follow the math after the
17971797
application of each gate.
17981798

1799-
![f6491b966c3147f7ae62398662948389](../../_images/deutsch.png){.no-scaled-link}
1799+
![45cbcb2474aa485489c15bbae7718e92](../../_images/deutsch.png){.no-scaled-link}
18001800

18011801
::: {.math .notranslate .nohighlight}
18021802
\\\[\\ket{\\psi\_0} = \\ket{01} \\tag{1}\\\]

pr-3308/applications/python/edge_detection.html

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

pr-3308/applications/python/edge_detection.md

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

16421642
<div>
16431643

1644-
![5bb1d39ad3ee40ad89ceafc0404cded6](../../_images/pixels-img.png){.no-scaled-link}
1644+
![ccd0dc47e6494b26926eb4880d4484db](../../_images/pixels-img.png){.no-scaled-link}
16451645

16461646
</div>
16471647

0 commit comments

Comments
 (0)