Skip to content

Commit

Permalink
Docs preview for PR #2502.
Browse files Browse the repository at this point in the history
  • Loading branch information
cuda-quantum-bot committed Jan 22, 2025
1 parent 804b18d commit 7d49a28
Show file tree
Hide file tree
Showing 19 changed files with 48 additions and 47 deletions.
2 changes: 1 addition & 1 deletion pr-2502/_sources/using/backends/simulators.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ To execute a program on the multi-node multi-GPU NVIDIA target, use the followin
.. note::

If you installed CUDA-Q via :code:`pip`, you will need to install the necessary MPI dependencies separately;
please follow the instructions for installing dependencies in the `Project Description <https://pypi.org/project/cuda-quantum/#description>`__.
please follow the instructions for installing dependencies in the `Project Description <https://pypi.org/project/cudaq/#description>`__.

In addition to using MPI in the simulator, you can use it in your application code by installing `mpi4py <https://mpi4py.readthedocs.io/>`__, and
invoking the program with the command
Expand Down
2 changes: 1 addition & 1 deletion pr-2502/_sources/using/install/data_center_install.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ copy the built `.whl` file to the host system, and install it using `pip`; e.g.
.. TODO: update pypi links throughout the docs
To install the necessary CUDA and MPI dependencies for some of the components,
you can either follow the instructions on `PyPI.org <https://pypi.org/project/cuda-quantum/>`__,
you can either follow the instructions on `PyPI.org <https://pypi.org/project/cudaq/>`__,
replacing `pip install cudaq` with the command above, or you can follow the
instructions in the remaining sections of this document to customize and better
optimize them for your host system.
Expand Down
8 changes: 4 additions & 4 deletions pr-2502/_sources/using/install/local_installation.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ please take a look at the section on :ref:`Development with VS Code <singularity
Python wheels
++++++++++++++++++++++++++++++++++++

CUDA-Q Python wheels are available on `PyPI.org <https://pypi.org/project/cuda-quantum>`__.
Installation instructions can be found in the `project description <https://pypi.org/project/cuda-quantum/#description>`__.
CUDA-Q Python wheels are available on `PyPI.org <https://pypi.org/project/cudaq/>`__.
Installation instructions can be found in the `project description <https://pypi.org/project/cudaq/#description>`__.
For more information about available versions and documentation,
see :doc:`../../releases`.

Expand Down Expand Up @@ -218,7 +218,7 @@ Pre-built binaries
Starting with the 0.6.0 release, we provide pre-built binaries for using
CUDA-Q with C++. Support for using CUDA-Q with Python can be installed
side-by-side with the pre-built binaries for C++ by following the instructions on
`PyPI.org <https://pypi.org/project/cuda-quantum>`__.
`PyPI.org <https://pypi.org/project/cudaq/>`__.
The pre-built binaries work across a range of Linux operating systems listed
under :ref:`dependencies-and-compatibility`.

Expand Down Expand Up @@ -659,7 +659,7 @@ certain CUDA libraries separately to take advantage of these.
Installation via PyPI
++++++++++++++++++++++++++++++++++++

If you installed CUDA-Q via `PyPI <https://pypi.org/project/cuda-quantum>`__, please follow the installation instructions there to install the necessary CUDA dependencies.
If you installed CUDA-Q via `PyPI <https://pypi.org/project/cudaq/>`__, please follow the installation instructions there to install the necessary CUDA dependencies.

Installation In Container Images
++++++++++++++++++++++++++++++++++++
Expand Down
2 changes: 1 addition & 1 deletion pr-2502/_sources/using/quick_start.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Install CUDA-Q
.. tab:: Python

To develop CUDA-Q applications using Python,
please follow the instructions for `installing CUDA-Q <https://pypi.org/project/cuda-quantum/>`_ from PyPI.
please follow the instructions for `installing CUDA-Q <https://pypi.org/project/cudaq/>`_ from PyPI.
If you have an NVIDIA GPU, make sure to also follow the instructions for enabling GPU-acceleration.

