Skip to main content
Read the Docs PyPI PyPI - Python Version

The PennyLane-Lightning-GPU plugin extends the Pennylane-Lightning state-vector simulator written in C++, and offloads to the NVIDIA cuQuantum SDK for GPU accelerated circuit simulation.

PennyLane is a cross-platform Python library for quantum machine learning, automatic differentiation, and optimization of hybrid quantum-classical computations.

Features

  • Combine the NVIDIA cuQuantum SDK high-performance GPU simulator library with PennyLane’s automatic differentiation and optimization.

  • Direct support for GPU-enabled quantum gradients with the adjoint differentiation method.

Installation

PennyLane-Lightning-GPU requires Python version 3.7 and above. It can be installed using pip:

pip install pennylane-lightning[gpu]

To build the C++ module from source:

cmake -BBuild -DENABLE_CLANG_TIDY=on -DCUQUANTUM_SDK=<path to sdk>
cmake --build ./Build --verbose

An Python wheel can be built using:

python -m pip install wheel
python setup.py build_ext --cuquantum=<path to sdk>
python setup.py bdist_wheel

To simplify the build process, we recommend using the following containerized build process.

Build locally with Docker

To build using Docker, run the following from the project root directory:

docker build . -f ./docker/Dockerfile -t "lightning-gpu-wheels"

This will build a Python wheel for Python 3.7 up to 3.10 inclusive, and be manylinux2014 (glibc 2.17) compatible. To acquire the built wheels, use:

docker run -v `pwd`:/io -it lightning-gpu-wheels cp -r ./wheelhouse /io

which mounts the current working directory, and copies the wheelhouse directory from the image to the local directory. For licensing information, please view docker/README.md.

Testing

To test that the plugin is working correctly you can test the Python code within the cloned repository:

make test-python

while the C++ code can be tested with

make test-cpp

Please refer to the GPU plugin documentation as well as to the CPU documentation and PennyLane documentation for further references.

Contributing

We welcome contributions - simply fork the repository of this plugin, and then make a pull request containing your contribution. All contributers 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.

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 PennyLane-Lightning-GPU plugin is free and open source, released under the Apache License, Version 2.0. The PennyLane-Lightning-GPU plugin makes use of the NVIDIA cuQuantum SDK headers to enable the device bindings to PennyLane, which are held to their own respective license.

Release files for pennylane-lightning-gpu 0.22.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pennylane-lightning-gpu 0.22.0
File Size Uploaded
PennyLane-Lightning-GPU-0.22.0.tar.gz 11.8 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for pennylane-lightning-gpu 0.22.0
File
PennyLane_Lightning_GPU-0.22.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
PennyLane_Lightning_GPU-0.22.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details
PennyLane_Lightning_GPU-0.22.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ x86-64 Details
PennyLane_Lightning_GPU-0.22.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 Details

Total release size: 57.5 MB

Release files / PennyLane-Lightning-GPU-0.22.0.tar.gz

Download URL PennyLane-Lightning-GPU-0.22.0.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2f9569d7bfdafc78aedfabbc162e7e97a867dbc508fe433d53cdb7e6f6199259
BLAKE2b-256 checksum
How to use checksums
026ca7453540636541c25160cbab1adff71f392f891bcce086f0fcefb87879b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.5

Release files / PennyLane_Lightning_GPU-0.22.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL PennyLane_Lightning_GPU-0.22.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 14.5 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
17b09cf54500b4c28da5e8bbe79741117b1621ac18ce314747f2fd930d43caa3
BLAKE2b-256 checksum
How to use checksums
2fff0480590ac63313d83188a112e2fa1349a91b2ba539e7b85e3bdeff7196f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.5

Release files / PennyLane_Lightning_GPU-0.22.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL PennyLane_Lightning_GPU-0.22.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 14.5 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
4138520464c76edd99fcee6bc3c85fd0dd5d3e80de37d08fcf3f6fff7044566f
BLAKE2b-256 checksum
How to use checksums
b67c8b496ca35b247b64bc74c176609df9bcfa97d1bbbb35cb14e372ed76cc3a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.5

Release files / PennyLane_Lightning_GPU-0.22.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL PennyLane_Lightning_GPU-0.22.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 14.4 MB
Tags CPython 3.8 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
df46f7b9667d6d7665fe89554406179e5bb57683e5b0ed18a1980408a05af3a2
BLAKE2b-256 checksum
How to use checksums
5a5bce4388934ea878b1862aaa2256c620e264ac109b98cedf26ba70a625f892
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.5

Release files / PennyLane_Lightning_GPU-0.22.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL PennyLane_Lightning_GPU-0.22.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 14.1 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
798a3b0c9b02236cd663f7c28f2397ff7f07386f0a9100e689d8b879be870dc4
BLAKE2b-256 checksum
How to use checksums
e73558236dce1138060feaeb9d9e829ca9a4403b1b55a58403c2cb88543503ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.5
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page