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_gpu-0.45.0.tar.gz (771.1 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_gpu-0.45.0-cp314-cp314-manylinux_2_28_x86_64.whl (924.5 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

pennylane_lightning_gpu-0.45.0-cp314-cp314-manylinux_2_28_aarch64.whl (840.9 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ ARM64

pennylane_lightning_gpu-0.45.0-cp313-cp313-manylinux_2_28_x86_64.whl (924.5 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

pennylane_lightning_gpu-0.45.0-cp313-cp313-manylinux_2_28_aarch64.whl (840.4 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

pennylane_lightning_gpu-0.45.0-cp312-cp312-manylinux_2_28_x86_64.whl (924.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

pennylane_lightning_gpu-0.45.0-cp312-cp312-manylinux_2_28_aarch64.whl (840.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

pennylane_lightning_gpu-0.45.0-cp311-cp311-manylinux_2_28_x86_64.whl (924.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

pennylane_lightning_gpu-0.45.0-cp311-cp311-manylinux_2_28_aarch64.whl (841.3 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

File details

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

File metadata

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

File hashes

Hashes for pennylane_lightning_gpu-0.45.0.tar.gz
Algorithm Hash digest
SHA256 59d578fe1b7929410c33651d6546171d23e2c9e0f91d4026beada993a2222944
MD5 c27779d4a5890fe99f8847df64c6625a
BLAKE2b-256 4c9627323e4dffd5b7eb8e533c2c119632fc048b5ce840dfe6e4957dc6bce572

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_gpu-0.45.0-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0335f9321497f44428bf7c21daff3a354359d8dff3f103037be59413acd5e073
MD5 1157bf3a15754102d046cf53076de303
BLAKE2b-256 1ef52eca7305e84e4ec8690d15eb65528241360c59b0a9a672dba6a72043f1d2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_gpu-0.45.0-cp314-cp314-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 0c4aeb6cd3604f80390dff6bb5a89b8cd848b6cb04916864356b6b37d092a71d
MD5 20ec960d56d0f76696d8854578c83e15
BLAKE2b-256 e87d70e57a5b42ffe6e5f7c477b433ccc95201c2b5d065caff7a547b136c0280

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_gpu-0.45.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7f5cea2fb03fe219a82b837e221a6be93f0220e5cd7f882a130446c456b6b525
MD5 c45c97a5541903a3331009ac318556fa
BLAKE2b-256 7b159cc69f9285a16129696d690bf11fead798bb8f972a78c7916560e4053e06

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_gpu-0.45.0-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b382b02ae4b7876e06d4e2dcbe6e704899c9cf20f29158e4e84836e285a688c5
MD5 8d54b92006d019852b36ab2989491e7e
BLAKE2b-256 e3ad2eb867ec3bda91950cd7fae4ff29456d461429621bbd234d6ce652612a55

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_gpu-0.45.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0d23463770dacc3055b12c10cae194cc6ab991d4a28aa31433093d0424f8b5b8
MD5 0e18584a47c88d3eef366e7ff310be3d
BLAKE2b-256 9805fc9e8a00e604ccdea5b0f83acd75cb3f0112f0dbbe506293732f1f87c08d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_gpu-0.45.0-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 3fa52f6b04806064c51e085d0a2a322c66770ab1f344d3443838436b82bc177b
MD5 d41f2827d09087a3a571b7b77e9084f4
BLAKE2b-256 41022e34305da68e23af05bf8bf7d58ccb025718bad9fbf3fe8b70dd278102f4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_gpu-0.45.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8fa158507144efa9f4e7c202e583a677c034eea303b8710d3152aef2e400b680
MD5 b832b6917a981be8cdf20765c530d56c
BLAKE2b-256 40218dcb8742a2d4019af594b0cf92f353717b47b52a3a10e9796bb8cf791328

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pennylane_lightning_gpu-0.45.0-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 82c82deaa06ca5137a2f62dcf6df6b4dc8d3aabcb245997eb2811957958370cb
MD5 516b1b4d21a81b66bc75f9c1c6ef3f83
BLAKE2b-256 98c11da030c7cca87c437146fb489361053f29bee05c52f04bb70baef0ea7f60

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