.. include:: ../../../python/README.md
Expand Down
4 changes: 2 additions & 2 deletions pr-2502/applications/python/deutschs_algorithm.html
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,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="e121dc4059ef4c9c979e6647ccdba80b" class="no-scaled-link" src="../../_images/oracle.png" style="width: 300px; height: 150px;" /></p>
<p><img alt="43bc5bc4cc1749ed9379032cc895016f" 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 @@ -868,7 +868,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="5c6fd707d85f4a01842956ad9320269f" class="no-scaled-link" src="../../_images/deutsch.png" style="width: 500px; height: 210px;" /></p>
<p><img alt="0f63cb27a2054f389d4977e66e1812f3" 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-2502/examples/python/executing_photonic_kernels.html
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,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:362 11:274 20:364 }
{ 02:380 11:265 20:355 }

</pre></div></div>
</div>
Expand Down Expand Up @@ -892,7 +892,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 ed0831d04f1eb282f29eac9afb2577b211ec3cb1)
CUDA-Q Version (https://github.com/NVIDIA/cuda-quantum 518b7fffcf4c41401164083bc9a4648a57536dda)
</pre></div></div>
</div>
</section>
Expand Down
28 changes: 14 additions & 14 deletions pr-2502/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-16T18:42:43.901115Z",
"iopub.status.busy": "2025-01-16T18:42:43.900783Z",
"iopub.status.idle": "2025-01-16T18:42:46.558035Z",
"shell.execute_reply": "2025-01-16T18:42:46.556956Z"
"iopub.execute_input": "2025-01-22T19:53:57.967689Z",
"iopub.status.busy": "2025-01-22T19:53:57.967560Z",
"iopub.status.idle": "2025-01-22T19:54:00.569359Z",
"shell.execute_reply": "2025-01-22T19:54:00.568439Z"
}
},
"outputs": [
Expand All @@ -42,7 +42,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"{ 02:362 11:274 20:364 }\n",
"{ 02:380 11:265 20:355 }\n",
"\n"
]
}
Expand Down Expand Up @@ -95,10 +95,10 @@
"execution_count": 2,
"metadata": {
"execution": {
"iopub.execute_input": "2025-01-16T18:42:46.560794Z",
"iopub.status.busy": "2025-01-16T18:42:46.560492Z",
"iopub.status.idle": "2025-01-16T18:42:46.606692Z",
"shell.execute_reply": "2025-01-16T18:42:46.605518Z"
"iopub.execute_input": "2025-01-22T19:54:00.571983Z",
"iopub.status.busy": "2025-01-22T19:54:00.571657Z",
"iopub.status.idle": "2025-01-22T19:54:00.616973Z",
"shell.execute_reply": "2025-01-22T19:54:00.614950Z"
}
},
"outputs": [
Expand Down Expand Up @@ -183,18 +183,18 @@
"execution_count": 3,
"metadata": {
"execution": {
"iopub.execute_input": "2025-01-16T18:42:46.609208Z",
"iopub.status.busy": "2025-01-16T18:42:46.609038Z",
"iopub.status.idle": "2025-01-16T18:42:46.613316Z",
"shell.execute_reply": "2025-01-16T18:42:46.612238Z"
"iopub.execute_input": "2025-01-22T19:54:00.619013Z",
"iopub.status.busy": "2025-01-22T19:54:00.618810Z",
"iopub.status.idle": "2025-01-22T19:54:00.622963Z",
"shell.execute_reply": "2025-01-22T19:54:00.622010Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CUDA-Q Version (https://github.com/NVIDIA/cuda-quantum ed0831d04f1eb282f29eac9afb2577b211ec3cb1)\n"
"CUDA-Q Version (https://github.com/NVIDIA/cuda-quantum 518b7fffcf4c41401164083bc9a4648a57536dda)\n"
]
}
],
Expand Down
4 changes: 2 additions & 2 deletions pr-2502/examples/python/performance_optimizations.html
Original file line number Diff line number Diff line change
Expand Up @@ -748,9 +748,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="f52d530ad2c842db867868b4222a0335" src="../../_images/gate-fuse.png" /></p>
<p><img alt="f66de2c556034742976f56b0f2792e1c" 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="bd4f9a39d63846c8a0ad6aeb5fae1271" src="../../_images/gatefusion.png" /></p>
<p><img alt="a9b03291901a4f7a8fe3060694e6489b" src="../../_images/gatefusion.png" /></p>
</section>
</section>

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

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion pr-2502/sphinx/targets/cpp/photonics_tbi_get_state.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Compile and run with:
// ```
// nvq++ --target orca-photonics photonics_tbi_get_state.cpp && ./a.out
// nvq++ --library-mode --target orca-photonics photonics_tbi_get_state.cpp
// ./a.out
// ```

