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_tensor-0.45.0.tar.gz (776.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_tensor-0.45.0-cp314-cp314-manylinux_2_28_x86_64.whl (461.0 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

pennylane_lightning_tensor-0.45.0-cp314-cp314-manylinux_2_28_aarch64.whl (429.1 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ ARM64

pennylane_lightning_tensor-0.45.0-cp313-cp313-manylinux_2_28_x86_64.whl (460.9 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

pennylane_lightning_tensor-0.45.0-cp313-cp313-manylinux_2_28_aarch64.whl (430.8 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

pennylane_lightning_tensor-0.45.0-cp312-cp312-manylinux_2_28_x86_64.whl (461.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

pennylane_lightning_tensor-0.45.0-cp312-cp312-manylinux_2_28_aarch64.whl (430.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

pennylane_lightning_tensor-0.45.0-cp311-cp311-manylinux_2_28_x86_64.whl (462.2 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

pennylane_lightning_tensor-0.45.0-cp311-cp311-manylinux_2_28_aarch64.whl (430.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.45.0.tar.gz
Algorithm Hash digest
SHA256 521d800f7ddb95540edbc73348ad4a13396a214eeb6c6e1a94e163a856613c31
MD5 5f3740af7f14c6c6c8daa5ca30ad22c0
BLAKE2b-256 e7f824794b16f74cdc1ae85b0fa6a3c7721940286cbd97ab59d91527e8477907

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.45.0-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a12110c10df678e9580153f2d34d707e6225c33355d96fcd206bd42c9501adc4
MD5 6b8aa8ded5e21bdb74bf20138b98b173
BLAKE2b-256 a230d571895932a9fc36f528b22177f1ad5d42d1834e203fea5b98d808f48a74

See more details on using hashes here.

File details

Details for the file pennylane_lightning_tensor-0.45.0-cp314-cp314-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.45.0-cp314-cp314-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 4c7dcfe0bede5b31bbd801f31bfd73cde440ba901a4de0cb4dc9a5b68f6193b2
MD5 56dd2464f80f1525bbe50091b176763a
BLAKE2b-256 63a1f423d5c19d0ebf3b4149452175a645524d15c1430ce3d5833e2b2e4154f9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.45.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 af7630e3b24614342504104b60e56b5e009d0bd7a79e83da0604774387c1a72f
MD5 0960a6afa428ce799e650c11b77b2a3d
BLAKE2b-256 4878d299d0e924342e865ffbb020df4abb8b0f7917771de7292502253bc50392

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.45.0-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 bf0467608e9955eef0142786996056d5aced534d3cfc772bc3145db9f6a5eabc
MD5 545cb35003a10a5a49a2754580734416
BLAKE2b-256 370ecf764e3db1002c9362f12cc06cae769853eb8d9192bea28c79cbe6369d92

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.45.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e246d256da91077154cd67468f7299757ae7a7b3e7c9eeae0d8a6af7bb6ab7e0
MD5 162a720f563aea70559f53800f536030
BLAKE2b-256 47a2de61b3411d62b8aa97c415d127be05cdf0fa274d4ebe15709d4aeaa16ee7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.45.0-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ab4eec77fc0c0dab6c242bccd1e9008805602e211e79a7a5b5c8f15a206fb6a0
MD5 9cae8be774eeffdf2f92f7e318aa7507
BLAKE2b-256 9d4e1ddfa363eaa8fd06720907f137f1272692eed4605d6a4e6bb8d0df964ce9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.45.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 efa795e525f1a54aeff8ab93a47a5dba83af149887d5dd76522bdeacc3381a0e
MD5 3ffbc55bc1250bcf024a2b1bf4033134
BLAKE2b-256 20c13f1fc639de9d343dfaa60b81b331da0b80f20a0c0b8024c6a670a72c9f38

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.45.0-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a2efb53d97efe4e3b0a36fe7ad26128bc6c96bb606143e12b49a3154c6e40014
MD5 77091ac7217f7bb60dfeb01a3b0f2b0c
BLAKE2b-256 2b71f444c003c7c1eb14fedc854feedba01bab03c9fb651727fea6482a95df63

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