Skip to content

Commit

Permalink
Docs preview for PR #2458.
Browse files Browse the repository at this point in the history
  • Loading branch information
cuda-quantum-bot committed Jan 31, 2025
1 parent ac3ede0 commit 22ce268
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions pr-2458/applications/python/deutschs_algorithm.html
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ <h2>XOR <span class="math notranslate nohighlight">\(\oplus\)</span><a class="he
</section>
<section id="Quantum-oracles">
<h2>Quantum oracles<a class="headerlink" href="#Quantum-oracles" title="Permalink to this heading"></a></h2>
<p><img alt="502ab534b6db44639cea944f0c4f5622" class="no-scaled-link" src="../../_images/oracle.png" style="width: 300px; height: 150px;" /></p>
<p><img alt="159cc574e9b2435baf370a818a2e849f" class="no-scaled-link" src="../../_images/oracle.png" style="width: 300px; height: 150px;" /></p>
<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>
<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>
<div class="math notranslate nohighlight">
Expand Down Expand Up @@ -870,7 +870,7 @@ <h2>Quantum parallelism<a class="headerlink" href="#Quantum-parallelism" title="
<h2>Deutsch’s Algorithm:<a class="headerlink" href="#Deutsch's-Algorithm:" title="Permalink to this heading"></a></h2>
<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>
<p>We step through the circuit diagram below and follow the math after the application of each gate.</p>
<p><img alt="72568c1c66a84b5080c0a900ff915d22" class="no-scaled-link" src="../../_images/deutsch.png" style="width: 500px; height: 210px;" /></p>
<p><img alt="596e5de8be2246a58104e3b344a76543" class="no-scaled-link" src="../../_images/deutsch.png" style="width: 500px; height: 210px;" /></p>
<div class="math notranslate nohighlight">
\[\ket{\psi_0} = \ket{01}
\tag{1}\]</div>
Expand Down
4 changes: 2 additions & 2 deletions pr-2458/examples/python/executing_photonic_kernels.html
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ <h2>Sample<a class="headerlink" href="#Sample" title="Permalink to this heading"
</div>
<div class="output_area docutils container">
<div class="highlight"><pre>
{ 02:348 11:282 20:370 }
{ 02:382 11:232 20:386 }

