pennylane-lightning

The Lightning plugin ecosystem provides fast quantum state-vector and tensor network simulators written in C++ for use with PennyLane.

https://github.com/pennylaneai/pennylane-lightning

Science Score: 64.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Committers with academic emails
    1 of 48 committers (2.1%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.0%) to scientific vocabulary

Keywords

cuda distributed-computing gpu hpc mpi openmp parallel quantum-computing quantum-machine-learning rocm

Keywords from Contributors

quantum jax quantum-compiler qir pennylane mlir llvm jit automatic-differentiation autodiff
Last synced: 4 months ago · JSON representation ·

Repository

The Lightning plugin ecosystem provides fast quantum state-vector and tensor network simulators written in C++ for use with PennyLane.

Basic Info
Statistics
  • Stars: 123
  • Watchers: 16
  • Forks: 45
  • Open Issues: 55
  • Releases: 42
Topics
cuda distributed-computing gpu hpc mpi openmp parallel quantum-computing quantum-machine-learning rocm
Created over 5 years ago · Last pushed 4 months ago
Metadata Files
Readme Contributing License Code of conduct Citation

README.md

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:

bash 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:

bibtex @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

  • Source Code: https://github.com/PennyLaneAI/pennylane-lightning
  • Issue Tracker: https://github.com/PennyLaneAI/pennylane-lightning/issues
  • PennyLane Forum: https://discuss.pennylane.ai

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:

  • nanobind: https://github.com/wjakob/nanobind
  • Kokkos Core: https://github.com/kokkos/kokkos
  • NVIDIA cuQuantum: https://developer.nvidia.com/cuquantum-sdk
  • scipy-openblas32: https://pypi.org/project/scipy-openblas32/
  • Xanadu JET: https://github.com/XanaduAI/jet

Owner

  • Name: PennyLaneAI
  • Login: PennyLaneAI
  • Kind: organization

PennyLane is a cross-platform Python library for differentiable programming of quantum computers. Train a quantum computer the same way as a neural network.

Citation (CITATION.cff)

cff-version: "1.2.0"
authors:
- family-names: Asadi
  given-names: Ali
  orcid: "https://orcid.org/0009-0004-6010-2110"
- family-names: Dusko
  given-names: Amintor
  orcid: "https://orcid.org/0000-0002-0910-7715"
- family-names: Park
  given-names: Chae-Yeun
  orcid: "https://orcid.org/0000-0003-4430-1000"
- family-names: Michaud-Rioux
  given-names: Vincent
  orcid: "https://orcid.org/0000-0003-4367-5940"
- family-names: Schoch
  given-names: Isidor
- family-names: Shu
  given-names: Shuli
  orcid: "https://orcid.org/0000-0001-6528-8584"
- family-names: Vincent
  given-names: Trevor
- family-names: O'Riordan
  given-names: Lee J.
  orcid: "https://orcid.org/0000-0002-6758-9433"
contact:
- family-names: O'Riordan
  given-names: Lee J.
  orcid: "https://orcid.org/0000-0002-6758-9433"
message: If you use this software, please cite as follows.
preferred-citation:
  authors:
  - family-names: Asadi
    given-names: Ali
    orcid: "https://orcid.org/0009-0004-6010-2110"
  - family-names: Dusko
    given-names: Amintor
    orcid: "https://orcid.org/0000-0002-0910-7715"
  - family-names: Park
    given-names: Chae-Yeun
    orcid: "https://orcid.org/0000-0003-4430-1000"
  - family-names: Michaud-Rioux
    given-names: Vincent
    orcid: "https://orcid.org/0000-0003-4367-5940"
  - family-names: Schoch
    given-names: Isidor
  - family-names: Shu
    given-names: Shuli
    orcid: "https://orcid.org/0000-0001-6528-8584"
  - family-names: Vincent
    given-names: Trevor
  - family-names: O'Riordan
    given-names: Lee J.
    orcid: "https://orcid.org/0000-0002-6758-9433"
  - url: "https://arxiv.org/abs/2403.02512"
  - type: other
    value: "arXiv:2403.02512"
  title: "Hybrid quantum programming with PennyLane Lightning on HPC platforms"
  type: article
title: "Hybrid quantum programming with PennyLane Lightning on HPC platforms"

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 755
  • Total Committers: 48
  • Avg Commits per committer: 15.729
  • Development Distribution Score (DDS): 0.869
Past Year
  • Commits: 270
  • Committers: 29
  • Avg Commits per committer: 9.31
  • Development Distribution Score (DDS): 0.822
