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.44.0.tar.gz (766.7 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.44.0-cp314-cp314-manylinux_2_28_x86_64.whl (4.7 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

pennylane_lightning_amdgpu-0.44.0-cp313-cp313-manylinux_2_28_x86_64.whl (4.7 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

pennylane_lightning_amdgpu-0.44.0-cp312-cp312-manylinux_2_28_x86_64.whl (4.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

pennylane_lightning_amdgpu-0.44.0-cp311-cp311-manylinux_2_28_x86_64.whl (4.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_amdgpu-0.44.0.tar.gz
Algorithm Hash digest
SHA256 6302fc19bfc43f6a7243c9d0290fbcaa35178f4d41ebe4ae843e7dfb6c621a08
MD5 1e9be49b9a45e45be01cedd54f020bf3
BLAKE2b-256 5e219be75197728ee52739976af07cb60773d06c6ffa83345e873df44ac448bb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_amdgpu-0.44.0-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 bc344f793577e2ecfc544ef6d23dd61651d0f3465e391864c648eeb2cd225088
MD5 d193108cddc162c2283dff9ba4bc345e
BLAKE2b-256 ed7b8c764f4f955842d0a915f80b365c5f3e6c2b9bf5c62e01cd4ac9b97d236e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_amdgpu-0.44.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c578addacc568554daf8f366da6e8da87c74a1869ff3d1b0184b8ba0a8e5976c
MD5 e7270395abf2beafe50762e4bd800c5a
BLAKE2b-256 a2fbcbb50db3b1a91517e2a75bfdd3c0676e0403d711d63ad0b40512e98aac30

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_amdgpu-0.44.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 27e28f5488bf8b741048433280419cfe1bb3e4eee5e0f70b45c85f7b49a2aea5
MD5 69582bb8f4269d0613a3e239aa991a0d
BLAKE2b-256 6712dbaf03f7742864a79db3ac099cfe73eaf2eee30ca173b590f544a6cf3e69

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_amdgpu-0.44.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4c812a6d7e0a51bddc06818fb41d632b5f4f4f41567b81db56af8fb92397766e
MD5 815de5a541d4368d389825a8267f5c4d
BLAKE2b-256 2b32709e5632a218d6b8c2795e48bad65e6b237218d990f39922aeb68815376d

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