Yes, as there is no Windows support for cuQuantum, lightning.gpu will not natively work on a Windows machine directly.
As a potential workaround, we can offer some suggestions, though we are not able to provide support for this type of environment, so how effective this will be may vary:
Using WSL, a Windows user may access a Linux runtime on a Windows machine.
NVIDIA and Windows provide some supports for a CUDA-capable WSL environment (see here and here for setup and configuration).
The above may allow your Windows machine to have access to a Linux runtime with CUDA, which may potentially allow installation and usage of a capable NVIDIA GPU with the lightning.gpu backend. You can create an environment and attempt to pip install as before, but within WSL.
We have no guarantees this will work, as lightning.gpu is strictly developed for Linux and HPC capable CUDA GPUs, but it may allow you to get the device working, provided your GPU is supported by the cuQuantum library. Feel free to let us know if the above works for you.
While running:
dev = qml.device(“lightning.gpu”, wires=22)
I get:
WARNING: INSUFFICIENT SUPPORT DETECTED FOR GPU DEVICE WITH lightning.gpu
!!! DEFAULTING TO CPU DEVICE lightning.qubit
Hi @_risto this error is reported normally if your CUDA installation is not correctly configured, or your device is not supported by the cuQuantum library. I would suggest first trying to install cuquantum explicitly with pip install cuquantum, and retrying the above through WSL. If there was any additional errors or warning reported please feel free to let us know.
Hi @_risto, as @CatalinaAlbornoz says, assuming WSL works you should not need to explore using either of the other options. However, if it does not work, and assuming you have a GPU capable of working with cuQuantum (of Volta generation or newer), then the other option is a Linux installation (dual-booting as you have stated).
While we cannot recommend going down this route, as it often requires a lot of steps to avoid any damage to your operating system (see here for more details), running Linux natively is the configuration we expect for using the GPU device.
I should add, that the GPU device was written mostly for high-performance computing (HPC) systems, as well as cloud systems, rather than consumer grade GPU hardware, so if it is an option to instead make use of a HPC system with GPUs, or to avail of a cloud GPU instance, that would be the better (and preferred) option to running it locally.