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_amdgpu-0.45.0.tar.gz (772.0 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_amdgpu-0.45.0-cp314-cp314-manylinux_2_28_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

pennylane_lightning_amdgpu-0.45.0-cp313-cp313-manylinux_2_28_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

pennylane_lightning_amdgpu-0.45.0-cp312-cp312-manylinux_2_28_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

pennylane_lightning_amdgpu-0.45.0-cp311-cp311-manylinux_2_28_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

File details

Details for the file pennylane_lightning_amdgpu-0.45.0.tar.gz.

File metadata

File hashes

Hashes for pennylane_lightning_amdgpu-0.45.0.tar.gz
Algorithm Hash digest
SHA256 ac89606c8768ea5c8be2a378495e8c2c757be64a1ad9873c2b03fd64897e454b
MD5 2d132d21a08dea0a07a7d9a0008b5909
BLAKE2b-256 a7227fd8667f9c4a4ef7e4bbf3c11b3a267a48b98c01a84bf2e37b5f67eb2f77

See more details on using hashes here.

File details

Details for the file pennylane_lightning_amdgpu-0.45.0-cp314-cp314-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_amdgpu-0.45.0-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ae99ef71f2321eaf01c7da95086033e60cbf193f49f5c9f288b8ac0bd8fca1ee
MD5 d87336778af3fde3972ccaa01912d769
BLAKE2b-256 96b7044be1bc56950b3d5fc83e8ae4aa35d874f0d3dce8d06426b0f708d0ab51

See more details on using hashes here.

File details

Details for the file pennylane_lightning_amdgpu-0.45.0-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_amdgpu-0.45.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 faf33420214edc9dc54226df2fc7ff42fa8e217cd566077daf7673d5b80fcb41
MD5 18525d70900b6c244d17a8f6a7262caa
BLAKE2b-256 09cb297c3003ba7ba4c488920662d612ecbd69ccd912b0e44cb2695a5cbcb39c

See more details on using hashes here.

File details

Details for the file pennylane_lightning_amdgpu-0.45.0-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_amdgpu-0.45.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6b96a5e1ef6fc63d19436ff2ca9061be345903d32cb81447d6421fc81c547415
MD5 a7ce5060f6b1fa49eed88e264f0a0029
BLAKE2b-256 25a314562798640ef10d82dc9320887745f3c06811505c65b210cc2b031bd397

See more details on using hashes here.

File details

Details for the file pennylane_lightning_amdgpu-0.45.0-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_amdgpu-0.45.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8832fe49c90f4d70aa065e12ce9b59e41e234176a94bd77bf6d8f3ebc4c09192
MD5 5f1b1188e5c483868287e70ead927b78
BLAKE2b-256 ae31acfa492a85291e7e977dec817af6667d6702f0eb6c2d29cfc63c1b43d0b4

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