Skip to content

Commit 72c2c75

Browse files
Docs preview for PR #4293.
1 parent 09b385a commit 72c2c75

23 files changed

Lines changed: 58 additions & 58 deletions

pr-4293/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ add_nvqpp_test(Gradients examples/cpp/other/gradients.cpp)
5555
add_nvqpp_test(IterativePhaseEstimation applications/cpp/iterative_qpe.cpp)
5656
add_nvqpp_test(RandomWalkPhaseEstimation applications/cpp/random_walk_qpe.cpp)
5757

58-
if (CUSTATEVEC_ROOT AND CUDA_FOUND)
58+
if (cuStateVec_FOUND)
5959
add_nvqpp_test(CuQuantumGHZ examples/cpp/basics/cuquantum_backends.cpp TARGET nvidia LABELS gpu_required)
6060
add_nvqpp_test(CuQuantumBernsteinVazirani applications/cpp/bernstein_vazirani.cpp TARGET nvidia LABELS gpu_required)
6161
endif()
@@ -72,14 +72,14 @@ add_nvqpp_test(PTSBE_InspectData inspect_execution_data.cpp SOURCE_DIR ${PTSBE_C
7272
add_nvqpp_test(PTSBE_SamplingStrategies sampling_strategies.cpp SOURCE_DIR ${PTSBE_CPP_SNIPPET_DIR})
7373
add_nvqpp_test(PTSBE_ShotAllocation shot_allocation.cpp SOURCE_DIR ${PTSBE_CPP_SNIPPET_DIR})
7474

75-
if (CUDENSITYMAT_ROOT AND CUDA_FOUND)
75+
if (cuDensityMat_FOUND)
7676
add_nvqpp_test(Dynamics_Snippets using/backends/dynamics.cpp SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/sphinx/snippets/cpp/ TARGET dynamics LABELS gpu_required)
7777
add_nvqpp_test(Dynamics_State_Batching_Snippets using/backends/dynamics_state_batching.cpp SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/sphinx/snippets/cpp/ TARGET dynamics LABELS gpu_required)
7878
add_nvqpp_test(Dynamics_Operator_Batching_Snippets using/backends/dynamics_operator_batching.cpp SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/sphinx/snippets/cpp/ TARGET dynamics LABELS gpu_required)
7979
endif()
8080

8181
set(NGPUS 0)
82-
if (CUSTATEVEC_ROOT AND CUDA_FOUND)
82+
if (cuStateVec_FOUND)
8383
add_nvqpp_test(QuickStart_nvidia quick_start.cpp TARGET nvidia LABELS gpu_required SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/sphinx/snippets/cpp)
8484

8585
# mqpu snippets need custatevec backend and optionally MPI
@@ -155,12 +155,12 @@ if (CUDAQ_ENABLE_PYTHON)
155155
add_pycudaq_test(EvolveDynamicsOperatorBatching using/backends/dynamics_operator_batching.py LABELS gpu_required SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/sphinx/snippets/python)
156156
endif()
157157

158-
if (CUTENSORNET_ROOT AND CUDA_FOUND)
158+
if (cuTensorNet_FOUND)
159159
# This example uses tensornet backend.
160160
add_pycudaq_test(SampleAsyncRemote using/cudaq/platform/sample_async_remote.py SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/sphinx/snippets/python)
161161
endif()
162162

163-
if (CUSTATEVEC_ROOT AND CUDA_FOUND)
163+
if (cuStateVec_FOUND)
164164
add_pycudaq_test(SampleAsync using/cudaq/platform/sample_async.py LABELS gpu_required SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/sphinx/snippets/python)
165165
add_pycudaq_test(ObserveMQPU using/cudaq/platform/observe_mqpu.py LABELS gpu_required SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/sphinx/snippets/python)
166166
if (MPI_CXX_FOUND AND ${NGPUS} GREATER_EQUAL 2)

pr-4293/api/languages/python_api.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2562,7 +2562,7 @@ <h3>Spin Operators<a class="headerlink" href="#spin-operators" title="Permalink
25622562
<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>
25632563
<dd><dl class="py function">
25642564
<dt class="sig sig-object py">
2565-
<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">3925646067</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>
2565+
<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">623376451</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>
25662566
<dd></dd></dl>
25672567

25682568
<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-4293/api/languages/python_api.md

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

38903890
:
38913891

3892-
[[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}[[3925646067]{.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}
3892+
[[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}[[623376451]{.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}
38933893

38943894
:
38953895

pr-4293/applications/python/adapt_qaoa.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,7 @@ <h1>ADAPT-QAOA algorithm<a class="headerlink" href="#ADAPT-QAOA-algorithm" title
11751175
parameter</p>
11761176
<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>
11771177
<p>Below is a schematic representation of the ADAPT-QAOA algorithm explained above.</p>
1178-
<div><p><img alt="7edabb0df985441fa5050c8323560ffd" class="no-scaled-link" src="../../_images/adapt-qaoa.png" style="width: 1000px;" /></p>
1178+
<div><p><img alt="c3ef3e28979e4177915ff1be4731b6e7" class="no-scaled-link" src="../../_images/adapt-qaoa.png" style="width: 1000px;" /></p>
11791179
</div><div class="nbinput nblast docutils container">
11801180
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[15]:
11811181
</pre></div>

pr-4293/applications/python/adapt_qaoa.md

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

21082108
<div>
21092109

2110-
![7edabb0df985441fa5050c8323560ffd](../../_images/adapt-qaoa.png){.no-scaled-link
2110+
![c3ef3e28979e4177915ff1be4731b6e7](../../_images/adapt-qaoa.png){.no-scaled-link
21112111
style="width: 1000px;"}
21122112

21132113
</div>

pr-4293/applications/python/adapt_vqe.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1172,7 +1172,7 @@ <h1>ADAPT-VQE algorithm<a class="headerlink" href="#ADAPT-VQE-algorithm" title="
11721172
<p>7- Perform a VQE experiment to re-optimize all parameters in the ansatz.</p>
11731173
<p>8- go to step 4</p>
11741174
<p>Below is a Schematic depiction of the ADAPT-VQE algorithm</p>
1175-
<div><p><img alt="aa50c3389c3c41a3aa97df36a6863dfd" class="no-scaled-link" src="../../_images/adapt-vqe.png" style="width: 800px;" /></p>
1175+
<div><p><img alt="247fc4560e8c4c7c97f689d84f70e8f3" class="no-scaled-link" src="../../_images/adapt-vqe.png" style="width: 800px;" /></p>
11761176
</div><div class="nbinput docutils container">
11771177
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[1]:
11781178
</pre></div>

pr-4293/applications/python/adapt_vqe.md

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

20762076
<div>
20772077

2078-
![aa50c3389c3c41a3aa97df36a6863dfd](../../_images/adapt-vqe.png){.no-scaled-link
2078+
![247fc4560e8c4c7c97f689d84f70e8f3](../../_images/adapt-vqe.png){.no-scaled-link
20792079
style="width: 800px;"}
20802080

20812081
</div>

pr-4293/applications/python/deutsch_algorithm.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,7 +1232,7 @@ <h2>XOR <span class="math notranslate nohighlight">\(\oplus\)</span><a class="he
12321232
</section>
12331233
<section id="Quantum-oracles">
12341234
<h2>Quantum oracles<a class="headerlink" href="#Quantum-oracles" title="Permalink to this heading"></a></h2>
1235-
<p><img alt="ef9a6d706fdc47a2993e4150482f95e4" class="no-scaled-link" src="../../_images/oracle.png" style="width: 300px; height: 150px;" /></p>
1235+
<p><img alt="4690dc6a46104c47b21bacbbf4ed88ad" class="no-scaled-link" src="../../_images/oracle.png" style="width: 300px; height: 150px;" /></p>
12361236
<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>
12371237
<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>
12381238
<div class="math notranslate nohighlight">
@@ -1280,7 +1280,7 @@ <h2>Quantum parallelism<a class="headerlink" href="#Quantum-parallelism" title="
12801280
<h2>Deutsch’s Algorithm:<a class="headerlink" href="#Deutsch's-Algorithm:" title="Permalink to this heading"></a></h2>
12811281
<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>
12821282
<p>We step through the circuit diagram below and follow the math after the application of each gate.</p>
1283-
<p><img alt="63ce62480ae64b9baa6bd9d55532e31f" class="no-scaled-link" src="../../_images/deutsch.png" style="width: 500px; height: 210px;" /></p>
1283+
<p><img alt="6e5b54441ace4d1b88764cd3c9d23d32" class="no-scaled-link" src="../../_images/deutsch.png" style="width: 500px; height: 210px;" /></p>
12841284
<div class="math notranslate nohighlight">
12851285
\[\ket{\psi_0} = \ket{01}
12861286
\tag{1}\]</div>

pr-4293/applications/python/deutsch_algorithm.md

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

2159-
![ef9a6d706fdc47a2993e4150482f95e4](../../_images/oracle.png){.no-scaled-link
2159+
![4690dc6a46104c47b21bacbbf4ed88ad](../../_images/oracle.png){.no-scaled-link
21602160
style="width: 300px; height: 150px;"}
21612161

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

2265-
![63ce62480ae64b9baa6bd9d55532e31f](../../_images/deutsch.png){.no-scaled-link
2265+
![6e5b54441ace4d1b88764cd3c9d23d32](../../_images/deutsch.png){.no-scaled-link
22662266
style="width: 500px; height: 210px;"}
22672267

22682268
::: {.math .notranslate .nohighlight}

pr-4293/applications/python/edge_detection.html

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

0 commit comments

Comments
 (0)