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_tensor-0.41.1.tar.gz (705.3 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_tensor-0.41.1-cp313-cp313-manylinux_2_28_x86_64.whl (589.6 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

pennylane_lightning_tensor-0.41.1-cp313-cp313-manylinux_2_28_aarch64.whl (531.6 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

pennylane_lightning_tensor-0.41.1-cp312-cp312-manylinux_2_28_x86_64.whl (590.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

pennylane_lightning_tensor-0.41.1-cp312-cp312-manylinux_2_28_aarch64.whl (532.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

pennylane_lightning_tensor-0.41.1-cp311-cp311-manylinux_2_28_x86_64.whl (586.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

pennylane_lightning_tensor-0.41.1-cp311-cp311-manylinux_2_28_aarch64.whl (528.8 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

pennylane_lightning_tensor-0.41.1-cp310-cp310-manylinux_2_28_x86_64.whl (584.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

pennylane_lightning_tensor-0.41.1-cp310-cp310-manylinux_2_28_aarch64.whl (526.6 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.41.1.tar.gz
Algorithm Hash digest
SHA256 a6609c0d2395bbb0b5251d147ac230a8832193798d574b9c3a4400a4e392f099
MD5 72830a277d99de3cd389bb8afac982bd
BLAKE2b-256 fcba75ebe52a613571fdd037bf184c3cd137ae1929631d27497348e9e8f717ba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.41.1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4b39ff1e7839fc7830087081db8952ab8a8f142ba0fd172e72af52b5fac714d6
MD5 b8115cbc297f7943449b44d8fc163ff5
BLAKE2b-256 f2828d779d0c454c6d8e069c199b7aa0672196d0552cae5675227855d84b69a2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.41.1-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 9150767f96d2e8733533b7977a15c8590962d3a870f8446dba01799bdaca8c52
MD5 ccea65c43b635a0e25b8e3775d6d6777
BLAKE2b-256 47810cba6c248f18c2ec3b2d021141cac46dc1920caf1086a555256abf633dae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.41.1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7e30d56826382706fd360e34578efd7f19d78717d6e2e025363f0c6ac4b83bae
MD5 63f098da00ca266c17f16c512aafe6d5
BLAKE2b-256 428380c69564fccfa6a7468e6e668aaca7bd0fdf3001d5afef6522029a570a9c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.41.1-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 88fb5526844da376cf8cd66bf715a9fb0fc54b8b147e9428e76f93393393c3c1
MD5 2102d53d7ccb4b33c58bea91bc311ec1
BLAKE2b-256 ed25200acda85afa72615e84847a7cb5269081a48a0be03069e2b43d48ca985c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.41.1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d7040f899d4ca6027122ac1ad38bd1b67f906c03879458726defcf91c0f14104
MD5 62e69ea134532567c401cd87a1d232d4
BLAKE2b-256 a1fc35de76487f3a2fbd81b744c24a78b02c6deeb645b0842270af49d7a84511

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.41.1-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 c38a6710d7be559e3a85c8f014e126fb06b0c4cc1bbf2fac3e44c62ea2ba2f14
MD5 d377482d4c0c02592b5705178bd3c1c5
BLAKE2b-256 b450b1541ecc046977b8ec505ddbcf7bc24009d758796be6c7f39cfd0c2c803e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.41.1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 66c1f8640d1917237ba4fe5488bd9bccb27cea7ffeff02716c68c878377d67c0
MD5 3951be50dc1b9d06187ee5c05f74d684
BLAKE2b-256 aaa98ea27917d5f21d07a6367e42712a05cee636599384f69e00a81595abfb66

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.41.1-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 0dd2162f5aebdb5fcfa47868bde4b7282f03bac39eb9ed7dd35ff6d593c6f749
MD5 b21ed275e602663b86cefc3de6d0f603
BLAKE2b-256 e833822d20800413baf49127f3871a98fd5619a438a6df126d252401431e52f6

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