#include <cudaq.h>
Expand Down
3 changes: 2 additions & 1 deletion pr-2502/sphinx/targets/cpp/photonics_tbi_sample.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Compile and run with:
// ```
// nvq++ --target orca-photonics photonics_tbi_sample.cpp && ./a.out
// nvq++ --library-mode --target orca-photonics photonics_tbi_sample.cpp
// ./a.out
// ```

#include <cudaq.h>
Expand Down
2 changes: 1 addition & 1 deletion pr-2502/sphinx/using/backends/simulators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ To execute a program on the multi-node multi-GPU NVIDIA target, use the followin
.. note::

If you installed CUDA-Q via :code:`pip`, you will need to install the necessary MPI dependencies separately;
please follow the instructions for installing dependencies in the `Project Description <https://pypi.org/project/cuda-quantum/#description>`__.
please follow the instructions for installing dependencies in the `Project Description <https://pypi.org/project/cudaq/#description>`__.

In addition to using MPI in the simulator, you can use it in your application code by installing `mpi4py <https://mpi4py.readthedocs.io/>`__, and
invoking the program with the command
Expand Down
2 changes: 1 addition & 1 deletion pr-2502/sphinx/using/install/data_center_install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ copy the built `.whl` file to the host system, and install it using `pip`; e.g.
.. TODO: update pypi links throughout the docs
To install the necessary CUDA and MPI dependencies for some of the components,
you can either follow the instructions on `PyPI.org <https://pypi.org/project/cuda-quantum/>`__,
you can either follow the instructions on `PyPI.org <https://pypi.org/project/cudaq/>`__,
replacing `pip install cudaq` with the command above, or you can follow the
instructions in the remaining sections of this document to customize and better
optimize them for your host system.
Expand Down
8 changes: 4 additions & 4 deletions pr-2502/sphinx/using/install/local_installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ please take a look at the section on :ref:`Development with VS Code <singularity
Python wheels
++++++++++++++++++++++++++++++++++++

CUDA-Q Python wheels are available on `PyPI.org <https://pypi.org/project/cuda-quantum>`__.
Installation instructions can be found in the `project description <https://pypi.org/project/cuda-quantum/#description>`__.
CUDA-Q Python wheels are available on `PyPI.org <https://pypi.org/project/cudaq/>`__.
Installation instructions can be found in the `project description <https://pypi.org/project/cudaq/#description>`__.
For more information about available versions and documentation,
see :doc:`../../releases`.

Expand Down Expand Up @@ -218,7 +218,7 @@ Pre-built binaries
Starting with the 0.6.0 release, we provide pre-built binaries for using
CUDA-Q with C++. Support for using CUDA-Q with Python can be installed
side-by-side with the pre-built binaries for C++ by following the instructions on
`PyPI.org <https://pypi.org/project/cuda-quantum>`__.
`PyPI.org <https://pypi.org/project/cudaq/>`__.
The pre-built binaries work across a range of Linux operating systems listed
under :ref:`dependencies-and-compatibility`.

Expand Down Expand Up @@ -659,7 +659,7 @@ certain CUDA libraries separately to take advantage of these.
Installation via PyPI
++++++++++++++++++++++++++++++++++++

If you installed CUDA-Q via `PyPI <https://pypi.org/project/cuda-quantum>`__, please follow the installation instructions there to install the necessary CUDA dependencies.
If you installed CUDA-Q via `PyPI <https://pypi.org/project/cudaq/>`__, please follow the installation instructions there to install the necessary CUDA dependencies.

Installation In Container Images
++++++++++++++++++++++++++++++++++++
Expand Down
2 changes: 1 addition & 1 deletion pr-2502/sphinx/using/quick_start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Install CUDA-Q
.. tab:: Python

To develop CUDA-Q applications using Python,
please follow the instructions for `installing CUDA-Q <https://pypi.org/project/cuda-quantum/>`_ from PyPI.
please follow the instructions for `installing CUDA-Q <https://pypi.org/project/cudaq/>`_ from PyPI.
If you have an NVIDIA GPU, make sure to also follow the instructions for enabling GPU-acceleration.

