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.gpu: a state-vector simulator based on the NVIDIA cuQuantum SDK. It notably implements a distributed state-vector simulator based on MPI.
  • 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.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 x86 MacOS ARM Windows
Lightning-Qubit pip pip pip pip pip
Lightning-GPU pip pip
Lightning-GPU (MPI) source
Lightning-Kokkos (OMP) pip pip pip pip
Lightning-Kokkos (CUDA) source source
Lightning-Kokkos (HIP) source source
Lightning-Kokkos (MPI) source
Lightning-Tensor pip pip

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 (black==25.1.0). 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.43.0.tar.gz (764.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_amdgpu-0.43.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.43.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.43.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.43.0.tar.gz.

File metadata

File hashes

Hashes for pennylane_lightning_amdgpu-0.43.0.tar.gz
Algorithm Hash digest
SHA256 f9bfbe02a5defe030c138b8ed36da29fc4b452ab257eaf6032c301fb0ba0d50e
MD5 30f6acbf31534733770726d758fb44cd
BLAKE2b-256 1cff7907c2151cb870674d4455810055c446546c25ac87a0a9166dd76c07ca9b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_amdgpu-0.43.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 94142b6e7c49b1195eb76f007b3b1b27dc7be87bac9ad1e67ebd1459cf2a7b37
MD5 6e1fdae4411913a6fa4af5ea37cfa9eb
BLAKE2b-256 5c1cca6383a9d3072fa018fdae73b30d7f1bade36966b4d897fbc6a43977a0e6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_amdgpu-0.43.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d1d72ba4c9ed44b4748ea5fe151f0b06c0260aacb106b4c7411208b0bc590eeb
MD5 e808cae40c0967b069dedcfee48d03c6
BLAKE2b-256 0ae3dd0f6fe3c1df722cbbe8b8935c89eda619c03d9bfd490c4dec518b24a169

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_amdgpu-0.43.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 55e2a74b786e38db2b631ff0afce5ec858be19496328828cd55f335a0a9921cc
MD5 6b5525415dd5f8780bbd058ab29d397e
BLAKE2b-256 eac2e685f6adcaf3ec29039243824e49235fcfefc75ae46284e2285a6f9eac5e

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