Top Committers
Name Email Commits
Lee James O'Riordan m****d 99
Vincent Michaud-Rioux v****m@n****m 86
Ali Asadi 1****i 86
Amintor Dusko 8****o 65
Shuli Shu 3****D 62
Tom Bromley 4****y 60
antalszava a****a@g****m 45
Chae-Yeun Park c****n@x****i 43
Joseph Lee 4****l 30
Luis Alfredo Nuñez Meneses a****z@x****i 22
github-actions[bot] 4****] 18
Christina Lee c****l@g****m 17
Mudit Pandey m****y@x****i 14
Josh Izaac j****6@g****m 13
Rashid N H M 9****m 12
David Ittah d****0 6
Pietropaolo Frisoni p****i@x****i 6
erick-xanadu 1****u 6
Andrija Paurevic 4****u 5
Raul Torres 1****c 5
Matthew Silverman m****s@x****i 4
Jay Soni j****i@u****a 4
lillian542 3****2 4
Thomas Loke t****6@g****m 4
Astral Cai a****i@x****i 3
Yushao Chen (Jerry) c****3@o****m 3
paul0403 7****3 3
runora95 5****5 3
co9olguy c****y 2
anthayes92 3****2 2
and 18 more...
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 71
  • Total pull requests: 1,336
  • Average time to close issues: 6 months
  • Average time to close pull requests: 19 days
  • Total issue authors: 35
  • Total pull request authors: 56
  • Average comments per issue: 1.24
  • Average comments per pull request: 2.38
  • Merged pull requests: 886
  • Bot issues: 0
  • Bot pull requests: 35
Past Year
  • Issues: 27
  • Pull requests: 573
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 10 days
  • Issue authors: 12
  • Pull request authors: 33
  • Average comments per issue: 0.41
  • Average comments per pull request: 2.55
  • Merged pull requests: 386
  • Bot issues: 0
  • Bot pull requests: 7
Top Authors
Issue Authors
  • maliasadi (10)
  • mlxd (9)
  • tomlqc (9)
  • Alex-Preciado (4)
  • chaeyeunpark (3)
  • isaacdevlugt (3)
  • josephleekl (3)
  • paul0403 (2)
  • dmclark17 (2)
  • TheRisenPhoenix (1)
  • rht (1)
  • ugurbolat (1)
  • marcodelapierre (1)
  • joeycarter (1)
  • xaviere97 (1)
Pull Request Authors
  • vincentmr (185)
  • maliasadi (154)
  • multiphaseCFD (146)
  • AmintorDusko (131)
  • josephleekl (126)
  • mlxd (120)
  • LuisAlfredoNu (107)
  • rashidnhm (35)
  • albi3ro (32)
  • github-actions[bot] (31)
  • mudit2812 (28)
  • jzaia18 (22)
  • PietropaoloFrisoni (16)
  • JerryChen97 (15)
  • andrijapau (13)
Top Labels
Issue Labels
bug (6) good first issue (4) ci:use-gpu-runner (4) hacktoberfest (3) enhancement (3) ci:build_wheels (3) urgent (3) ci:use-multi-gpu-runner (1)
Pull Request Labels
ci:build_wheels (335) ci:use-gpu-runner (192) ci:use-multi-gpu-runner (192) urgent (145) do not merge (75) WIP (12) bug-fix (12) draft (11) documentation (10) bug (5) dependencies (4) python (3) github_actions (3) hacktoberfest-accepted (2) wontfix (2)

Packages

  • Total packages: 7
  • Total downloads:
    • pypi 343,092 last-month
  • Total dependent packages: 13
    (may contain duplicates)
  • Total dependent repositories: 16
    (may contain duplicates)
  • Total versions: 193
  • Total maintainers: 4
proxy.golang.org: github.com/pennylaneai/pennylane-lightning
  • Versions: 43
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 6.4%
Average: 6.7%
Dependent repos count: 6.9%
Last synced: 4 months ago
proxy.golang.org: github.com/PennyLaneAI/pennylane-lightning
  • Versions: 43
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 6.4%
Average: 6.7%
Dependent repos count: 6.9%
Last synced: 4 months ago
pypi.org: pennylane-lightning

PennyLane-Lightning plugin

  • Versions: 43
  • Dependent Packages: 6
  • Dependent Repositories: 15
  • Downloads: 327,714 Last month
Rankings
Downloads: 0.9%
Dependent packages count: 2.4%
Dependent repos count: 3.7%
Average: 10.9%
Forks count: 22.6%
Stargazers count: 25.0%
Maintainers (4)
Last synced: 4 months ago
pypi.org: pennylane-lightning-gpu

PennyLane-Lightning plugin

  • Versions: 32
  • Dependent Packages: 3
  • Dependent Repositories: 1
  • Downloads: 5,896 Last month
Rankings
Dependent packages count: 2.4%
Downloads: 6.8%
Average: 15.7%
Dependent repos count: 21.6%
Forks count: 22.6%
Stargazers count: 25.0%
Maintainers (3)
Last synced: 4 months ago
pypi.org: pennylane-lightning-kokkos

PennyLane-Lightning plugin

  • Versions: 18
  • Dependent Packages: 3
  • Dependent Repositories: 0
  • Downloads: 9,208 Last month
