From 62ebadf83541c86537113c9925f637e67dc18e5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Alfredo=20Nu=C3=B1ez=20Meneses?= Date: Thu, 9 Jan 2025 23:32:34 +0000 Subject: [PATCH] Shuli's comments --- README.rst | 20 ++++++++------------ doc/lightning_gpu/device.rst | 2 +- doc/lightning_tensor/device.rst | 2 +- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/README.rst b/README.rst index 1efe8c498..714d4a4be 100644 --- a/README.rst +++ b/README.rst @@ -47,7 +47,7 @@ Features PennyLane-Lightning high performance simulators include the following backends: * ``lightning.qubit``: a fast state-vector simulator written in C++. -* ``lightning.gpu``: a state-vector simulator based on the `NVIDIA cuQuantum SDK `_. It notably implements a distributed state-vector simulator based on MPI. +* ``lightning.gpu``: a state-vector simulator based on the `NVIDIA cuQuantum SDK `_. It notably implements a distributed state-vector simulator based on `MPI `_. * ``lightning.kokkos``: a state-vector simulator written with `Kokkos `_. It can exploit the inherent parallelism of modern processing units supporting the `OpenMP `_, `CUDA `_ or `HIP `_ programming models. * ``lightning.tensor``: a tensor network simulator based on the `NVIDIA cuQuantum SDK `_ (requires NVIDIA GPUs with SM 7.0 or greater). The supported methods are Matrix Product State (MPS) and Exact Tensor Network (ExactTN). @@ -258,9 +258,9 @@ Install Lightning-GPU with MPI .. note:: - - **Lightning-Qubit**, ``CUDA-aware MPI`` **and** ``custatevec`` **are installed**. - - **The environment variable** ``CUQUANTUM_SDK`` **is set properly**. - - ``path/to/libmpi.so`` **is added to** ``LD_LIBRARY_PATH``. + - Lightning-Qubit, ``CUDA-aware MPI`` and ``custatevec`` are installed. + - The environment variable ``CUQUANTUM_SDK`` is set properly. + - ``path/to/libmpi.so`` is added to ``LD_LIBRARY_PATH``. Then Lightning-GPU with MPI support can be installed in the *editable* mode: @@ -283,11 +283,7 @@ The C++ code can be tested with: .. code-block:: bash - rm -rf ./BuildTests - cmake . -BBuildTests -DBUILD_TESTS=1 -DBUILD_TESTS=1 -DENABLE_MPI=ON -DCUQUANTUM_SDK= - cmake --build ./BuildTests --verbose - cd ./BuildTests - for file in *runner_mpi ; do mpirun -np 2 ./BuildTests/$file ; done; + PL_BACKEND="lightning_gpu" make test-cpp-mpi .. installation_LGPU-end-inclusion-marker-do-not-remove @@ -316,12 +312,12 @@ Install Kokkos (Optional) We suggest first installing Kokkos with the wanted configuration following the instructions found in the `Kokkos documentation `_. For example, the following will build Kokkos for NVIDIA A100 cards -Download the `Kokkos code `_. Lightning Kokkos was tested with Kokkos version <= 4.5.0 +Download the `Kokkos code `_. Lightning-Kokkos was tested with Kokkos version <= 4.5.0 .. code-block:: bash # Replace x, y, and z by the correct version - wget https://github.com/kokkos/kokkos/archive/refs/tags/4.x.yz.tar.gz + wget https://github.com/kokkos/kokkos/archive/refs/tags/4.x.y.z.tar.gz tar -xvf 4.x.y.z.tar.gz cd kokkos-4.x.y.z @@ -345,7 +341,7 @@ Build Kokkos for NVIDIA A100 cards (``SM80`` architecture), and append the insta export CMAKE_PREFIX_PATH=/opt/kokkos/4.x.y.z/AMPERE80:$CMAKE_PREFIX_PATH -Note that the C++20 standard is required (enabled via the ``-DCMAKE_CXX_STANDARD=20`` option), hence CUDA v12 is required for the CUDA backend. +Note that the C++20 standard is required (enabled via the ``-DCMAKE_CXX_STANDARD=20`` option), hence CUDA 12 is required for the CUDA backend. Install Lightning-Kokkos ^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/doc/lightning_gpu/device.rst b/doc/lightning_gpu/device.rst index bac07b77b..6eccb961d 100644 --- a/doc/lightning_gpu/device.rst +++ b/doc/lightning_gpu/device.rst @@ -282,4 +282,4 @@ To enable the memory-optimized adjoint method with MPI support, ``batch_obs`` sh For the adjoint method, each MPI process will provide the overall simulation results. .. note:: - The observable ``Projector``` does not have support with the multi-GPU backend. + The observable ``Projector`` does not have support with the multi-GPU backend. diff --git a/doc/lightning_tensor/device.rst b/doc/lightning_tensor/device.rst index 383f852fd..f42aabbed 100644 --- a/doc/lightning_tensor/device.rst +++ b/doc/lightning_tensor/device.rst @@ -65,7 +65,7 @@ Note that ``lightning.tensor`` cannot be cleaned up like other state-vector devi Operations and observables support ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The ``lightning.tensor`` supports all gate operations supported by PennyLane, with the exception of :class:`~pennylane.StatePrep`, which is *not supported* by the *Exact Tensor Network* method. +The ``lightning.tensor`` supports all gate operations supported by PennyLane, with the exception of :class:`~pennylane.StatePrep`, which is **not supported** by the **Exact Tensor Network** method. **Supported operations:**