diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index fb008b06a..8d01e6b68 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -29,8 +29,8 @@ ### Improvements -* Optimize lightning.tensor by adding direct MPS sites data set with `qml.MPSPrep`. - [(#983)](https://github.com/PennyLaneAI/pennylane-lightning/pull/983) +* Add CUDA dependencies to Lightning GPU and Lightning Tensor Python wheels. + [(#1025)](https://github.com/PennyLaneAI/pennylane-lightning/pull/1025/) * Replace the `dummy_tensor_update` method with the `cutensornetStateCaptureMPS`API to ensure that further gates apply is allowed after the `cutensornetStateCompute` call. [(#1028)](https://github.com/PennyLaneAI/pennylane-lightning/pull/1028/) @@ -85,6 +85,9 @@ * The TOML files for the devices are updated to use the new schema for declaring device capabilities. [(#988)](https://github.com/PennyLaneAI/pennylane-lightning/pull/988) +* Optimize lightning.tensor by adding direct MPS sites data set with `qml.MPSPrep`. + [(#983)](https://github.com/PennyLaneAI/pennylane-lightning/pull/983) + * Unify excitation gates memory layout to row-major for both LGPU and LT. [(#959)](https://github.com/PennyLaneAI/pennylane-lightning/pull/959) diff --git a/.github/workflows/tests_lgpumpi_cpp.yml b/.github/workflows/tests_lgpumpi_cpp.yml index fdd17b0fb..1dfcd85b9 100644 --- a/.github/workflows/tests_lgpumpi_cpp.yml +++ b/.github/workflows/tests_lgpumpi_cpp.yml @@ -51,7 +51,7 @@ jobs: mpilib: ["mpich", "openmpi"] cuda_version_maj: ["12"] cuda_version_min: ["2"] - timeout-minutes: 30 + timeout-minutes: 35 steps: - name: Checkout diff --git a/pennylane_lightning/core/_version.py b/pennylane_lightning/core/_version.py index 30f24595a..df42670b0 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.40.0-dev42" +__version__ = "0.40.0-dev43" diff --git a/pennylane_lightning/core/src/simulators/lightning_gpu/CMakeLists.txt b/pennylane_lightning/core/src/simulators/lightning_gpu/CMakeLists.txt index f2fa03245..47446032d 100644 --- a/pennylane_lightning/core/src/simulators/lightning_gpu/CMakeLists.txt +++ b/pennylane_lightning/core/src/simulators/lightning_gpu/CMakeLists.txt @@ -63,7 +63,7 @@ set_property(TARGET ${PL_BACKEND} PROPERTY POSITION_INDEPENDENT_CODE ON) # To avoid DSO errors on platforms preferring static linkage, uncomment the following line: # string(REPLACE "libcudart_static.a" "libcudart.so" CUDA_SHARED_RT "${CUDA_LIBRARIES}") -set_target_properties(${PL_BACKEND} PROPERTIES INSTALL_RPATH "$ORIGIN/../cuquantum/lib:$ORIGIN/../cuquantum/lib64:$ORIGIN/") +set_target_properties(${PL_BACKEND} PROPERTIES INSTALL_RPATH "$ORIGIN/../cuquantum/lib:$ORIGIN/../cuquantum/lib64:$ORIGIN/../nvidia/cublas/lib:$ORIGIN/../nvidia/cusparse/lib:$ORIGIN/../nvidia/nvjitlink/lib:$ORIGIN/../nvidia/cuda_runtime/lib:$ORIGIN/") if(PL_DISABLE_CUDA_SAFETY) target_compile_options(${PL_BACKEND} INTERFACE $<$:-DCUDA_UNSAFE>) @@ -87,4 +87,4 @@ endforeach() if (BUILD_TESTS) enable_testing() add_subdirectory("tests") -endif() \ No newline at end of file +endif() diff --git a/pennylane_lightning/core/src/simulators/lightning_tensor/tncuda/CMakeLists.txt b/pennylane_lightning/core/src/simulators/lightning_tensor/tncuda/CMakeLists.txt index 72d396319..48f53da4b 100644 --- a/pennylane_lightning/core/src/simulators/lightning_tensor/tncuda/CMakeLists.txt +++ b/pennylane_lightning/core/src/simulators/lightning_tensor/tncuda/CMakeLists.txt @@ -51,7 +51,7 @@ set_property(TARGET ${PL_BACKEND} PROPERTY POSITION_INDEPENDENT_CODE ON) # To avoid DSO errors on platforms preferring static linkage, uncomment the following line: # string(REPLACE "libcudart_static.a" "libcudart.so" CUDA_SHARED_RT "${CUDA_LIBRARIES}") -set_target_properties(${PL_BACKEND} PROPERTIES INSTALL_RPATH "$ORIGIN/../cuquantum/lib:$ORIGIN/../cuquantum/lib64:$ORIGIN/") +set_target_properties(${PL_BACKEND} PROPERTIES INSTALL_RPATH "$ORIGIN/../cuquantum/lib:$ORIGIN/../cuquantum/lib64:$ORIGIN/../nvidia/cublas/lib:$ORIGIN/../nvidia/cusparse/lib:$ORIGIN/../cutensor/lib:$ORIGIN/../nvidia/nvjitlink/lib:$ORIGIN/../nvidia/cusolver/lib:$ORIGIN/../nvidia/cuda_runtime/lib:$ORIGIN/") if(PL_DISABLE_CUDA_SAFETY) target_compile_options(${PL_BACKEND} INTERFACE $<$:-DCUDA_UNSAFE>) diff --git a/requirements-dev.txt b/requirements-dev.txt index 138510b32..536b6f96b 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -16,8 +16,8 @@ isort==5.13.2 click==8.0.4 cmake jax[cpu]==0.4.28 -custatevec-cu12 -cutensornet-cu12 +custatevec-cu12; sys_platform == "linux" +cutensornet-cu12; sys_platform == "linux" pylint==2.7.4 scipy-openblas32>=0.3.26 git+https://github.com/PennyLaneAI/pennylane.git@master diff --git a/scripts/configure_pyproject_toml.py b/scripts/configure_pyproject_toml.py index 2a009863b..bad11976d 100755 --- a/scripts/configure_pyproject_toml.py +++ b/scripts/configure_pyproject_toml.py @@ -122,6 +122,20 @@ def parse_args(): "scipy-openblas32>=0.3.26", ] + if backend == "lightning_gpu": + dependencies += ["custatevec-cu12"] + + if backend == "lightning_tensor": + dependencies += ["cutensornet-cu12", "nvidia-cusolver-cu12"] + + if backend in ("lightning_gpu", "lightning_tensor"): + dependencies += [ + "nvidia-nvjitlink-cu12", + "nvidia-cusparse-cu12", + "nvidia-cublas-cu12", + "nvidia-cuda-runtime-cu12", + ] + if backend != "lightning_qubit": dependencies += ["pennylane_lightning==" + version]