-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lightning installation instructions improvements #848
Changes from 12 commits
d45e9b2
8359e18
862e732
36199f3
1858e22
5ad3dfc
f0efc42
a103174
41cbe1e
0cf28b3
0b4375d
e6fa4b3
daa7925
5c5ed02
e32f68c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,27 +77,16 @@ The following table summarizes the supported platforms and the primary installat | |
Lightning-Qubit installation | ||
**************************** | ||
|
||
PyPI wheels (pip) | ||
================= | ||
|
||
Lightning plugins can be installed using ``pip`` as follows | ||
|
||
.. code-block:: console | ||
|
||
$ pip install pennylane-lightning | ||
|
||
The above command will install the Lightning-Qubit plugin (the default since it is most broadly supported). | ||
In order to install the Lightning-GPU and Lightning-Kokkos (OpenMP) backends, you can respectively use the following commands: | ||
|
||
.. code-block:: console | ||
|
||
$ pip install pennylane-lightning[gpu] | ||
$ pip install pennylane-lightning[kokkos] | ||
|
||
Lightning-Qubit comes pre-installed with PennyLane. Please follow our `installation instructions <https://pennylane.ai/install/#high-performance-computing-and-gpus>`_ to install PennyLane. | ||
|
||
Install from source | ||
=================== | ||
|
||
.. note:: | ||
|
||
The below contains instructions for installing Lightning Qubit ***from source***. For most cases, *this is not required* and one can simply use the `installation instructions at pennylane.ai/install <https://pennylane.ai/install>`_. | ||
isaacdevlugt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
If those instructions do not work for you, or you have a more complex build environment that requires building from source, then consider reading on. | ||
|
||
To build Lightning plugins from source you can run | ||
|
||
.. code-block:: console | ||
|
@@ -222,19 +211,15 @@ The C++ code can be tested with | |
Lightning-GPU installation | ||
************************** | ||
|
||
Lightning-GPU can be installed using ``pip``: | ||
|
||
.. code-block:: console | ||
|
||
pip install pennylane-lightning[gpu] | ||
|
||
Lightning-GPU requires CUDA 12 and the `cuQuantum SDK <https://developer.nvidia.com/cuquantum-sdk>`_ (only the `cuStateVec <https://docs.nvidia.com/cuda/cuquantum/latest/custatevec/index.html>`_ library is required). | ||
The SDK may be installed within the Python environment ``site-packages`` directory using ``pip`` or ``conda`` or the SDK library path appended to the ``LD_LIBRARY_PATH`` environment variable. | ||
Please see the `cuQuantum SDK`_ install guide for more information. | ||
For the majority of cases, Lightning-GPU can be installed by following our installation instructions at `pennylane.ai/install <https://pennylane.ai/install/#high-performance-computing-and-gpus>`_. | ||
|
||
Install Lightning-GPU from source | ||
================================= | ||
|
||
.. note:: | ||
The below contains instructions for installing Lightning-GPU ***from source***. For most cases, *this is not required* and one can simply use the `installation instructions at pennylane.ai/install <https://pennylane.ai/install/#high-performance-computing-and-gpus>`_. | ||
isaacdevlugt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
If those instructions do not work for you, or you have a more complex build environment that requires building from source, then consider reading on. | ||
|
||
To install Lightning-GPU from the package sources using the direct SDK path, Lightning-Qubit should be install before Lightning-GPU: | ||
|
||
.. code-block:: console | ||
|
@@ -304,15 +289,16 @@ The C++ code is tested with | |
Lightning-Kokkos installation | ||
***************************** | ||
|
||
On linux systems, ``lightning.kokkos`` with the OpenMP backend can be installed by providing the optional ``[kokkos]`` tag: | ||
|
||
.. code-block:: console | ||
|
||
$ pip install pennylane-lightning[kokkos] | ||
On most Linux systems, Lightning-Kokkos can be installed via Spack or Docker by following our installation instructions at `pennylane.ai/install <https://pennylane.ai/install/#high-performance-computing-and-gpus>`_. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. with lightning.kokkos, I believe there may be more cases than qubit/gpu where you need to install from source (e.g., if you want to use GPUs) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks! Does this sentence need to be modified 🤔? |
||
|
||
Install Lightning-Kokkos from source | ||
==================================== | ||
|
||
.. note:: | ||
|
||
The below contains instructions for installing Lightning-Kokkos ***from source***. For most cases, one can install Lightning-Kokkos via Spack or Docker by the `installation instructions at pennylane.ai/install <https://pennylane.ai/install/#high-performance-computing-and-gpus>`_. | ||
If those instructions do not work for you, or you have a more complex build environment that requires building from source, then consider reading on. | ||
|
||
As Kokkos enables support for many different HPC-targeted hardware platforms, ``lightning.kokkos`` can be built to support any of these platforms when building from source. | ||
|
||
We suggest first installing Kokkos with the wanted configuration following the instructions found in the `Kokkos documentation <https://kokkos.github.io/kokkos-core-wiki/building.html>`_. | ||
|
@@ -366,12 +352,14 @@ Note that ``THREADS`` backend is not recommended since `Kokkos does not guarante | |
|
||
Lightning-Tensor installation | ||
***************************** | ||
|
||
Lightning-Tensor requires CUDA 12 and the `cuQuantum SDK <https://developer.nvidia.com/cuquantum-sdk>`_ (only the `cutensornet <https://docs.nvidia.com/cuda/cuquantum/latest/cutensornet/index.html>`_ library is required). | ||
The SDK may be installed within the Python environment ``site-packages`` directory using ``pip`` or ``conda`` or the SDK library path appended to the ``LD_LIBRARY_PATH`` environment variable. | ||
Please see the `cuQuantum SDK <https://developer.nvidia.com/cuquantum-sdk>`_ install guide for more information. | ||
|
||
Install Lightning-Tensor from source | ||
==================================== | ||
|
||
Lightning-Qubit should be installed before Lightning-Tensor: | ||
|
||
.. code-block:: console | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,4 @@ | |
Version number (major.minor.patch[-label]) | ||
""" | ||
|
||
__version__ = "0.38.0-dev29" | ||
__version__ = "0.38.0-dev30" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of having installation instructions replicated in the
README
and docs, perhaps we could just make theREADME
instructions very briefly redirect to the docs installationThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the README instructions provide what's in the installation page (e.g.,
pennylane-lightning/doc/lightning_qubit/installation.rst
Line 1 in e32f68c