PennyLane-Lightning plugin
Project description
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 ourlightning.kokkossimulator.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-qubitwheel-lightning-gpuwheel-lightning-kokkos-openmpwheel-lightning-kokkos-cudawheel-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
- Source Code: https://github.com/PennyLaneAI/pennylane-lightning
- Issue Tracker: https://github.com/PennyLaneAI/pennylane-lightning/issues
- PennyLane Forum: https://discuss.pennylane.ai
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:
- nanobind: https://github.com/wjakob/nanobind
- Kokkos Core: https://github.com/kokkos/kokkos
- NVIDIA cuQuantum: https://developer.nvidia.com/cuquantum-sdk
- scipy-openblas32: https://pypi.org/project/scipy-openblas32/
- Xanadu JET: https://github.com/XanaduAI/jet
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pennylane_lightning-0.44.0.tar.gz.
File metadata
- Download URL: pennylane_lightning-0.44.0.tar.gz
- Upload date:
- Size: 791.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d7383ab8b53af17d14f5b9985afa867a0cec10d224bd068259d824eba812e7a
|
|
| MD5 |
2f8a5ac9a9cffe227ee99b98793d3862
|
|
| BLAKE2b-256 |
ba41ce4d7728b0faf7c77c4e18e2bca77b6ba52c3cc43f5a321ea6596c963e9e
|
File details
Details for the file pennylane_lightning-0.44.0-py3-none-any.whl.
File metadata
- Download URL: pennylane_lightning-0.44.0-py3-none-any.whl
- Upload date:
- Size: 1.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5a257f89c623565df68f987437de380495299b1271b935e1269717198668e71
|
|
| MD5 |
6be1769d7e63614f05fd9ff5a18575a6
|
|
| BLAKE2b-256 |
cfd1b681ae8546b264a4c9d999b8e57a3291cbf38edf39194d5416fbae19f8af
|
File details
Details for the file pennylane_lightning-0.44.0-cp314-cp314-win_amd64.whl.
File metadata
- Download URL: pennylane_lightning-0.44.0-cp314-cp314-win_amd64.whl
- Upload date:
- Size: 5.4 MB
- Tags: CPython 3.14, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3249c2e9ded832a6803970a1af7f88b87496eca15d8a4938b8302b35ee39fe5
|
|
| MD5 |
c61217cbd2204f45a7d6f902e18523f0
|
|
| BLAKE2b-256 |
27355650295cff51a2d0b68bf2da5af5b84149a7e5d1122560afbac70d3ff0eb
|
File details
Details for the file pennylane_lightning-0.44.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pennylane_lightning-0.44.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.5 MB
- Tags: CPython 3.14, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dbe93215141a224b0a3d9cae28ca4b5827720a714a5e570ec7427488ff3c9b5d
|
|
| MD5 |
b3f6b19abd8e2a2290e81092569cd935
|
|
| BLAKE2b-256 |
2203152da2ee85eddf4bf520a9a25af4ee7bdd42479e25e294f378001ce35958
|
File details
Details for the file pennylane_lightning-0.44.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.
File metadata
- Download URL: pennylane_lightning-0.44.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
- Upload date:
- Size: 2.0 MB
- Tags: CPython 3.14, manylinux: glibc 2.27+ ARM64, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56e233fae5f5d0c6341ca2c2e34c55ffaf73896388abe07d8d03b5ec61c78d23
|
|
| MD5 |
13acf85218c62131c1a8f34bd2ce8363
|
|
| BLAKE2b-256 |
5af31e89da7d068dc738bc34ec6d2f9a9526899fc4b868f7f0ebaf283aa1786d
|
File details
Details for the file pennylane_lightning-0.44.0-cp314-cp314-macosx_13_0_arm64.whl.
File metadata
- Download URL: pennylane_lightning-0.44.0-cp314-cp314-macosx_13_0_arm64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.14, macOS 13.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
728e0f35806b0bd0359b408e672e28c5c6c5f0b93b45672bf6a8fd13c2d6eb27
|
|
| MD5 |
7fcbba970c415950a53d32c5245fc919
|
|
| BLAKE2b-256 |
402317befdcabe5d8d0dc3cdd9b581cf789a878dd4296a500006399cd5806da7
|
File details
Details for the file pennylane_lightning-0.44.0-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: pennylane_lightning-0.44.0-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 5.4 MB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c37449a9866be8a8b43e26db928cbd61c33399ac0fce2657c76f0bebb1928f2
|
|
| MD5 |
33e0f658bc040e9f25921e4a03c01dbb
|
|
| BLAKE2b-256 |
f67d8fe12f18795fa22240582a891f0cbc76249e63ef71fc003a47525ba426c2
|
File details
Details for the file pennylane_lightning-0.44.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pennylane_lightning-0.44.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.5 MB
- Tags: CPython 3.13, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dfad857acc2bd9320f904c4a7029d07e43f9077e9a666110318553e54af23d85
|
|
| MD5 |
f4a190fa96e892e7f60a1eb47b033e6f
|
|
| BLAKE2b-256 |
1021197559f70fe3e86a2e4893828298105a0de7cf29c16999b2f6c732b897a6
|
File details
Details for the file pennylane_lightning-0.44.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.
File metadata
- Download URL: pennylane_lightning-0.44.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
- Upload date:
- Size: 2.0 MB
- Tags: CPython 3.13, manylinux: glibc 2.27+ ARM64, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac87864e38cb2f6113e841bac78ef679fd9be8d8759b2f55408c42c4f8fb8f21
|
|
| MD5 |
f6791957b234a85e0d22a47ea11016f5
|
|
| BLAKE2b-256 |
155394d0d59d35eec1978ada60229dd294179e3a94dbfd5956c12bb9e9f77011
|
File details
Details for the file pennylane_lightning-0.44.0-cp313-cp313-macosx_13_0_arm64.whl.
File metadata
- Download URL: pennylane_lightning-0.44.0-cp313-cp313-macosx_13_0_arm64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.13, macOS 13.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e87c20e3658b6e2c6d013cd881c95b1a82d05a2805d78e1193e14ed3a735b16
|
|
| MD5 |
c2a0bf0cdea77a061c0eef51e710825f
|
|
| BLAKE2b-256 |
e2f1d4d50c4ad286122f78323c02807ebe5353f8247c07b9a7b810ffc69b542a
|
File details
Details for the file pennylane_lightning-0.44.0-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: pennylane_lightning-0.44.0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 5.4 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26e7d79a816da3a659ceba554999d1781cc1829699f544ff733cc3dbe2c6f83c
|
|
| MD5 |
5ee5cda3b3fdc7059634311a2ae9de3d
|
|
| BLAKE2b-256 |
3c8a418d1a9f8e292d322a66eac83c8e4b4f48e01f24e629b9b496689412cc0f
|
File details
Details for the file pennylane_lightning-0.44.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pennylane_lightning-0.44.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.5 MB
- Tags: CPython 3.12, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e2030fcebea3cfc7e8d6fc4a5aa821704ffcc15ed4ba76bf653facb7d8ebe39
|
|
| MD5 |
0c2daf9376f8edc092f1058d47e3bd4b
|
|
| BLAKE2b-256 |
cd9830c3164b620f89dfec71c05359a1025e15d695a42dbdbc6350f664fc6b58
|
File details
Details for the file pennylane_lightning-0.44.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.
File metadata
- Download URL: pennylane_lightning-0.44.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
- Upload date:
- Size: 2.0 MB
- Tags: CPython 3.12, manylinux: glibc 2.27+ ARM64, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aae687962962f2d2a8620740c7b0eb2de16aba40f080bec64519652e3a25fba3
|
|
| MD5 |
4460684813033bafc000b1f3b157ea83
|
|
| BLAKE2b-256 |
3522dfb5af72c9bf9f85bdf114be4204369894a2b9d9d205ed180df422ff93a0
|
File details
Details for the file pennylane_lightning-0.44.0-cp312-cp312-macosx_13_0_arm64.whl.
File metadata
- Download URL: pennylane_lightning-0.44.0-cp312-cp312-macosx_13_0_arm64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.12, macOS 13.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89d84f6b24675f011695d7be4a6dbe7821224f5f96747413367135b5c53ae414
|
|
| MD5 |
ebc61e0fe114ae57c54429464889130c
|
|
| BLAKE2b-256 |
d476c2339362329f468981b4ac24d59982ab06e9a3c4561928d0a4c1bd0d4720
|
File details
Details for the file pennylane_lightning-0.44.0-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: pennylane_lightning-0.44.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 5.4 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6809ea3a0982c478b1434aaf0e78ca19bdafbddf27ea9ed04378cde5494fe1a7
|
|
| MD5 |
d4661af2d4900a93a30102e78c408214
|
|
| BLAKE2b-256 |
272331695ff221cb7ff4574c9567ce24d431962c42d4692c48c037a048cdb56d
|
File details
Details for the file pennylane_lightning-0.44.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pennylane_lightning-0.44.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.5 MB
- Tags: CPython 3.11, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a1cb8827a05e58596f632fb02e014392d92c38a2e471817cd0cb826cb995305
|
|
| MD5 |
868fb126b7cb588ef2c85094055289ce
|
|
| BLAKE2b-256 |
2571703d4df1fd010fab517337ff12403ee4d040b48d45663c61145e80a36f06
|
File details
Details for the file pennylane_lightning-0.44.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.
File metadata
- Download URL: pennylane_lightning-0.44.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
- Upload date:
- Size: 2.0 MB
- Tags: CPython 3.11, manylinux: glibc 2.27+ ARM64, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
048df8e23a62bde4046162c1229ecfdd8cb7f17b8a16cb5a7c6f68280aff024f
|
|
| MD5 |
7a2c6ea92c04ce78f606c11dcd2e6e6d
|
|
| BLAKE2b-256 |
c253728b93e80ef6a968d715c11c0de3ee2953cc934182a4d8de454aa6d5eb3e
|
File details
Details for the file pennylane_lightning-0.44.0-cp311-cp311-macosx_13_0_arm64.whl.
File metadata
- Download URL: pennylane_lightning-0.44.0-cp311-cp311-macosx_13_0_arm64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.11, macOS 13.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a492cb23d631b83f1493e1eb3ff0437e9e29c41921b0ed41d4cff7f016b98b8
|
|
| MD5 |
56f2c106ff8bf485b9505d3e2af02041
|
|
| BLAKE2b-256 |
027041e014c3fa7c94839da771acd6d293e597c5ee493ef91834bcfe7bf8743a
|