Skip to main content

PennyLane-Lightning-GPU plugin

Project description

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.

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.22.0.tar.gz (11.8 kB view details)

Uploaded Source

Built Distributions

PennyLane_Lightning_GPU-0.22.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

PennyLane_Lightning_GPU-0.22.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.5 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

PennyLane_Lightning_GPU-0.22.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.4 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

PennyLane_Lightning_GPU-0.22.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.1 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

File details

Details for the file PennyLane-Lightning-GPU-0.22.0.tar.gz.

File metadata

  • Download URL: PennyLane-Lightning-GPU-0.22.0.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for PennyLane-Lightning-GPU-0.22.0.tar.gz
Algorithm Hash digest
SHA256 2f9569d7bfdafc78aedfabbc162e7e97a867dbc508fe433d53cdb7e6f6199259
MD5 7770704eb3c98f5ef83b1036e1ff611c
BLAKE2b-256 026ca7453540636541c25160cbab1adff71f392f891bcce086f0fcefb87879b0

See more details on using hashes here.

File details

Details for the file PennyLane_Lightning_GPU-0.22.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: PennyLane_Lightning_GPU-0.22.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 14.5 MB
  • Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
  • Uploaded using 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

File hashes

Hashes for PennyLane_Lightning_GPU-0.22.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 17b09cf54500b4c28da5e8bbe79741117b1621ac18ce314747f2fd930d43caa3
MD5 0181082573e208548ede405d705c2f7e
BLAKE2b-256 2fff0480590ac63313d83188a112e2fa1349a91b2ba539e7b85e3bdeff7196f7

See more details on using hashes here.

File details

Details for the file PennyLane_Lightning_GPU-0.22.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: PennyLane_Lightning_GPU-0.22.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 14.5 MB
  • Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
  • Uploaded using 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

File hashes

Hashes for PennyLane_Lightning_GPU-0.22.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4138520464c76edd99fcee6bc3c85fd0dd5d3e80de37d08fcf3f6fff7044566f
MD5 a9419dfc4b6f7a0b83f70686d4c6a65a
BLAKE2b-256 b67c8b496ca35b247b64bc74c176609df9bcfa97d1bbbb35cb14e372ed76cc3a

See more details on using hashes here.

File details

Details for the file PennyLane_Lightning_GPU-0.22.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: PennyLane_Lightning_GPU-0.22.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 14.4 MB
  • Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
  • Uploaded using 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

File hashes

Hashes for PennyLane_Lightning_GPU-0.22.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 df46f7b9667d6d7665fe89554406179e5bb57683e5b0ed18a1980408a05af3a2
MD5 7c0652871273f4209aec514e5280afc4
BLAKE2b-256 5a5bce4388934ea878b1862aaa2256c620e264ac109b98cedf26ba70a625f892

See more details on using hashes here.

File details

Details for the file PennyLane_Lightning_GPU-0.22.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: PennyLane_Lightning_GPU-0.22.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 14.1 MB
  • Tags: CPython 3.7m, manylinux: glibc 2.17+ x86-64
  • Uploaded using 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

File hashes

Hashes for PennyLane_Lightning_GPU-0.22.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 798a3b0c9b02236cd663f7c28f2397ff7f07386f0a9100e689d8b879be870dc4
MD5 4a60565030ae40c18abe2223685f79eb
BLAKE2b-256 e73558236dce1138060feaeb9d9e829ca9a4403b1b55a58403c2cb88543503ea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page