</pre></div></div>
</div>
Expand Down Expand Up @@ -894,7 +894,7 @@ <h2>Parallelization Techniques<a class="headerlink" href="#Parallelization-Techn
</div>
<div class="output_area docutils container">
<div class="highlight"><pre>
CUDA-Q Version (https://github.com/NVIDIA/cuda-quantum 718d9ed0b22d4bb71e80cbf43a2d52c3a828cefe)
CUDA-Q Version (https://github.com/NVIDIA/cuda-quantum f33a3b946e851e5ed350354d831a6e96fc8ac84c)
</pre></div></div>
</div>
</section>
Expand Down
28 changes: 14 additions & 14 deletions pr-2458/examples/python/executing_photonic_kernels.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
"execution_count": 1,
"metadata": {
"execution": {
"iopub.execute_input": "2025-01-30T05:01:40.048431Z",
"iopub.status.busy": "2025-01-30T05:01:40.048139Z",
"iopub.status.idle": "2025-01-30T05:01:42.742874Z",
"shell.execute_reply": "2025-01-30T05:01:42.742158Z"
"iopub.execute_input": "2025-01-31T19:17:13.639489Z",
"iopub.status.busy": "2025-01-31T19:17:13.639205Z",
"iopub.status.idle": "2025-01-31T19:17:16.364623Z",
"shell.execute_reply": "2025-01-31T19:17:16.364033Z"
}
},
"outputs": [
Expand All @@ -42,7 +42,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"{ 02:348 11:282 20:370 }\n",
"{ 02:382 11:232 20:386 }\n",
"\n"
]
}
Expand Down Expand Up @@ -95,10 +95,10 @@
"execution_count": 2,
"metadata": {
"execution": {
"iopub.execute_input": "2025-01-30T05:01:42.744637Z",
"iopub.status.busy": "2025-01-30T05:01:42.744330Z",
"iopub.status.idle": "2025-01-30T05:01:42.783835Z",
"shell.execute_reply": "2025-01-30T05:01:42.783429Z"
"iopub.execute_input": "2025-01-31T19:17:16.366649Z",
"iopub.status.busy": "2025-01-31T19:17:16.366339Z",
"iopub.status.idle": "2025-01-31T19:17:16.411661Z",
"shell.execute_reply": "2025-01-31T19:17:16.410475Z"
}
},
"outputs": [
Expand Down Expand Up @@ -183,18 +183,18 @@
"execution_count": 3,
"metadata": {
"execution": {
"iopub.execute_input": "2025-01-30T05:01:42.785943Z",
"iopub.status.busy": "2025-01-30T05:01:42.785730Z",
"iopub.status.idle": "2025-01-30T05:01:42.788620Z",
"shell.execute_reply": "2025-01-30T05:01:42.788146Z"
"iopub.execute_input": "2025-01-31T19:17:16.413794Z",
"iopub.status.busy": "2025-01-31T19:17:16.413592Z",
"iopub.status.idle": "2025-01-31T19:17:16.418190Z",
"shell.execute_reply": "2025-01-31T19:17:16.417110Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CUDA-Q Version (https://github.com/NVIDIA/cuda-quantum 718d9ed0b22d4bb71e80cbf43a2d52c3a828cefe)\n"
"CUDA-Q Version (https://github.com/NVIDIA/cuda-quantum f33a3b946e851e5ed350354d831a6e96fc8ac84c)\n"
]
}
],
Expand Down
4 changes: 2 additions & 2 deletions pr-2458/examples/python/performance_optimizations.html
Original file line number Diff line number Diff line change
Expand Up @@ -750,9 +750,9 @@ <h1>Optimizing Performance<a class="headerlink" href="#Optimizing-Performance" t
<section id="Gate-Fusion">
<h2>Gate Fusion<a class="headerlink" href="#Gate-Fusion" title="Permalink to this heading"></a></h2>
<p>Gate fusion is an optimization technique where consecutive gates are combined into a single gate operation to improve the efficiency of the simulation (See figure below). By targeting the <code class="docutils literal notranslate"><span class="pre">nvidia-mgpu</span></code> backend and setting the <code class="docutils literal notranslate"><span class="pre">CUDAQ_MGPU_FUSE</span></code> environment variable, you can select the degree of fusion that takes place. A full command line example would look like <code class="docutils literal notranslate"><span class="pre">CUDAQ_MGPU_FUSE=4</span> <span class="pre">python</span> <span class="pre">c2h2VQE.py</span> <span class="pre">--target</span> <span class="pre">nvidia</span> <span class="pre">--target-option</span> <span class="pre">fp64,mgpu</span></code></p>
<p><img alt="8499095becda48e2a3d0fca37a8653ed" src="../../_images/gate-fuse.png" /></p>
<p><img alt="38b6584cc6c84377b339cd795324704a" src="../../_images/gate-fuse.png" /></p>
<p>The importance of gate fusion is system dependent, but can have a large influence on the performance of the simulation. See the example below for a 24 qubit VQE experiment where changing the fusion level resulted in significant performance boosts.</p>
<p><img alt="7c801da95fc04ed98acfc936065f7e3a" src="../../_images/gatefusion.png" /></p>
<p><img alt="de6291aaf1e04aa596951e464f115069" src="../../_images/gatefusion.png" /></p>
</section>
</section>

Expand Down
2 changes: 1 addition & 1 deletion pr-2458/searchindex.js

Large diffs are not rendered by default.

0 comments on commit 22ce268

Please sign in to comment.