Skip to main content

The Lightning plugin ecosystem provides fast state-vector and tensor-network simulators written in C++.

PennyLane is a cross-platform Python library for quantum machine learning, automatic differentiation, and optimization of hybrid quantum-classical computations. PennyLane supports Python 3.11 and above.

Backends

PennyLane-Lightning high performance simulators include the following backends:

  • lightning.qubit: a fast state-vector simulator written in C++ with optional OpenMP additions and parallelized gate-level SIMD kernels.
  • 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. It also offers distributed state-vector simulation via MPI.
  • lightning.amdgpu: a state-vector simulator specifically for AMD GPUs. This device is an alias of our lightning.kokkos simulator.
  • lightning.gpu: a state-vector simulator based on the NVIDIA cuQuantum SDK. It notably implements a distributed state-vector simulator based on MPI.
  • lightning.tensor: a tensor-network simulator based on the NVIDIA cuQuantum SDK. The supported methods are Matrix Product State (MPS) and Exact Tensor Network (TN).

If you're not sure which simulator to use, check out our PennyLane Performance page.

Installation

The following table summarizes the supported platforms and the primary installation mode:

Linux x86 Linux ARM MacOS ARM Windows
Lightning-Qubit pip pip pip pip
Lightning-Kokkos (OMP) pip pip pip
Lightning-Kokkos (CUDA) source source
Lightning-Kokkos (HIP) source source
Lightning-Kokkos (MPI) source
Lightning-AMDGPU pip source
Lightning-GPU pip pip
Lightning-GPU (MPI) source
Lightning-Tensor pip pip

For Lightning-AMDGPU, pre-built wheels are available for MI300 series GPU for ROCm 7.0 and greater. For older architecture and ROCm versions, please install from source.

To install the latest stable version of these plugins, check out the PennyLane installation guide.

If you wish to install the latest development version, instructions for building from source are also available for each backend.

Docker support

Docker images for the various backends are found on the PennyLane Docker Hub page, where a detailed description about PennyLane Docker support can be found. Briefly, one can build the Docker Lightning images using:

git clone https://github.com/PennyLaneAI/pennylane-lightning.git
cd pennylane-lightning
docker build -f docker/Dockerfile --target ${TARGET} .

where ${TARGET} is one of the following:

  • wheel-lightning-qubit
  • wheel-lightning-gpu
  • wheel-lightning-kokkos-openmp
  • wheel-lightning-kokkos-cuda
  • wheel-lightning-kokkos-rocm

Contributing

We welcome contributions - simply fork the repository of this plugin, and then make a pull request containing your contribution. All contributors to this plugin will be listed as authors on the releases.
We also encourage bug reports, suggestions for new features and enhancements, and even links to cool projects or applications built on PennyLane.

Black & Pylint

