Hi @LittleFive
Thanks for your interest in using lightning.gpu
. There are a few things worth noting for use here:
- Firstly, you can try upgrading the
lightning.gpu
installed package aspython -m pip install pennylane pennylane-lightning pennylane-lightning-gpu --upgrade
to ensure the version is the most recent (v0.33.1 as of writing). Once this is installed and up to date, you can trypip install custatevec-cu11
to bring in the CUDA 11 variant of the NVIDIA cuQuantum custatevec library. lightning.gpu
requires a CUDA compute capability of SM7.0 or newer (Volta era and newer) to work. This is a hard requirement from the NVIDIA cuQuantum SDK (specifically the custatevec library), as the library expects data-center/HPC grade hardware to run. I cannot tell which GPUs you have installed, but it may be possible they are not supported by the library. You can inspect the compute capabilities for a variety of NVIDIA devices here- Assuming a supported GPU, the
lightning.gpu
simulator requires a minimum CUDA version of 11.5 runtime libraries to operate. I see your version on the platform is 11.4. If you can upgrade the installed drivers and SDK to 11.5 at a minimum (11.8 preferred), the libraries will work as expected. If you cannot upgrade the SDK, you can attempt to installnvidia-cusparse-cu11
,nvidia-cublas-cu11
, andnvidia-cuda-runtime-cu11
to your python virtualenv, and these may allow you to operate, assuming the installed hardware driver is of a supported version. - If your hardware isn’t supported by NVIDIA cuQuantum, but you can install a CUDA 12 toolchain, you can try to build our other HPC device
lightning.kokkos
, with instructions here. This require some manual steps to build from source, but may get you GPU support, depending on your hardware type. We require CUDA 12 here as the compiler toolchain for CUDA 11 does not allow some of the newer features we added. - If none of the above are valid options, you can swap
default.qubit
for our C++ backed CPU simulatorslightning.qubit
and our CPU-variant oflightning.kokkos
. When you install PennyLane aspip install pennylane
you getlightning.qubit
too, so this should work directly. For the OpenMP variant oflightning.kokkos
you can runpip install pennylane-lightning[kokkos]
and the package will be installed for you.
Hopefully the above steps help you get running with one of the above devices. If not, feel free to let us know and we can try to help out.