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.44.0.tar.gz (770.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.44.0-cp314-cp314-manylinux_2_28_x86_64.whl (460.5 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

pennylane_lightning_tensor-0.44.0-cp314-cp314-manylinux_2_28_aarch64.whl (430.0 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ ARM64

pennylane_lightning_tensor-0.44.0-cp313-cp313-manylinux_2_28_x86_64.whl (460.5 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

pennylane_lightning_tensor-0.44.0-cp313-cp313-manylinux_2_28_aarch64.whl (429.8 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

pennylane_lightning_tensor-0.44.0-cp312-cp312-manylinux_2_28_x86_64.whl (460.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

pennylane_lightning_tensor-0.44.0-cp312-cp312-manylinux_2_28_aarch64.whl (429.9 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

pennylane_lightning_tensor-0.44.0-cp311-cp311-manylinux_2_28_x86_64.whl (461.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

pennylane_lightning_tensor-0.44.0-cp311-cp311-manylinux_2_28_aarch64.whl (430.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.44.0.tar.gz
Algorithm Hash digest
SHA256 ef0b1977ba0bcce82512824a536d93ecfea495289b3faf1068c8a585af550663
MD5 4eb918fcac7efc1566f2aa2ee8992b0c
BLAKE2b-256 11440f0cd4b75b6a0e43185c3c571d707d25c4a787825ceb8a2c596dd51d5542

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.44.0-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9db173d13d716f63ffe96aa2bb32ff3c0e2fb5e24bf2cfba5ab8e1cd929b5ac5
MD5 898c0599dd136fcdab098c1c9b825392
BLAKE2b-256 e84eaf9db5cdaa5ee4e3d6e736b19ffb20ef50c56446a821080987de300230cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.44.0-cp314-cp314-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a11efa09cf5059a0891c85f0d011b1b8fc133db3ef9eea5c3b8e15595b41324c
MD5 36bd440900fd570b84dce9e931fe1979
BLAKE2b-256 1eb526050ccc961744bb62ca3892a3d9c23f6582681a145ecb7421e8dee13d67

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.44.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e32daee4274f3c4c0e59d40a1b0b2efd8fcae648943999abe05c3e30e732b3aa
MD5 cc476b7f1e380b415515b9e2ffc382ad
BLAKE2b-256 b00ed703947b7c23029b2358845b012329cb5d84127d3b75d9964caba4c7a549

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.44.0-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 170869f2fe2329faba16cb1470c4ffe45fe85f28a429d677fbf17750dfff1933
MD5 57f23bb1cd2b3005c17105b570a2651a
BLAKE2b-256 709c5e29145f210f4aafdd80c189e5fe89ebc115853814d858b0f065f9e736be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.44.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 038f37f2b38a36c1abaf9fada37ae3827d5b8f18f18174df19611c5e0790154c
MD5 179a7f8bd588228e59e66f1389255556
BLAKE2b-256 50035f25c4197fa05fa1bea619662c2b5c38753cf3fac4c9787ac13bc043981b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.44.0-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 c5e166124668fc22585e70edf47aeef453b4205121922dc57464caf30832f872
MD5 d76322fbf9803d7760b82e4303939deb
BLAKE2b-256 45baa8d08813a7868eca5dd2ecc0eabf1869bd4485590dc2601caa02a3c1c1c6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.44.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5c8994dad11bbcb1671a83dc6b1de3ed48b53ec2889d2b0f62a0ada68c5eed9c
MD5 c0729ed340f3f4b3252a8f6dc478a692
BLAKE2b-256 944334105b6149755fa95f3ab9c99ed1e24290ab40b0f4992c7a30c5fd653da7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.44.0-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 7f518653cd8095427e08c9674ed3e0a0a6d0472ba74e0bd404cb55bd1d3d3ff0
MD5 e12fa2f4ae0fab4ff4d1ea7416ca55e3
BLAKE2b-256 1712362bdb32528e953487b3c33cc89eebc9477ada6e7a343eca098b73a85043

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