Skip to content

Commit

Permalink
Docs preview for PR #1493.
Browse files Browse the repository at this point in the history
  • Loading branch information
cuda-quantum-bot committed May 3, 2024
1 parent f90e73d commit 33fc849
Show file tree
Hide file tree
Showing 224 changed files with 2,654 additions and 2,623 deletions.
2 changes: 1 addition & 1 deletion pr-1493/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ DOXYFILE_ENCODING = UTF-8
# title of most generated pages and in a few other places.
# The default value is: My Project.

PROJECT_NAME = "CUDA Quantum"
PROJECT_NAME = "CUDA-Q"

# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
Expand Down
12 changes: 6 additions & 6 deletions pr-1493/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# CUDA Quantum Documentation
# CUDA-Q Documentation

This folder contains tools and content to build the CUDA Quantum documentation.
This folder contains tools and content to build the CUDA-Q documentation.
The [script for building docs](../scripts/build_docs.sh) can be used to build
the complete CUDA Quantum documentation. Please see the comment in that script
the complete CUDA-Q documentation. Please see the comment in that script
for more detail.

We use [Sphinx](https://www.sphinx-doc.org/) to produce documentation in HTML
Expand Down Expand Up @@ -37,10 +37,10 @@ configured by the settings in the [sphinx/conf.py](./sphinx/conf.py) file.

- **Python bindings**: <br/>
We use [pybind11](https://github.com/pybind/pybind11) to define Python
bindings for the CUDA Quantum API. Doc comments are defined as part of
bindings for the CUDA-Q API. Doc comments are defined as part of
defining these bindings in C++. To incorporate the API documentation, the
`cudaq` Python package needs to be built and installed prior to generating the
CUDA Quantum documentation. The [build_docs.sh](../scripts/build_docs.sh)
CUDA-Q documentation. The [build_docs.sh](../scripts/build_docs.sh)
script will automatically do that if necessary. This project generates
ReStructuredText documentation from Python `docstrings` using `autodoc`.
The generated `.rst` files are in `docs/source/apidoc`. The files are
Expand All @@ -51,7 +51,7 @@ configured by the settings in the [sphinx/conf.py](./sphinx/conf.py) file.
The extensions we use to generate API docs are outlined and linked in the
section above. The full list of built-in Sphinx tensions can be found
[here](https://www.sphinx-doc.org/en/master/usage/extensions/index.html). The
list of extensions that are enabled for building CUDA Quantum documentation is
list of extensions that are enabled for building CUDA-Q documentation is
defined by the value of the `extensions` configuration in
[conf.py](./sphinx/conf.py).

Expand Down
Binary file modified pr-1493/_images/examples_python_tutorials_vqe_11_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion pr-1493/_sources/api/api.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Code documentation
******************

.. toctree::
:caption: CUDA Quantum API
:caption: CUDA-Q API
:maxdepth: 1

C++ API <languages/cpp_api.rst>
Expand Down
4 changes: 2 additions & 2 deletions pr-1493/_sources/api/default_ops.rst.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Quantum Operations
******************************

CUDA Quantum provides a default set of quantum operations on qubits.
CUDA-Q provides a default set of quantum operations on qubits.
These operations can be used to define custom kernels and libraries.
Since the set of quantum intrinsic operations natively supported on a specific target
depends on the backends architecture, the :code:`nvq++` compiler automatically
Expand All @@ -13,7 +13,7 @@ The sections `Unitary Operations on Qubits`_ and `Measurements on Qubits`_ list
Operations that implement unitary transformations of the quantum state are templated.
The template argument allows to invoke the adjoint and controlled version of the quantum transformation, see the section on `Adjoint and Controlled Operations`_.

CUDA Quantum additionally provides overloads to support broadcasting of
CUDA-Q additionally provides overloads to support broadcasting of
single-qubit operations across a vector of qubits. For example,
:code:`x(cudaq::qvector<>&)` flips the state of each qubit in the provided
:code:`cudaq::qvector`.
Expand Down
2 changes: 1 addition & 1 deletion pr-1493/_sources/api/languages/cpp_api.rst.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CUDA Quantum C++ API
CUDA-Q C++ API
******************************

Operators
Expand Down
2 changes: 1 addition & 1 deletion pr-1493/_sources/api/languages/python_api.rst.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CUDA Quantum Python API
CUDA-Q Python API
******************************

.. automodule:: cudaq
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
"metadata": {},
"outputs": [],
"source": [
"# Define a CUDA Quantum optimizer.\n",
"# Define a CUDA-Q optimizer.\n",
"optimizer = cudaq.optimizers.COBYLA()\n",
"optimizer.initial_parameters = initial_parameters\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@
"metadata": {},
"outputs": [],
"source": [
"# Import the CUDA Quantum package and set the target to run on NVIDIA GPUs.\n",
"# Import the CUDA-Q package and set the target to run on NVIDIA GPUs.\n",
"\n",
"import cudaq\n",
"import numpy as np\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
"source": [
"# Executing Quantum Circuits \n",
"\n",
"In CUDA Quantum, quantum circuits are stored as quantum kernels. For estimating the probability distribution of a measured quantum state in a circuit, we use the `sample` function call, and for computing the expectation value of a quantum state with a given observable, we use the `observe` function call. \n",
"In CUDA-Q, quantum circuits are stored as quantum kernels. For estimating the probability distribution of a measured quantum state in a circuit, we use the `sample` function call, and for computing the expectation value of a quantum state with a given observable, we use the `observe` function call. \n",
"\n",
"## Sample\n",
"\n",
"Quantum states collapse upon measurement and hence need to be sampled many times to gather statistics. The CUDA Quantum `sample` call enables this: \n",
"Quantum states collapse upon measurement and hence need to be sampled many times to gather statistics. The CUDA-Q `sample` call enables this: \n",
"\n"
]
},
Expand Down
10 changes: 5 additions & 5 deletions pr-1493/_sources/examples/python/tutorials/hybrid_qnns.ipynb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"source": [
"# Hybrid Quantum Neural Networks \n",
"\n",
"The example below highlights a hybrid quantum neural network workflow with CUDA Quantum and Pytorch where both layers are GPU accelerated to maximise performance. \n",
"The example below highlights a hybrid quantum neural network workflow with CUDA-Q and Pytorch where both layers are GPU accelerated to maximise performance. \n",
"\n",
"\n",
"<img src=\"images/hybrid.png\" alt=\"hybrid\" width=\"600\">\n",
Expand Down Expand Up @@ -61,7 +61,7 @@
"source": [
"# GPU utilities\n",
"\n",
"cudaq.set_target(\"nvidia\") # Set CUDAQ to run on GPU's\n",
"cudaq.set_target(\"nvidia\") # Set CUDA-Q to run on GPU's\n",
"\n",
"torch.cuda.is_available(\n",
") # If this is True then the NVIDIA drivers are correctly installed\n",
Expand Down Expand Up @@ -132,7 +132,7 @@
" \"\"\"Allows the quantum circuit to pass data through it and compute the gradients\"\"\"\n",
" \n",
" def __init__(self, qubit_count: int, hamiltonian: cudaq.SpinOperator):\n",
" \"\"\"Define the quantum circuit in CUDA Quantum\"\"\"\n",
" \"\"\"Define the quantum circuit in CUDA-Q\"\"\"\n",
"\n",
" kernel, thetas = cudaq.make_kernel(list)\n",
"\n",
Expand Down Expand Up @@ -258,7 +258,7 @@
" x = F.relu(self.fc1(x))\n",
" x = self.fc2(x).reshape(\n",
" -1\n",
" ) # Reshapes required to satisfy input dimensions to CUDA Quantum.\n",
" ) # Reshapes required to satisfy input dimensions to CUDA-Q.\n",
" x = self.hybrid(x).reshape(-1)\n",
"\n",
" return torch.cat((x, 1 - x), -1).unsqueeze(0)"
Expand Down Expand Up @@ -297,7 +297,7 @@
}
],
"source": [
"# We move our model to the CUDA device to minimise data transfer between GPU and CPU.\n",
"# We move our model to the CUDA device to minimize data transfer between GPU and CPU.\n",
"\n",
"model = Net().to(device)\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"source": [
"# Multi-GPU Workflows\n",
"\n",
"There are many backends available with CUDA Quantum which enable seamless switching between GPUs, QPUs and CPUs and also allow for workflows involing multiple architectures working in tandem.\n",
"There are many backends available with CUDA-Q which enable seamless switching between GPUs, QPUs and CPUs and also allow for workflows involving multiple architectures working in tandem.\n",
"\n"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"source": [
"# Multiple Qubits\n",
"\n",
"If we have 2 classical bits, the possible states we could encode information in would be 00, 01, 10 and 11. Correspondingly multiple qubits can be combined and the possible combinations of their states used to process information. \n",
"If we have 2 classical bits, the possible states we could encode information in would be 00, 01, 10 and 11. Correspondingly, multiple qubits can be combined and the possible combinations of their states used to process information. \n",
"\n",
"A two qubit system has 4 computational basis states: $\\ket{00}, \\ket{01}, \\ket{10}, \\ket{11}$. \n",
"\n",
Expand All @@ -17,7 +17,7 @@
"\n",
"where the probability of measuring $x = 00, 01, 10, 11$ occurs with probability $\\lvert \\alpha_{x} \\rvert ^2$ with the normalization condition that $\\sum_{x \\in \\{ 0,1 \\}^2} \\lvert \\alpha_{x} \\rvert ^2 = 1$\n",
"\n",
"More generally, the quantum state of a $n$ qubit system is written as a sum of $2^n$ possiblle basis states where the coefficients track the probability of the system collapsing into that state if a measurment is applied. \n",
"More generally, the quantum state of a $n$ qubit system is written as a sum of $2^n$ possible basis states where the coefficients track the probability of the system collapsing into that state if a measurement is applied. \n",
"\n",
"For $n = 500$, $2^n \\approx 10^{150}$ which is greater than the number of atoms in the universe. Storing the complex numbers associated with $2^{500}$ amplitudes would not be feasible using bits and classical computations but nature seems to only require 500 qubits to do so. The art of quantum computation is thus to build quantum systems that we can manipulate with fine precision such that evolving a large statevector can be offloaded onto a quantum computer.\n",
"\n"
Expand All @@ -34,7 +34,7 @@
"\n",
"\n",
"\n",
"For brevity, we denote gate application with subscripts to reference the qubit it acts on. For e.g. $X_{0}\\ket{00} = \\ket{10}$ refers to $X_{0}$ acting on the 0<sup>th</sup> qubit flipping it to the state 1 as shown. Below we see how this is done in CUDA Quantum."
"For brevity, we denote gate application with subscripts to reference the qubit it acts on. For e.g. $X_{0}\\ket{00} = \\ket{10}$ refers to $X_{0}$ acting on the 0<sup>th</sup> qubit flipping it to the state 1 as shown. Below we see how this is done in CUDA-Q."
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
" 1 & 0\n",
"\\end{pmatrix}$$\n",
"\n",
"Let's implement the bit-flip channel using CUDA Quantum:"
"Let's implement the bit-flip channel using CUDA-Q:"
]
},
{
Expand All @@ -39,7 +39,7 @@
"\n",
"import numpy as np\n",
"\n",
"# To model quantum noise, we need to utilise the density matrix simulator target.\n",
"# To model quantum noise, we need to utilize the density matrix simulator target.\n",
"cudaq.set_target(\"density-matrix-cpu\")"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"\n",
"## Qubit\n",
"\n",
"The fundamental unit of classical information storage, processing and transmission is the bit. Analogously, we define its quantum counterpart, a quantum bit or simply the qubit. Below we define a qubit in CUDAQ. "
"The fundamental unit of classical information storage, processing and transmission is the bit. Analogously, we define its quantum counterpart, a quantum bit or simply the qubit. Below we define a qubit in CUDA-Q. "
]
},
{
Expand Down
76 changes: 34 additions & 42 deletions pr-1493/_sources/examples/python/tutorials/vqe.ipynb.txt

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions pr-1493/_sources/index.rst.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
************
CUDA Quantum
CUDA-Q
************

Welcome to the CUDA Quantum documentation page!
Welcome to the CUDA-Q documentation page!

CUDA Quantum streamlines hybrid application development and promotes productivity and scalability
CUDA-Q streamlines hybrid application development and promotes productivity and scalability
in quantum computing. It offers a unified programming model designed for a hybrid
setting |---| that is, CPUs, GPUs, and QPUs working together. CUDA Quantum contains support for
setting |---| that is, CPUs, GPUs, and QPUs working together. CUDA-Q contains support for
programming in Python and in C++.

You are browsing the documentation for |version| version of CUDA Quantum. You can find documentation for all released versions :doc:`here <versions>`.
You are browsing the documentation for |version| version of CUDA-Q. You can find documentation for all released versions :doc:`here <versions>`.

**CUDA Quantum** is a programming model and toolchain for using quantum acceleration in heterogeneous computing architectures available in C++ and Python.
**CUDA-Q** is a programming model and toolchain for using quantum acceleration in heterogeneous computing architectures available in C++ and Python.

.. toctree::
:caption: Contents
Expand Down
14 changes: 7 additions & 7 deletions pr-1493/_sources/releases.rst.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
************************
CUDA Quantum Releases
CUDA-Q Releases
************************

**latest**

The latest version of CUDA Quantum is on the main branch of our `GitHub repository <https://github.com/NVIDIA/cuda-quantum>`__ and is also available as a Docker image. More information about installing the nightly builds can be found :doc:`here <using/install/install>`
The latest version of CUDA-Q is on the main branch of our `GitHub repository <https://github.com/NVIDIA/cuda-quantum>`__ and is also available as a Docker image. More information about installing the nightly builds can be found :doc:`here <using/install/install>`

- `Docker image (nightly builds) <https://catalog.ngc.nvidia.com/orgs/nvidia/teams/nightly/containers/cuda-quantum>`__
- `Documentation <https://nvidia.github.io/cuda-quantum/latest>`__
Expand All @@ -30,12 +30,12 @@ The full change log can be found `here <https://github.com/NVIDIA/cuda-quantum/r
**0.6.0**

The 0.6.0 release contains improved support for various HPC scenarios. We have added a
:ref:`plugin infrastructure <distributed-computing-with-mpi>` for connecting CUDA Quantum
:ref:`plugin infrastructure <distributed-computing-with-mpi>` for connecting CUDA-Q
with an existing MPI installation, and we've added a :ref:`new platform target <remote-mqpu-platform>` that distributes workloads across multiple virtual QPUs,
each simulated by one or more GPUs.

Starting with 0.6.0, we are now also distributing
:ref:`pre-built binaries <install-prebuilt-binaries>` for using CUDA Quantum with C++.
:ref:`pre-built binaries <install-prebuilt-binaries>` for using CUDA-Q with C++.
The binaries are built against the `GNU C library <https://www.gnu.org/software/libc/>`__
version 2.28.
We've added a detailed :doc:`Building from Source <using/install/data_center_install>` guide to build these binaries for older `glibc` versions.
Expand All @@ -51,7 +51,7 @@ The full change log can be found `here <https://github.com/NVIDIA/cuda-quantum/r
**0.5.0**

With 0.5.0 we have added support for quantum kernel execution on OQC and IQM backends. For more information, see :doc:`using/backends/hardware`.
CUDA Quantum now allows to executing adaptive quantum kernels on quantum hardware backends that support it.
CUDA-Q now allows to executing adaptive quantum kernels on quantum hardware backends that support it.
The 0.5.0 release furthermore improves the tensor network simulation tools and adds a matrix product state simulator, see :doc:`using/backends/simulators`.

Additionally, we are now publishing images for experimental features, which currently includes improved Python language support.
Expand All @@ -77,7 +77,7 @@ The full change log can be found `here <https://github.com/NVIDIA/cuda-quantum/r

**0.4.0**

CUDA Quantum is now available on PyPI!
CUDA-Q is now available on PyPI!
The 0.4.0 release adds support for quantum kernel execution on Quantinuum and IonQ backends. For more information, see :doc:`using/backends/hardware`.

The 0.4.0 PyPI release does not yet include all of the GPU-based backends.
Expand All @@ -92,7 +92,7 @@ The full change log can be found `here <https://github.com/NVIDIA/cuda-quantum/r

**0.3.0**

The 0.3.0 release of CUDA Quantum is available as a Docker image for `linux/amd64` platforms.
The 0.3.0 release of CUDA-Q is available as a Docker image for `linux/amd64` platforms.

- `Docker image <https://catalog.ngc.nvidia.com/orgs/nvidia/teams/quantum/containers/cuda-quantum/tags>`__
- `Documentation <https://nvidia.github.io/cuda-quantum/0.3.0>`__
Expand Down
8 changes: 4 additions & 4 deletions pr-1493/_sources/specification/cudaq.rst.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Language Specification
***********************************

NVIDIA CUDA Quantum is a programming model in C++ for heterogeneous
NVIDIA CUDA-Q is a programming model in C++ for heterogeneous
quantum-classical computing. As such, the model provides primitive types, concepts, syntax, and
semantics that enable the integration of quantum processing units (QPUs) with
existing NVIDIA multi-node, multi-GPU parallel programming models and architectures.
The language is designed for C++. Extensions to other languages is fully supported
via appropriate bindings.

CUDA Quantum implementations are intended to be enabled via library-based language
CUDA-Q implementations are intended to be enabled via library-based language
extensions that define quantum code as callables in the classical language being extended.
These callables are meant to be compiled with standard compilers and runtimes
and run via quantum computer simulators or available physical quantum architectures. The
Expand All @@ -18,12 +18,12 @@ optimization and transformation for optimal execution on simulators and QPUs.

The rest of this document will detail all aspects of the language specification - its machine model,
primitive types and operations, core concepts and abstractions, and algorithmic primitives. All code
specification and demonstrative examples are provided in C++ (the native CUDA Quantum classical language).
specification and demonstrative examples are provided in C++ (the native CUDA-Q classical language).
Where possible, bindings for higher-level languages (e.g. Python) will be displayed to aid in understanding.

.. toctree::
:numbered:
:caption: CUDA Quantum
:caption: CUDA-Q
:maxdepth: 1

Machine Model <cudaq/machine_model.rst>
Expand Down
Loading

0 comments on commit 33fc849

Please sign in to comment.