Skip to main content

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 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:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pennylane_lightning_kokkos-0.44.0.tar.gz (764.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pennylane_lightning_kokkos-0.44.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pennylane_lightning_kokkos-0.44.0-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (4.3 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

pennylane_lightning_kokkos-0.44.0-cp314-cp314-macosx_13_0_arm64.whl (1.0 MB view details)

Uploaded CPython 3.14macOS 13.0+ ARM64

pennylane_lightning_kokkos-0.44.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pennylane_lightning_kokkos-0.44.0-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (4.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

pennylane_lightning_kokkos-0.44.0-cp313-cp313-macosx_13_0_arm64.whl (1.0 MB view details)

Uploaded CPython 3.13macOS 13.0+ ARM64

pennylane_lightning_kokkos-0.44.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pennylane_lightning_kokkos-0.44.0-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (4.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

pennylane_lightning_kokkos-0.44.0-cp312-cp312-macosx_13_0_arm64.whl (1.0 MB view details)

Uploaded CPython 3.12macOS 13.0+ ARM64

pennylane_lightning_kokkos-0.44.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pennylane_lightning_kokkos-0.44.0-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (4.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

pennylane_lightning_kokkos-0.44.0-cp311-cp311-macosx_13_0_arm64.whl (1.0 MB view details)

Uploaded CPython 3.11macOS 13.0+ ARM64

File details

Details for the file pennylane_lightning_kokkos-0.44.0.tar.gz.

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.44.0.tar.gz
Algorithm Hash digest
SHA256 f5461b48f77b269509b35eacb9dba463acf119cdddda4f0d95e996c68f8bea11
MD5 f66b9428c6da59f088536e9f88e4ff64
BLAKE2b-256 1b057082d5ae829dba036f21d1d11d5fd9d01845d2ccc50f745fa5a3f9fa93e5

See more details on using hashes here.

File details

Details for the file pennylane_lightning_kokkos-0.44.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.44.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 58008eb4e4ae2cb129f00d9f0025c8d51d4469ab960c671b7c683a50070a088a
MD5 d8b73cb11051b58330266599c963bbe2
BLAKE2b-256 2fc08c7b3d0c8425079a7ad6b63d4c1597d7723386c191e3a3957a8a8acf769b

See more details on using hashes here.

File details

Details for the file pennylane_lightning_kokkos-0.44.0-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.44.0-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 835b293bfb27d4c002c6b19f0626f7007bf34b32b2fd6d1e25713db3ec987fe4
MD5 77d4f537e2275739dc0349f0e85924b8
BLAKE2b-256 3e82d4190fb22374c85d85cab8e235c95b12931398b1eda1f1fffdd0a35fd50e

See more details on using hashes here.

File details

Details for the file pennylane_lightning_kokkos-0.44.0-cp314-cp314-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.44.0-cp314-cp314-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 6acf46d268782bc13f0bb74baa43ee5d5ad8267003cc831e85902aa7270711b7
MD5 3ef5cbf1c9c1644a4440bc6019e950de
BLAKE2b-256 0c5d241d4e9c820287e70bc06c76c4acad4b87266d2953c3783093a6db8133b9

See more details on using hashes here.

File details

Details for the file pennylane_lightning_kokkos-0.44.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.44.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 22398edb20e8af0857d0861a1476717d66afd31d1b965e8acbfe7244ba3532c4
MD5 e3387bda5c676a94ca703d3ae8031ab4
BLAKE2b-256 515d7ebe7de017824360c1aef7ddad6e4320e8c6e9dd43e9ff29fbbebc647dd8

See more details on using hashes here.

File details

Details for the file pennylane_lightning_kokkos-0.44.0-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.44.0-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 8e63d2c120d57e737bd5c221b5a0a9443a5510a16fda8bb2c4d0548f5216b79f
MD5 696defae7501c725eeece0805f89aa13
BLAKE2b-256 50deb4d073bd8a861bc7480b0013e39021f193e0edcc48a888ddac7306065219

See more details on using hashes here.

File details

Details for the file pennylane_lightning_kokkos-0.44.0-cp313-cp313-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.44.0-cp313-cp313-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 883b4139d2d20436b2646342dd09d388172f01c60d7ffae654444f654f6c9137
MD5 c6874fa51ae1ee0d1a596a72184ae79b
BLAKE2b-256 2a23c937848c654141e7b4dbd16dc1c710559d097669a0f9d7374865ce04c4c0

See more details on using hashes here.

File details

Details for the file pennylane_lightning_kokkos-0.44.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.44.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b1ed9dad3bc34e2b16393368321ece0e4f51900dcd6b5e6fd171527e4987077e
MD5 42350df6baf20c3c9350f293fa5fe632
BLAKE2b-256 2d489962f912ae7c80c737453b0e7ef53dc210aec2be17b1ee546bbb86eebf17

See more details on using hashes here.

File details

Details for the file pennylane_lightning_kokkos-0.44.0-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.44.0-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 6523735ceccd95a64d94d28da6f9f4f5554c473d50d987555a282777c139c237
MD5 3e74b2a058d8f9434f55288ea549bc23
BLAKE2b-256 31480a1933064436eba69eb347c4f77077e0dcfbb03729a1c4066b2a9fe28324

See more details on using hashes here.

File details

Details for the file pennylane_lightning_kokkos-0.44.0-cp312-cp312-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.44.0-cp312-cp312-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 f03326617241480903f339c5cdf00c4b9be51769c8360dd00d4a295258fb8ac9
MD5 552c8f3573c1548eed7e78211ff399ce
BLAKE2b-256 041597df26af9cc35b4a1bee61b16a0ad3992d4e1b3ca0547ba3fc543cb25c73

See more details on using hashes here.

File details

Details for the file pennylane_lightning_kokkos-0.44.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.44.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ebd2adffea757a079d1d830c8d6b1bde1a2bd38317567c33178a70b93ee3b612
MD5 46697d96430da087142318f05f246aaf
BLAKE2b-256 468c35bd9a232295950fa603c34925394ac9681c3337ae337096699c9c14c194

See more details on using hashes here.

File details

Details for the file pennylane_lightning_kokkos-0.44.0-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.44.0-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 5d9a867627ddbd4f0d585f88b57e4a96a6d705aef877f133a2ea2ba460ee9adb
MD5 c633525a71c6e82538b0ca80b7e6399e
BLAKE2b-256 d1d1f09951b30c4a3f937d82506da3fb508fc853b3544888ddcb900a92ec03ec

See more details on using hashes here.

File details

Details for the file pennylane_lightning_kokkos-0.44.0-cp311-cp311-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.44.0-cp311-cp311-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 e24deac50ec03f2057a9f61c2b800b3ac0b84be7015852c6a6142b071d4cc199
MD5 f3117804b82c3714bf46198c93558c3a
BLAKE2b-256 a83f797d78c33ac94bccb6c25648b1f79426ca440a468c2f6a08ede6a1839bd7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page