Rankings
Dependent packages count: 6.6%
Downloads: 10.4%
Average: 16.7%
Forks count: 17.3%
Stargazers count: 18.6%
Dependent repos count: 30.6%
Maintainers (2)
Last synced: 4 months ago
pypi.org: pennylane-lightning-tensor

PennyLane-Lightning plugin

  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 274 Last month
Rankings
Dependent packages count: 10.1%
Average: 33.4%
Dependent repos count: 56.8%
Maintainers (1)
Last synced: 4 months ago
conda-forge.org: pennylane-lightning
  • Versions: 9
  • Dependent Packages: 1
  • Dependent Repositories: 0
Rankings
Dependent packages count: 28.8%
Dependent repos count: 34.0%
Forks count: 34.7%
Average: 35.0%
Stargazers count: 42.3%
Last synced: 4 months ago

Dependencies

doc/requirements.txt pypi
  • breathe *
  • docutils ==0.16
  • exhale ==0.3.1
  • graphviz *
  • pybind11 *
  • sphinx *
  • sphinx-automodapi *
  • xanadu-sphinx-theme ==0.1.0
requirements.txt pypi
  • flaky *
  • ninja *
  • numpy *
  • pennylane >=0.15
  • pybind11 *
  • pytest *
  • pytest-cov *
  • pytest-mock *
.github/workflows/build_and_cache_Kokkos_linux.yml actions
  • actions/cache v3 composite
.github/workflows/changelog_reminder.yml actions
  • actions/checkout master composite
  • peterjgrainger/action-changelog-reminder v1.3.0 composite
.github/workflows/format.yml actions
  • actions/cache v3 composite
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/post_release_tag.yml actions
  • actions/checkout v3 composite
.github/workflows/post_release_version_bump.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • peter-evans/create-pull-request v3 composite
.github/workflows/pre_release_version_bump.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • peter-evans/create-pull-request v3 composite
.github/workflows/set_wheel_build_matrix.yml actions
  • actions/checkout v3 composite
.github/workflows/tests_linux.yml actions
  • actions/cache v3 composite
  • actions/checkout v3 composite
  • actions/download-artifact v3 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite
  • codecov/codecov-action v3 composite
.github/workflows/tests_windows.yml actions
  • actions/cache v3 composite
  • actions/checkout v3 composite
  • actions/download-artifact v3 composite
  • actions/upload-artifact v3 composite
  • codecov/codecov-action v3 composite
  • ilammy/msvc-dev-cmd v1 composite
.github/workflows/tests_without_binary.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • codecov/codecov-action v3 composite
.github/workflows/update_dev_version.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/wheel_linux_aarch64.yml actions
  • actions-ecosystem/action-regex-match main composite
  • actions/cache v3 composite
  • actions/checkout v3 composite
  • actions/download-artifact v3 composite
  • actions/upload-artifact v3 composite
  • docker/setup-qemu-action v2 composite
  • pypa/gh-action-pypi-publish release/v1 composite
.github/workflows/wheel_linux_ppc64le.yml actions
  • actions-ecosystem/action-regex-match main composite
  • actions/cache v3 composite
  • actions/checkout v3 composite
  • actions/download-artifact v3 composite
  • actions/upload-artifact v3 composite
  • docker/setup-qemu-action v2 composite
  • pypa/gh-action-pypi-publish release/v1 composite
.github/workflows/wheel_linux_x86_64.yml actions
  • actions-ecosystem/action-regex-match main composite
  • actions/cache v3 composite
  • actions/checkout v3 composite
  • actions/download-artifact v3 composite
  • actions/upload-artifact v3 composite
  • pypa/gh-action-pypi-publish release/v1 composite
.github/workflows/wheel_macos_arm64.yml actions
  • actions/checkout v3 composite
  • actions/download-artifact v3 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite
  • pypa/gh-action-pypi-publish release/v1 composite
.github/workflows/wheel_macos_x86_64.yml actions
  • actions-ecosystem/action-regex-match main composite
  • actions/cache v3 composite
  • actions/checkout v3 composite
  • actions/download-artifact v3 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite
  • pypa/gh-action-pypi-publish release/v1 composite
.github/workflows/wheel_noarch.yml actions
  • actions/checkout v3 composite
  • actions/download-artifact v3 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite
  • pypa/gh-action-pypi-publish release/v1 composite
.github/workflows/wheel_win_x86_64.yml actions
  • actions-ecosystem/action-regex-match main composite
  • actions/cache v3 composite
  • actions/checkout v3 composite
  • actions/download-artifact v3 composite
  • actions/upload-artifact v3 composite
  • pypa/gh-action-pypi-publish release/v1 composite
docker/Dockerfile docker
  • ubuntu focal build
requirements-dev.txt pypi
  • black ==23.7.0 development
  • clang-format ==14 development
  • flaky * development
  • ninja * development
  • pip ==23.0 development
  • pybind11 * development
  • pytest * development
  • pytest-cov * development
  • pytest-mock * development
setup.py pypi