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.45.0.tar.gz (769.4 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.45.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (21.1 MB view details)

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

pennylane_lightning_kokkos-0.45.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (20.4 MB view details)

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

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

Uploaded CPython 3.14macOS 13.0+ ARM64

pennylane_lightning_kokkos-0.45.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (21.1 MB view details)

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

pennylane_lightning_kokkos-0.45.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (20.4 MB view details)

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

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

Uploaded CPython 3.13macOS 13.0+ ARM64

pennylane_lightning_kokkos-0.45.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (21.1 MB view details)

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

pennylane_lightning_kokkos-0.45.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (20.4 MB view details)

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

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

Uploaded CPython 3.12macOS 13.0+ ARM64

pennylane_lightning_kokkos-0.45.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (21.1 MB view details)

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

pennylane_lightning_kokkos-0.45.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (20.4 MB view details)

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

pennylane_lightning_kokkos-0.45.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.45.0.tar.gz.

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.45.0.tar.gz
Algorithm Hash digest
SHA256 6a61c919f1619e1b16c3ed5aec1705d53912a6430c60b9756ff02f312a5edddc
MD5 fffb32e345802d8d1befdaf35fa18949
BLAKE2b-256 909ccaaccf7ca81b09bab89f83c5cfca7e28ece458dd46cdc89c758c18f41e19

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.45.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0144d8ec96fb731723733c14b824bb8cc6397cf3034aefeaed0ddf4f608f2221
MD5 75860cb12cea468494e52076a08c870f
BLAKE2b-256 2e2658b061d26b18da140511bdd16f8c25338085c2137415e490734226921cc4

See more details on using hashes here.

File details

Details for the file pennylane_lightning_kokkos-0.45.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.45.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 cac25dbb2c0b9bbe5bd13794c4d1177fb18f653dee0278dd3279748030cef363
MD5 98ce3c0a6f62c946e7b0b038bf735f2a
BLAKE2b-256 1c357bf05967845ccf5efa422e0d10f752971f5b553767472d33e7a6baba1ade

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.45.0-cp314-cp314-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 3d76f148b5ccebb7de0d4e0ec7155d54ebb0aa52ff0e150acd2844421edc129e
MD5 a909d3294614fa5fd4fb2d42a5c690fa
BLAKE2b-256 74aec052566b7e8bfd86f8ce635777e38a377b7ba9ccc8aa278345b3d20771ca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.45.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1e9dafb08ef0da061b292368bbae6becb14ba402120d69976e466ff2cffbab66
MD5 396057bce510c5d0a248e5fb606781bc
BLAKE2b-256 8414b507e27d5b634ce61966f9916f28bd9cc9e7c09cf06f66e92044f602e311

See more details on using hashes here.

File details

Details for the file pennylane_lightning_kokkos-0.45.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.45.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 f1ceaeaa4538ff6d7e0f75a4a4d58102b8dbcc9244b07e06ba0dfdfd3409bdde
MD5 696c0238820bdd461ec14f0e15cc57cc
BLAKE2b-256 a75cab8227ad45ffa7ce43838f93bd156517fa4e8b4ec0025df89f0b6a8a7a14

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.45.0-cp313-cp313-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 c9df43e508a6bec8494519e4223b7350103d939a1a9c200d3c72c96c9df1d88e
MD5 68142bf4005b44f5c90bd634e6344441
BLAKE2b-256 b9c416c3f137c221700ee306104d9f51ae3e2ae204e06bd853ae8dd89d2d2b0a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.45.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 37e6f150108e4ce20a268a91220c4e766812234599b87867ee8985b94f6993b8
MD5 e213036884d0bee5008462274a93c145
BLAKE2b-256 7d9d98aa75bdf4f482ce9650dc9ed5a0a2ce68e3f52b51e3c0d7c927d6cd66b6

See more details on using hashes here.

File details

Details for the file pennylane_lightning_kokkos-0.45.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.45.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 84557392e13a6d08e8dbd68822f08391c3804ae44a292e70a69342cad1dcd08e
MD5 555644b832e9c924bf4a30e2d931c2ca
BLAKE2b-256 8311b6970508504d0b9093b28bcb34d7aa443088cbe3ee61437d093cc00fd6b7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.45.0-cp312-cp312-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 879587f942e1d05393991f4bc6a9c5bd91a2439e3f3f371231f5b55ad1a5e6aa
MD5 81aacecd546da526c802f500d935619c
BLAKE2b-256 efe23c112c9b28e6bc32d4aac5dbc87ebc7e7b44c742857c0bda6e25ee181edc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.45.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 03c5a2a7f9652c716533b79d7450b476b1aca3db67537af2eaa5034c72541e54
MD5 6ca9e02630cda2acbcfcb56402362296
BLAKE2b-256 dc982e83a8cb51c55b741c2644280214fa3e466a4c6717be61efc2da1a73bc05

See more details on using hashes here.

File details

Details for the file pennylane_lightning_kokkos-0.45.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.45.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 e4d964fd3aa123e439d2f7aa9b70d5f5fb5067982a8d17660b69991948d09b46
MD5 c25f6568c6f58b45b7330a04d56dde2c
BLAKE2b-256 58315e173d26ee0abd7e35c5e594d78e676168d501f077d5391b48dc11dd6500

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_kokkos-0.45.0-cp311-cp311-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 d6c35dbc92020b4d6429c2252c3a1df1a32e63ac09bab363fd6851218bb5febe
MD5 a3c9ab8b8db14eb1d8d20a09247e2a19
BLAKE2b-256 9d49487260a563b133dfcb7b175f6094e7efc2089ccae3566e01923d0df122aa

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