From d45e9b25a78d44aca3c6bbd3f6704cee584d276a Mon Sep 17 00:00:00 2001 From: Isaac De Vlugt Date: Mon, 12 Aug 2024 15:17:10 -0400 Subject: [PATCH 01/11] installation instructions --- README.rst | 48 ++++++++++++++-------------------------- doc/dev/installation.rst | 21 +++++++++++++----- 2 files changed, 33 insertions(+), 36 deletions(-) diff --git a/README.rst b/README.rst index 3f9b6b19f6..9aff6340d1 100644 --- a/README.rst +++ b/README.rst @@ -77,27 +77,15 @@ 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 with installing PennyLane. Please follow our `installation instructions on pennylane.ai `_ 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 `_. + If those instructions did / do not work for you, then consider reading on. + To build Lightning plugins from source you can run .. code-block:: console @@ -222,19 +210,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 `_ (only the `cuStateVec `_ 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 `_. 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 `_. + If those instructions did / do not work for you, 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 +288,15 @@ 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 `_. 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 `_. + If those instructions did / do not work for you, 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 `_. @@ -366,12 +350,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 `_ (only the `cutensornet `_ 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. Install Lightning-Tensor from source ==================================== + Lightning-Qubit should be installed before Lightning-Tensor: .. code-block:: console diff --git a/doc/dev/installation.rst b/doc/dev/installation.rst index 54ac4cb73e..2269c34c6b 100644 --- a/doc/dev/installation.rst +++ b/doc/dev/installation.rst @@ -1,26 +1,37 @@ Installation ############ -Each device in the Lightning ecosystem is a separate Python package. Select the device below for installation instructions: +Lightning Qubit comes with installing PennyLane. Please follow our `installation instructions on pennylane.ai `_ to install PennyLane. + +In most cases, installing Lightning GPU and Lightning Kokkos can be done by following our `high-performance computing installation instructions `_. + +Install from source +********************** + +.. note:: + In cases where our `high-performance computing installation instructions `_ + do not suffice, please consider reading on. + +Select the device below for detailed source-installation instructions: .. title-card:: :name: Lightning Qubit - :description: Guidelines to installing and testing the Lightning Qubit device. + :description: Detailed guidelines to installing and testing the Lightning Qubit device. :link: ../lightning_qubit/installation.html .. title-card:: :name: Lightning GPU - :description: Guidelines to installing and testing the Lightning GPU device + :description: Detailed guidelines to installing and testing the Lightning GPU device :link: ../lightning_gpu/installation.html .. title-card:: :name: Lightning Kokkos - :description: Guidelines to installing and testing the Lightning Kokkos device + :description: Detailed guidelines to installing and testing the Lightning Kokkos device :link: ../lightning_kokkos/installation.html .. title-card:: :name: Lightning Tensor - :description: Guidelines to installing and testing the Lightning Tensor device + :description: Detailed guidelines to installing and testing the Lightning Tensor device :link: ../lightning_tensor/installation.html .. raw:: html From 8359e18181626540abcd6e41fc0216400333b7ac Mon Sep 17 00:00:00 2001 From: Isaac De Vlugt Date: Mon, 12 Aug 2024 15:22:14 -0400 Subject: [PATCH 02/11] minor --- doc/dev/installation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/dev/installation.rst b/doc/dev/installation.rst index 2269c34c6b..703010f8eb 100644 --- a/doc/dev/installation.rst +++ b/doc/dev/installation.rst @@ -9,7 +9,7 @@ Install from source ********************** .. note:: - In cases where our `high-performance computing installation instructions `_ + In cases where our `general installation instructions `_ do not suffice, please consider reading on. Select the device below for detailed source-installation instructions: From 36199f3e2a6ee2a0d18250a5d4bcfd272356404e Mon Sep 17 00:00:00 2001 From: Isaac De Vlugt Date: Mon, 12 Aug 2024 15:35:41 -0400 Subject: [PATCH 03/11] changelog --- .github/CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index b4b4bfb004..9e88edf17c 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -72,8 +72,11 @@ ### Documentation +* The installation instructions for all lightning plugins has been improved. + [(#848)](https://github.com/PennyLaneAI/pennylane-lightning/pull/848) + * Updated the README and added citation format for Lightning arxiv preprint. - [#818](https://github.com/PennyLaneAI/pennylane-lightning/pull/818) + [(#818)](https://github.com/PennyLaneAI/pennylane-lightning/pull/818) ### Bug fixes From 5ad3dfc5a052912fd9146bf27f539bf6e59bc98b Mon Sep 17 00:00:00 2001 From: ringo-but-quantum Date: Mon, 12 Aug 2024 19:36:26 +0000 Subject: [PATCH 04/11] Auto update version from '0.38.0-dev29' to '0.38.0-dev30' --- pennylane_lightning/core/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pennylane_lightning/core/_version.py b/pennylane_lightning/core/_version.py index 68d119cc24..2075a97a53 100644 --- a/pennylane_lightning/core/_version.py +++ b/pennylane_lightning/core/_version.py @@ -16,4 +16,4 @@ Version number (major.minor.patch[-label]) """ -__version__ = "0.38.0-dev29" +__version__ = "0.38.0-dev30" From f0efc42ad3d5f05a4aba5d55eaa016c4990ecda7 Mon Sep 17 00:00:00 2001 From: Isaac De Vlugt Date: Mon, 12 Aug 2024 15:38:35 -0400 Subject: [PATCH 05/11] minor --- .github/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index fb7f58bdfe..0eb1559530 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -75,7 +75,7 @@ ### Documentation -* The installation instructions for all lightning plugins has been improved. +* The installation instructions for all lightning plugins have been improved. [(#848)](https://github.com/PennyLaneAI/pennylane-lightning/pull/848) * Updated the README and added citation format for Lightning arxiv preprint. From 41cbe1edcdb06eceb0f3efec3679e45b0c1cba1c Mon Sep 17 00:00:00 2001 From: Isaac De Vlugt Date: Mon, 12 Aug 2024 15:43:35 -0400 Subject: [PATCH 06/11] minor --- pennylane_lightning/core/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pennylane_lightning/core/_version.py b/pennylane_lightning/core/_version.py index 2075a97a53..1e0e19350b 100644 --- a/pennylane_lightning/core/_version.py +++ b/pennylane_lightning/core/_version.py @@ -16,4 +16,4 @@ Version number (major.minor.patch[-label]) """ -__version__ = "0.38.0-dev30" +__version__ = "0.38.0-dev28" From 0cf28b38b668bf45037f923114d5448cc8426b6f Mon Sep 17 00:00:00 2001 From: Isaac De Vlugt Date: Mon, 12 Aug 2024 15:44:14 -0400 Subject: [PATCH 07/11] minor --- pennylane_lightning/core/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pennylane_lightning/core/_version.py b/pennylane_lightning/core/_version.py index 1e0e19350b..68d119cc24 100644 --- a/pennylane_lightning/core/_version.py +++ b/pennylane_lightning/core/_version.py @@ -16,4 +16,4 @@ Version number (major.minor.patch[-label]) """ -__version__ = "0.38.0-dev28" +__version__ = "0.38.0-dev29" From 0b4375db02b61d67051d6b53e05e4f420018797c Mon Sep 17 00:00:00 2001 From: ringo-but-quantum Date: Mon, 12 Aug 2024 19:45:05 +0000 Subject: [PATCH 08/11] Auto update version from '0.38.0-dev29' to '0.38.0-dev30' --- pennylane_lightning/core/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pennylane_lightning/core/_version.py b/pennylane_lightning/core/_version.py index 68d119cc24..2075a97a53 100644 --- a/pennylane_lightning/core/_version.py +++ b/pennylane_lightning/core/_version.py @@ -16,4 +16,4 @@ Version number (major.minor.patch[-label]) """ -__version__ = "0.38.0-dev29" +__version__ = "0.38.0-dev30" From e6fa4b386573410037a7395e0e4aac3d067705b7 Mon Sep 17 00:00:00 2001 From: Isaac De Vlugt <34751083+isaacdevlugt@users.noreply.github.com> Date: Wed, 14 Aug 2024 10:22:29 -0400 Subject: [PATCH 09/11] Apply suggestions from code review Co-authored-by: Thomas R. Bromley <49409390+trbromley@users.noreply.github.com> Co-authored-by: Josh Izaac --- README.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 9aff6340d1..2b9d4c544c 100644 --- a/README.rst +++ b/README.rst @@ -77,14 +77,15 @@ The following table summarizes the supported platforms and the primary installat Lightning-Qubit installation **************************** -Lightning Qubit comes with installing PennyLane. Please follow our `installation instructions on pennylane.ai `_ to install PennyLane. +Lightning-Qubit comes pre-installed with PennyLane. Please follow our `installation instructions `_ 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 `_. - If those instructions did / do not work for you, then consider reading on. + 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 @@ -217,7 +218,7 @@ 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 `_. - If those instructions did / do not work for you, then consider reading on. + 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: @@ -294,8 +295,9 @@ 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 `_. - If those instructions did / do not work for you, then consider reading on. + 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. From daa7925abc1d815289ef51f5b14c5462c0c83d65 Mon Sep 17 00:00:00 2001 From: ringo-but-quantum Date: Wed, 14 Aug 2024 14:22:44 +0000 Subject: [PATCH 10/11] Auto update version from '0.38.0-dev30' to '0.38.0-dev33' --- pennylane_lightning/core/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pennylane_lightning/core/_version.py b/pennylane_lightning/core/_version.py index 2075a97a53..281ac48074 100644 --- a/pennylane_lightning/core/_version.py +++ b/pennylane_lightning/core/_version.py @@ -16,4 +16,4 @@ Version number (major.minor.patch[-label]) """ -__version__ = "0.38.0-dev30" +__version__ = "0.38.0-dev33" From e32f68c0f3d370c676ae361f1d78a8305db97770 Mon Sep 17 00:00:00 2001 From: Isaac De Vlugt <34751083+isaacdevlugt@users.noreply.github.com> Date: Wed, 14 Aug 2024 16:48:43 -0400 Subject: [PATCH 11/11] Apply suggestions from code review --- README.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 1e9adb5712..9b52a96ac1 100644 --- a/README.rst +++ b/README.rst @@ -84,7 +84,7 @@ 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 `_. + 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 `_. 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 @@ -210,6 +210,7 @@ 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 `_. 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.