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_tensor-0.43.0.tar.gz (765.5 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.43.0-cp313-cp313-manylinux_2_28_x86_64.whl (460.4 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

pennylane_lightning_tensor-0.43.0-cp313-cp313-manylinux_2_28_aarch64.whl (429.7 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

pennylane_lightning_tensor-0.43.0-cp312-cp312-manylinux_2_28_x86_64.whl (460.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

pennylane_lightning_tensor-0.43.0-cp312-cp312-manylinux_2_28_aarch64.whl (429.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

pennylane_lightning_tensor-0.43.0-cp311-cp311-manylinux_2_28_x86_64.whl (461.3 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

pennylane_lightning_tensor-0.43.0-cp311-cp311-manylinux_2_28_aarch64.whl (430.8 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.43.0.tar.gz
Algorithm Hash digest
SHA256 bd61a5d89e83498eaac670205506425bc4a460da12ffdbd08c1096694fde6b5d
MD5 1baca7376e1098ea55c85115bb304eb7
BLAKE2b-256 76c4c68ead6a2e4565473a31101a27ea47fdfe58166866106ef7a9629f77a263

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.43.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e788c478af33b6cde05624e0e6b160fd1bd220a1d604d7c95f83c4af430b0d85
MD5 7efca6b0046f8231e64b2473cb360387
BLAKE2b-256 737478b0645c8d6a0103b13bbdf316beda3109c954487ca7ccd810c30e268646

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.43.0-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 bd9965108eebdf70c11a06f981e808c4cdbe485c01f7cca3fd306a13f5a9209e
MD5 32d3e69551fa365112034a6df30ed316
BLAKE2b-256 932c28fd2a44f3b6aca268ebebeddd6606bf833aae9b339788547e7f3d930639

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.43.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 27b4b692e297831cbbb25e746c6571fd3bc35f82ea1d559d2ac71dafe2fce68e
MD5 da872b3efbb78294041c73d75fea4506
BLAKE2b-256 f1223d2c004e581c25173d8d54aaab5e02359e3b51ad2c5096f342cfa622d354

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.43.0-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 1072b8e98162d01b826a0d7c2437f00dda1b8c415453a217846aa7af51c46878
MD5 d3e1f8062910607d46ca7117308e0d3b
BLAKE2b-256 bfc6c0aa2093f703b0cab9afb47cf986c7edde4fbb508df378ef23b25e485a55

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.43.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 650e46c33de4993954823aef79a10096375ebc0b08a4940ea806f9e948b9786f
MD5 b85230b70cb3dab39859bc2c2e1da3f2
BLAKE2b-256 7f04150eb6246c5e85d4b8b579c39b78f3b78f3379fe1e374f7f75406786541b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_tensor-0.43.0-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 902823fadbc5ecf8a504f20ecb65e5ae922845c51a82f8cf00d0d6b47604441e
MD5 6ce01ce0f0e988094d4a29a83ba221a8
BLAKE2b-256 c663ac036e2cf7bbc42816e97002290f276de695982c25467a4b3e9e6bc8319e

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