If you contribute to the Python code, please mind the following. The Python code is formatted with the PEP 8 compliant opinionated formatter Black. We set a line width of a 100 characters. The Python code is statically analyzed with Pylint. We set up a pre-commit hook (see Git hooks) to run both of these on git commit. Please make your best effort to comply with black and pylint before using disabling pragmas (e.g. # pylint: disable=missing-function-docstring).

Authors

Lightning is the work of many contributors.

If you are using Lightning for research, please cite:

@misc{
    asadi2024,
    title={{Hybrid quantum programming with PennyLane Lightning on HPC platforms}},
    author={Ali Asadi and Amintor Dusko and Chae-Yeun Park and Vincent Michaud-Rioux and Isidor Schoch and Shuli Shu and Trevor Vincent and Lee James O'Riordan},
    year={2024},
    eprint={2403.02512},
    archivePrefix={arXiv},
    primaryClass={quant-ph},
    url={https://arxiv.org/abs/2403.02512},
}

Support

If you are having issues, please let us know by posting the issue on our Github issue tracker, or by asking a question in the forum.

License

The Lightning plugins are free and open source, released under the Apache License, Version 2.0.
The Lightning-GPU and Lightning-Tensor plugins make use of the NVIDIA cuQuantum SDK headers to enable the device bindings to PennyLane, which are held to their own respective license.

Acknowledgements

PennyLane Lightning makes use of the following libraries and tools, which are under their own respective licenses:

Release files for pennylane-lightning-gpu 0.45.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pennylane-lightning-gpu 0.45.0
File Size Uploaded
pennylane_lightning_gpu-0.45.0.tar.gz 771.1 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for pennylane-lightning-gpu 0.45.0
File
pennylane_lightning_gpu-0.45.0-cp314-cp314-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64 Details
pennylane_lightning_gpu-0.45.0-cp314-cp314-manylinux_2_28_aarch64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ ARM64 Details
pennylane_lightning_gpu-0.45.0-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details
pennylane_lightning_gpu-0.45.0-cp313-cp313-manylinux_2_28_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ ARM64 Details
pennylane_lightning_gpu-0.45.0-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details
pennylane_lightning_gpu-0.45.0-cp312-cp312-manylinux_2_28_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ ARM64 Details
pennylane_lightning_gpu-0.45.0-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details
pennylane_lightning_gpu-0.45.0-cp311-cp311-manylinux_2_28_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ ARM64 Details

Total release size: 7.8 MB

Release files / pennylane_lightning_gpu-0.45.0.tar.gz

Download URL pennylane_lightning_gpu-0.45.0.tar.gz
Size 771.1 kB
Tags Source
SHA-256 checksum
How to use checksums
59d578fe1b7929410c33651d6546171d23e2c9e0f91d4026beada993a2222944
BLAKE2b-256 checksum
How to use checksums
4c9627323e4dffd5b7eb8e533c2c119632fc048b5ce840dfe6e4957dc6bce572
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.13

Release files / pennylane_lightning_gpu-0.45.0-cp314-cp314-manylinux_2_28_x86_64.whl

Download URL pennylane_lightning_gpu-0.45.0-cp314-cp314-manylinux_2_28_x86_64.whl
Size 924.5 kB
Tags CPython 3.14 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
0335f9321497f44428bf7c21daff3a354359d8dff3f103037be59413acd5e073
BLAKE2b-256 checksum
How to use checksums
1ef52eca7305e84e4ec8690d15eb65528241360c59b0a9a672dba6a72043f1d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.13

Release files / pennylane_lightning_gpu-0.45.0-cp314-cp314-manylinux_2_28_aarch64.whl

Download URL pennylane_lightning_gpu-0.45.0-cp314-cp314-manylinux_2_28_aarch64.whl
Size 840.9 kB
Tags CPython 3.14 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
0c4aeb6cd3604f80390dff6bb5a89b8cd848b6cb04916864356b6b37d092a71d
BLAKE2b-256 checksum
How to use checksums
e87d70e57a5b42ffe6e5f7c477b433ccc95201c2b5d065caff7a547b136c0280
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.13

Release files / pennylane_lightning_gpu-0.45.0-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL pennylane_lightning_gpu-0.45.0-cp313-cp313-manylinux_2_28_x86_64.whl
Size 924.5 kB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
7f5cea2fb03fe219a82b837e221a6be93f0220e5cd7f882a130446c456b6b525
BLAKE2b-256 checksum
How to use checksums
7b159cc69f9285a16129696d690bf11fead798bb8f972a78c7916560e4053e06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.13

Release files / pennylane_lightning_gpu-0.45.0-cp313-cp313-manylinux_2_28_aarch64.whl

Download URL pennylane_lightning_gpu-0.45.0-cp313-cp313-manylinux_2_28_aarch64.whl
Size 840.4 kB
Tags CPython 3.13 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
b382b02ae4b7876e06d4e2dcbe6e704899c9cf20f29158e4e84836e285a688c5
BLAKE2b-256 checksum
How to use checksums
e3ad2eb867ec3bda91950cd7fae4ff29456d461429621bbd234d6ce652612a55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.13

Release files / pennylane_lightning_gpu-0.45.0-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL pennylane_lightning_gpu-0.45.0-cp312-cp312-manylinux_2_28_x86_64.whl
Size 924.6 kB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
0d23463770dacc3055b12c10cae194cc6ab991d4a28aa31433093d0424f8b5b8
BLAKE2b-256 checksum
How to use checksums
9805fc9e8a00e604ccdea5b0f83acd75cb3f0112f0dbbe506293732f1f87c08d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.13

Release files / pennylane_lightning_gpu-0.45.0-cp312-cp312-manylinux_2_28_aarch64.whl

Download URL pennylane_lightning_gpu-0.45.0-cp312-cp312-manylinux_2_28_aarch64.whl
Size 840.4 kB
Tags CPython 3.12 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
3fa52f6b04806064c51e085d0a2a322c66770ab1f344d3443838436b82bc177b
BLAKE2b-256 checksum
How to use checksums
41022e34305da68e23af05bf8bf7d58ccb025718bad9fbf3fe8b70dd278102f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.13

Release files / pennylane_lightning_gpu-0.45.0-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL pennylane_lightning_gpu-0.45.0-cp311-cp311-manylinux_2_28_x86_64.whl
Size 924.9 kB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
8fa158507144efa9f4e7c202e583a677c034eea303b8710d3152aef2e400b680
BLAKE2b-256 checksum
How to use checksums
40218dcb8742a2d4019af594b0cf92f353717b47b52a3a10e9796bb8cf791328
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.13

Release files / pennylane_lightning_gpu-0.45.0-cp311-cp311-manylinux_2_28_aarch64.whl

Download URL pennylane_lightning_gpu-0.45.0-cp311-cp311-manylinux_2_28_aarch64.whl
Size 841.3 kB
Tags CPython 3.11 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
82c82deaa06ca5137a2f62dcf6df6b4dc8d3aabcb245997eb2811957958370cb
BLAKE2b-256 checksum
How to use checksums
98c11da030c7cca87c437146fb489361053f29bee05c52f04bb70baef0ea7f60
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.13
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page