Lightning.kokkos still a valid plug-in?


I just wanted to confirm if lightning.kokkos is still an active plug-in for pennylane.

I see the blog-post with installation but it is not listed on the plugin page.

Blog-post: PennyLane goes Kokkos: A novel hardware-agnostic parallel backend for quantum simulations | PennyLane Blog

Official Plug-In List: Plugins and ecosystem | PennyLane

Looking forward to getting some clarity over its current status. Thank you! :slight_smile:

Hi @kamzam,

Yes! lightning.kokkos is still an active plugin. It’s not yet on the PennyLane Install page but it is indeed an active plugin.

You can install it by running pip install pennylane-lightning-kokkos

Let me know if you have any additional questions!

Edit: If you just run pip install pennylane-lightning-kokkos it will work, but only with CPU (OpenMP). To have it working with GPU devices, for example, you would need to build from scratch so the compilation can configure everything regarding your local hardware. The full installation instructions are here in the documentation.


Hi @CatalinaAlbornoz,

Thank you for confirming, I will install it and reach out again if I face issues with it.

Hi @CatalinaAlbornoz ,

Doing a pip install using Anaconda is giving me the following error.

Can you kindly identify what might be causing it and a solution for successful installation.

Hey @kamzam , could you please include the things above where the screenshot cuts off? :sweat_smile: We’re missing parts of the output that would be helpful here.

Hi @Ivana_at_Xanadu,

PFA complete error output on pip install command for kokkos.

Environment Information: Basic python 3.8 with pennylane-lightning before running pip command for kokkos. Just in case that information helps as well.

kokkos_pip_install_error.txt (9.7 KB)

Hi @kamzam

Unfortunately we do not currently release prebuilt wheels for Lightning Kokkos on Windows. If you have access to WSL on Windows, you can install the pre-built Linux versions with OpenMP support directly using pip.

If you wish to manually build the project under Windows, I suggest reading the installation guide here. Since Windows natively provides a much older version of OpenMP than Linux, you may have trouble compiling with the default backend, in which case you can attempt to use the Kokkos threads backend with -DKokkos_ENABLE_THREADS=1. Though, once again, this may not be fully supported under Windows or by Kokkos as well as the OpenMP backend.

Otherwise, if the above fails, you may be best to use the lightning.qubit device, as this will be guaranteed to work under Windows.

Hope this helps.

1 Like