.. include:: ../../../python/README.md
Expand Down
2 changes: 1 addition & 1 deletion pr-2502/using/backends/simulators.html
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ <h3>Features<a class="headerlink" href="#features" title="Permalink to this head
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>If you installed CUDA-Q via <code class="code docutils literal notranslate"><span class="pre">pip</span></code>, you will need to install the necessary MPI dependencies separately;
please follow the instructions for installing dependencies in the <a class="reference external" href="https://pypi.org/project/cuda-quantum/#description">Project Description</a>.</p>
please follow the instructions for installing dependencies in the <a class="reference external" href="https://pypi.org/project/cudaq/#description">Project Description</a>.</p>
</div>
<p>In addition to using MPI in the simulator, you can use it in your application code by installing <a class="reference external" href="https://mpi4py.readthedocs.io/">mpi4py</a>, and
invoking the program with the command</p>
Expand Down
2 changes: 1 addition & 1 deletion pr-2502/using/install/data_center_install.html
Original file line number Diff line number Diff line change
Expand Up @@ -1099,7 +1099,7 @@ <h2>Installation on the Host<a class="headerlink" href="#installation-on-the-hos
</pre></div>
</div>
<p>To install the necessary CUDA and MPI dependencies for some of the components,
you can either follow the instructions on <a class="reference external" href="https://pypi.org/project/cuda-quantum/">PyPI.org</a>,
you can either follow the instructions on <a class="reference external" href="https://pypi.org/project/cudaq/">PyPI.org</a>,
replacing <code class="code docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">cudaq</span></code> with the command above, or you can follow the
instructions in the remaining sections of this document to customize and better
optimize them for your host system.</p>
Expand Down
8 changes: 4 additions & 4 deletions pr-2502/using/install/local_installation.html
Original file line number Diff line number Diff line change
Expand Up @@ -881,8 +881,8 @@ <h2>Introduction<a class="headerlink" href="#introduction" title="Permalink to t
</section>
<section id="python-wheels">
<span id="install-python-wheels"></span><h3>Python wheels<a class="headerlink" href="#python-wheels" title="Permalink to this heading"></a></h3>
<p>CUDA-Q Python wheels are available on <a class="reference external" href="https://pypi.org/project/cuda-quantum">PyPI.org</a>.
Installation instructions can be found in the <a class="reference external" href="https://pypi.org/project/cuda-quantum/#description">project description</a>.
<p>CUDA-Q Python wheels are available on <a class="reference external" href="https://pypi.org/project/cudaq/">PyPI.org</a>.
Installation instructions can be found in the <a class="reference external" href="https://pypi.org/project/cudaq/#description">project description</a>.
For more information about available versions and documentation,
see <a class="reference internal" href="../../releases.html"><span class="doc">CUDA-Q Releases</span></a>.</p>
<p>There are currently no source distributions available on PyPI, but you can download the
Expand All @@ -909,7 +909,7 @@ <h2>Introduction<a class="headerlink" href="#introduction" title="Permalink to t
<p>Starting with the 0.6.0 release, we provide pre-built binaries for using
CUDA-Q with C++. Support for using CUDA-Q with Python can be installed
side-by-side with the pre-built binaries for C++ by following the instructions on
<a class="reference external" href="https://pypi.org/project/cuda-quantum">PyPI.org</a>.
<a class="reference external" href="https://pypi.org/project/cudaq/">PyPI.org</a>.
The pre-built binaries work across a range of Linux operating systems listed
under <a class="reference internal" href="#dependencies-and-compatibility"><span class="std std-ref">Dependencies and Compatibility</span></a>.</p>
<p>Before installing our pre-built binaries, please make sure that your
Expand Down Expand Up @@ -1268,7 +1268,7 @@ <h3>Use VS Code<a class="headerlink" href="#use-vs-code" title="Permalink to thi
certain CUDA libraries separately to take advantage of these.</p>
<section id="installation-via-pypi">
<h3>Installation via PyPI<a class="headerlink" href="#installation-via-pypi" title="Permalink to this heading"></a></h3>
<p>If you installed CUDA-Q via <a class="reference external" href="https://pypi.org/project/cuda-quantum">PyPI</a>, please follow the installation instructions there to install the necessary CUDA dependencies.</p>
<p>If you installed CUDA-Q via <a class="reference external" href="https://pypi.org/project/cudaq/">PyPI</a>, please follow the installation instructions there to install the necessary CUDA dependencies.</p>
</section>
<section id="installation-in-container-images">
<h3>Installation In Container Images<a class="headerlink" href="#installation-in-container-images" title="Permalink to this heading"></a></h3>
Expand Down
Loading

0 comments on commit 7d49a28

Please sign in to comment.