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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

pennylane_lightning_kokkos-0.46.0.dev15-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (4.6 MB view details)

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

pennylane_lightning_kokkos-0.46.0.dev15-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (4.3 MB view details)

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

pennylane_lightning_kokkos-0.46.0.dev15-cp314-cp314-macosx_15_0_arm64.whl (990.7 kB view details)

Uploaded CPython 3.14macOS 15.0+ ARM64

pennylane_lightning_kokkos-0.46.0.dev15-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (4.6 MB view details)

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

pennylane_lightning_kokkos-0.46.0.dev15-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (4.3 MB view details)

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

pennylane_lightning_kokkos-0.46.0.dev15-cp313-cp313-macosx_15_0_arm64.whl (990.5 kB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

pennylane_lightning_kokkos-0.46.0.dev15-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (4.6 MB view details)

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

pennylane_lightning_kokkos-0.46.0.dev15-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (4.3 MB view details)

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

pennylane_lightning_kokkos-0.46.0.dev15-cp312-cp312-macosx_15_0_arm64.whl (990.6 kB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

pennylane_lightning_kokkos-0.46.0.dev15-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (4.6 MB view details)

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

pennylane_lightning_kokkos-0.46.0.dev15-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (4.3 MB view details)

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

pennylane_lightning_kokkos-0.46.0.dev15-cp311-cp311-macosx_15_0_arm64.whl (991.1 kB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

File details

Details for the file pennylane_lightning_kokkos-0.46.0.dev15-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.46.0.dev15-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 30c0feab53407adf9b480f25ce32bb20e027d911c89aac2f0c4dd5a6af0d2057
MD5 f6d0a49d453181960c505c17fe0c2bee
BLAKE2b-256 f67a307c049b858816ddae8bf14f64be54aaea52b0cc464ba45ec19ea7502012

See more details on using hashes here.

File details

Details for the file pennylane_lightning_kokkos-0.46.0.dev15-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.46.0.dev15-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b2d076ac518365716d414a532bb737158fa488e64e4c440db9020c607c4f448b
MD5 761b7fabb284a054593f7303890e766a
BLAKE2b-256 59a78367221ffaf398d96cb8e7c1646994085b6b9bc40ec9ae13055ad08c3123

See more details on using hashes here.

File details

Details for the file pennylane_lightning_kokkos-0.46.0.dev15-cp314-cp314-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.46.0.dev15-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 76848d8db53fdbe490b8566a8c3009ae40fae6a899eb99df9601ce5c96bb7fac
MD5 a81e11482dcef059f81ba4a3df202b0f
BLAKE2b-256 fc5fab2fa34d9d43763a7abd26356ee5bda224243cd67f8f18fcaa0eef02a069

See more details on using hashes here.

File details

Details for the file pennylane_lightning_kokkos-0.46.0.dev15-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.46.0.dev15-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d722792e2cf62fed70f56490395f0b3999c6dcd1e814e1ff4ea926b44c5873f2
MD5 dd5ad5f717e1bf46cb3c562a751e4865
BLAKE2b-256 642b6031fe7d309862d6067d4aee8f6e660550f2f6d5ca8ce8b12241e0bc3bf8

See more details on using hashes here.

File details

Details for the file pennylane_lightning_kokkos-0.46.0.dev15-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.46.0.dev15-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 49f92b872e857763e381cd8896ed16d74904f6103f487bd4b7471bfa47f3ba73
MD5 f2f5c31013467372a9acc46758e7575f
BLAKE2b-256 fc4e5043c8cb9a5dd0c7c5dc87ddc97b16d27e242632d720c3551fb36be6a6fe

See more details on using hashes here.

File details

Details for the file pennylane_lightning_kokkos-0.46.0.dev15-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.46.0.dev15-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 b5e5d546996774a88cbf1ceb1219e71d3be31cb20ed784e084f980e5736791d5
MD5 2d7f8237a367406a86d16540d77dab96
BLAKE2b-256 a0bc8149476b6cc075a422d75498b91ab66c8781d4a14aa3a910fd32837ce1a2

See more details on using hashes here.

File details

Details for the file pennylane_lightning_kokkos-0.46.0.dev15-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.46.0.dev15-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 24e02d736bda3f529af4c9f4ee371a2603727cfe7b6c997f20f2b86fb4d2905d
MD5 fa2f4623011b69da46da8793c0c12721
BLAKE2b-256 3d312801d4cd711302780e1466a989accd340e66803773d026cca88ec3991481

See more details on using hashes here.

File details

Details for the file pennylane_lightning_kokkos-0.46.0.dev15-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.46.0.dev15-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 c97b398dcb11048a71b109a987c6363b2e42fa246373b26831079812dabaf711
MD5 b9b6ba8f02f1f9abdf9ead40fc80e903
BLAKE2b-256 2d3b8134db39495d542deec0852bf4aef205feae2b0d6a51bc0c29cb21752dc6

See more details on using hashes here.

File details

Details for the file pennylane_lightning_kokkos-0.46.0.dev15-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.46.0.dev15-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 6aa0f787be5f264227fa8ff32086c997429c5d7f87a27449a2eb57c53875a2db
MD5 ec1580cb3a30d99a511282c7436d643a
BLAKE2b-256 5c03a58e1113cdbb7e685c0eb0a4499174397b40b4975000556cc19fc9bfcde9

See more details on using hashes here.

File details

Details for the file pennylane_lightning_kokkos-0.46.0.dev15-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.46.0.dev15-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f6c5949a0928877adb53d4dd80d49d7c906d4f2270ac6b7b57789168606be755
MD5 27fc5d9e10aeb52890b742e6858d111d
BLAKE2b-256 9edb9e6ebfc9b2506d4dda3e78fc527d32c326c52328604f4c46c7916fadcd07

See more details on using hashes here.

File details

Details for the file pennylane_lightning_kokkos-0.46.0.dev15-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.46.0.dev15-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 70ee945d0b561c3a5d833fa7844b8cdd5b1d087ee49dde1a88d96f417f64078a
MD5 48211c7d31cd9306f4eb6e0df852c6e0
BLAKE2b-256 beea3277d294903fa8955c29d05eb4a5a21cbfde58769fbc96d40efbcc37674c

See more details on using hashes here.

File details

Details for the file pennylane_lightning_kokkos-0.46.0.dev15-cp311-cp311-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.46.0.dev15-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 a916f0427b0683eaa0b052a9a190023de0fbde2149f9ad91d488be56d0c2e0d4
MD5 0d4f5dfe6ee5c5d4d5df3cfedec6820b
BLAKE2b-256 898c0aeda855f56b0a4c0ef0ad32e8d6ed67ee4ea575a2d3307a4f3221369f32

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