Skip to content

Commit be602f7

Browse files
Docs preview for PR #4090.
1 parent 2c78c0b commit be602f7

27 files changed

+92
-84
lines changed

pr-4090/api/languages/python_api.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2466,7 +2466,7 @@ <h3>Spin Operators<a class="headerlink" href="#spin-operators" title="Permalink
24662466
<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>
24672467
<dd><dl class="py function">
24682468
<dt class="sig sig-object py">
2469-
<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">3931393684</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>
2469+
<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">1998158223</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>
24702470
<dd></dd></dl>
24712471

24722472
<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-4090/api/languages/python_api.md

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

36963696
:
36973697

3698-
[[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}[[3931393684]{.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}
3698+
[[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}[[1998158223]{.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}
36993699

37003700
:
37013701

pr-4090/applications/python/adapt_qaoa.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,7 @@ <h1>ADAPT-QAOA algorithm<a class="headerlink" href="#ADAPT-QAOA-algorithm" title
10791079
parameter</p>
10801080
<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>
10811081
<p>Below is a schematic representation of the ADAPT-QAOA algorithm explained above.</p>
1082-
<div><p><img alt="487dcec4816f49118b73e44d1d79d262" class="no-scaled-link" src="../../_images/adapt-qaoa.png" style="width: 1000px;" /></p>
1082+
<div><p><img alt="4117ff2c99eb4c9cb56c43fe8fdafd9c" class="no-scaled-link" src="../../_images/adapt-qaoa.png" style="width: 1000px;" /></p>
10831083
</div><div class="nbinput nblast docutils container">
10841084
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[15]:
10851085
</pre></div>

pr-4090/applications/python/adapt_qaoa.md

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

19041904
<div>
19051905

1906-
![487dcec4816f49118b73e44d1d79d262](../../_images/adapt-qaoa.png){.no-scaled-link
1906+
![4117ff2c99eb4c9cb56c43fe8fdafd9c](../../_images/adapt-qaoa.png){.no-scaled-link
19071907
style="width: 1000px;"}
19081908

19091909
</div>

pr-4090/applications/python/adapt_vqe.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1076,7 +1076,7 @@ <h1>ADAPT-VQE algorithm<a class="headerlink" href="#ADAPT-VQE-algorithm" title="
10761076
<p>7- Perform a VQE experiment to re-optimize all parameters in the ansatz.</p>
10771077
<p>8- go to step 4</p>
10781078
<p>Below is a Schematic depiction of the ADAPT-VQE algorithm</p>
1079-
<div><p><img alt="022171bd5f50402ab50d2ab7bb48c7ca" class="no-scaled-link" src="../../_images/adapt-vqe.png" style="width: 800px;" /></p>
1079+
<div><p><img alt="6bc1e0b4e3994382bfb3c2d36c7f1f2a" class="no-scaled-link" src="../../_images/adapt-vqe.png" style="width: 800px;" /></p>
10801080
</div><div class="nbinput docutils container">
10811081
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[1]:
10821082
</pre></div>

pr-4090/applications/python/adapt_vqe.md

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

18721872
<div>
18731873

1874-
![022171bd5f50402ab50d2ab7bb48c7ca](../../_images/adapt-vqe.png){.no-scaled-link
1874+
![6bc1e0b4e3994382bfb3c2d36c7f1f2a](../../_images/adapt-vqe.png){.no-scaled-link
18751875
style="width: 800px;"}
18761876

18771877
</div>

pr-4090/applications/python/deutsch_algorithm.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,7 @@ <h2>XOR <span class="math notranslate nohighlight">\(\oplus\)</span><a class="he
11361136
</section>
11371137
<section id="Quantum-oracles">
11381138
<h2>Quantum oracles<a class="headerlink" href="#Quantum-oracles" title="Permalink to this heading"></a></h2>
1139-
<p><img alt="990f4f6891b4460cb65d4376e2fc6194" class="no-scaled-link" src="../../_images/oracle.png" style="width: 300px; height: 150px;" /></p>
1139+
<p><img alt="bdd855e7e80b43e2bcb7923b5cb0d83c" class="no-scaled-link" src="../../_images/oracle.png" style="width: 300px; height: 150px;" /></p>
11401140
<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>
11411141
<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>
11421142
<div class="math notranslate nohighlight">
@@ -1184,7 +1184,7 @@ <h2>Quantum parallelism<a class="headerlink" href="#Quantum-parallelism" title="
11841184
<h2>Deutsch’s Algorithm:<a class="headerlink" href="#Deutsch's-Algorithm:" title="Permalink to this heading"></a></h2>
11851185
<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>
11861186
<p>We step through the circuit diagram below and follow the math after the application of each gate.</p>
1187-
<p><img alt="ccb2cda0d7514d0e8bfe22f742cb37d5" class="no-scaled-link" src="../../_images/deutsch.png" style="width: 500px; height: 210px;" /></p>
1187+
<p><img alt="07cf30c233684f668b3a5bee4eda22e2" class="no-scaled-link" src="../../_images/deutsch.png" style="width: 500px; height: 210px;" /></p>
11881188
<div class="math notranslate nohighlight">
11891189
\[\ket{\psi_0} = \ket{01}
11901190
\tag{1}\]</div>

pr-4090/applications/python/deutsch_algorithm.md

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

1955-
![990f4f6891b4460cb65d4376e2fc6194](../../_images/oracle.png){.no-scaled-link
1955+
![bdd855e7e80b43e2bcb7923b5cb0d83c](../../_images/oracle.png){.no-scaled-link
19561956
style="width: 300px; height: 150px;"}
19571957

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

2061-
![ccb2cda0d7514d0e8bfe22f742cb37d5](../../_images/deutsch.png){.no-scaled-link
2061+
![07cf30c233684f668b3a5bee4eda22e2](../../_images/deutsch.png){.no-scaled-link
20622062
style="width: 500px; height: 210px;"}
20632063

20642064
::: {.math .notranslate .nohighlight}

pr-4090/applications/python/edge_detection.html

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

pr-4090/applications/python/edge_detection.md

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

19051905
<div>
19061906

1907-
![1c8544d8ae75486e9708feb0b9689adb](../../_images/pixels-img.png){.no-scaled-link
1907+
![0764647d505c46d09dbd84f6e604b661](../../_images/pixels-img.png){.no-scaled-link
19081908
style="width: 200px;"}
19091909

19101910
</div>

0 commit comments

Comments
 (0)