Skip to main content

PennyLane-Lightning plugin

Project description

Linux x86_64 L-Qubit Python tests (branch) Linux x86_64 L-GPU Python tests (branch) Linux x86_64 L-Kokkos Python tests (branch) Linux x86_64 L-Tensor Python tests (branch) Codecov coverage CodeFactor Grade Read the Docs PennyLane Forum PyPI - Version PyPI - Python Version License

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.10 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.

  • 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 what 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-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_gpu-0.41.1.tar.gz (704.1 kB view details)

Uploaded Source

Built Distributions

pennylane_lightning_gpu-0.41.1-cp313-cp313-manylinux_2_28_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

pennylane_lightning_gpu-0.41.1-cp313-cp313-manylinux_2_28_aarch64.whl (945.2 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

pennylane_lightning_gpu-0.41.1-cp312-cp312-manylinux_2_28_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

pennylane_lightning_gpu-0.41.1-cp312-cp312-manylinux_2_28_aarch64.whl (945.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

pennylane_lightning_gpu-0.41.1-cp311-cp311-manylinux_2_28_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

pennylane_lightning_gpu-0.41.1-cp311-cp311-manylinux_2_28_aarch64.whl (943.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

pennylane_lightning_gpu-0.41.1-cp310-cp310-manylinux_2_28_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

pennylane_lightning_gpu-0.41.1-cp310-cp310-manylinux_2_28_aarch64.whl (942.8 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

File details

Details for the file pennylane_lightning_gpu-0.41.1.tar.gz.

File metadata

  • Download URL: pennylane_lightning_gpu-0.41.1.tar.gz
  • Upload date:
  • Size: 704.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for pennylane_lightning_gpu-0.41.1.tar.gz
Algorithm Hash digest
SHA256 f413147129ea92f1f5fffe88dac13114091aa0b815edcc9d2709678d18595fc5
MD5 b6f3f521a3c71d99307a851856d2d871
BLAKE2b-256 f67d1c2787817734228c74d6f143fd233b80d933f4ad7d287743ca68b78d4a9a

See more details on using hashes here.

File details

Details for the file pennylane_lightning_gpu-0.41.1-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_gpu-0.41.1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 76c16961a4e4d8955678446c7dec514e1c8642873b0c08b01f9596bdf7f9e006
MD5 550602342dbd1b1657c9b0d50ee627a4
BLAKE2b-256 98751da74e44f6d0c0938ddf11e18950ad921211f301725a4486ac839ebda121

See more details on using hashes here.

File details

Details for the file pennylane_lightning_gpu-0.41.1-cp313-cp313-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_gpu-0.41.1-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 c2a2cd3774e71afc009f3c541b41bd5c7ccd216eb8e63cac7818b0ed0a56d308
MD5 237370d223d26cd95529fd010472faf0
BLAKE2b-256 fe636c803d9082b6a3c0906b67a93bc31bc410be84fbec2d19a7362a87abe9e9

See more details on using hashes here.

File details

Details for the file pennylane_lightning_gpu-0.41.1-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_gpu-0.41.1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5ff0e0b81b93ebfa7467616f1f7475a8f123e90632470afbb597419396672c14
MD5 e19014bb95b78f0df7dd38a7f9d2d93c
BLAKE2b-256 8b70d61d56c6a5f88c6bae60219d707f0a1d506e1c45002a25102c901de8a8d9

See more details on using hashes here.

File details

Details for the file pennylane_lightning_gpu-0.41.1-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_gpu-0.41.1-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 0bec42ab667cd866bb6d0a3af1115d4ceeb8f79c5a150598a0b5f84f1fa4d9a4
MD5 e1516b1b1d5b452157a8123fd09da8c3
BLAKE2b-256 5b22eaaf5fc3e95939ac23b272302043e58ac0882a8467fb796a47684d081290

See more details on using hashes here.

File details

Details for the file pennylane_lightning_gpu-0.41.1-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_gpu-0.41.1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 768d535d6ef60ea03de35fe53dfe409ef6b8aa89c6966ffe128a1ea7dc2c28f9
MD5 85551302a03c74c8b00e9c2555c98cf9
BLAKE2b-256 0c5f4e1eddbb54add5cccc2f4548c70cb78f57fb97025eacc3af902b2cb88c6f

See more details on using hashes here.

File details

Details for the file pennylane_lightning_gpu-0.41.1-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_gpu-0.41.1-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 45554180a3c5c0a31e4b14877d4ce1467fc88bf583bcf815e06d0f56335a42dd
MD5 277ae687cddd541da3ae80c97c6a8150
BLAKE2b-256 67c1e0b17ce9410ccb9d12925a438f8fc151677cac29f77fe27e055b88ed8d03

See more details on using hashes here.

File details

Details for the file pennylane_lightning_gpu-0.41.1-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_gpu-0.41.1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 14d65a173f06a4e2eb08d0c80c0f3aaf57657efc1b6815bd019007684d37715f
MD5 159859007667378198cb2b13cd2a6eee
BLAKE2b-256 ca96719a2ba28396db6e83e6b620427df2d3b305b8242f977d81e726ba408f0b

See more details on using hashes here.

File details

Details for the file pennylane_lightning_gpu-0.41.1-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_gpu-0.41.1-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 bc68862db7f922cffed1f039092265717356e7287280bd80dbc5ffdca0ff2f12
MD5 86ac4894732fcaca9d84e882edb7596a
BLAKE2b-256 bd5422b409825915ecb3bd87a6514d25d4519af246a7645603f4fb3c82308a82

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page