pennylane-lightning
PennyLane-Lightning plugin
What it is and what it does
PennyLane-Lightning is a plugin that extends PennyLane with fast quantum simulators written in C++. It provides multiple backends: lightning.qubit for CPU-based state-vector simulation with optional OpenMP parallelization, lightning.kokkos for multi-platform parallelism (OpenMP, CUDA, HIP, MPI), lightning.gpu for NVIDIA GPU acceleration via cuQuantum SDK, lightning.amdgpu for AMD GPUs, and lightning.tensor for tensor-network simulation. The package depends on PennyLane and scipy-openblas32, and is designed to accelerate hybrid quantum-classical computations on modern hardware from laptops to HPC clusters.
You install it as a PennyLane device plugin and select a backend (e.g., 'lightning.qubit' or 'lightning.gpu') when creating a device. Most backends are available via pip for Linux x86, Linux ARM, macOS ARM, and Windows; GPU and MPI variants may require source builds on some platforms. The plugin is actively maintained, supports Python 3.11 and above, and has no known security vulnerabilities.
Use it for:
- Accelerate quantum machine learning training by using GPU-backed simulation instead of CPU-only backends.
- Run large-scale quantum circuit simulations on HPC clusters using MPI-distributed state-vector backends.
- Prototype quantum algorithms with fast state-vector simulation on consumer hardware before deploying to quantum hardware.
- Simulate tensor-network quantum circuits using Matrix Product State or Exact Tensor Network methods for structured problems.
- Develop hybrid quantum-classical optimization loops where the simulator is the bottleneck and GPU acceleration is needed.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
PennyLane-Lightning provides high-performance quantum state-vector and tensor-network simulators as a plugin for PennyLane, with backends optimized for CPUs, GPUs (NVIDIA and AMD), and distributed computing via MPI.
Yes. PennyLane-Lightning is a mature, actively maintained plugin with low install friction, no security vulnerabilities, and permissive licensing. Install it if you use PennyLane and need faster simulation than the default backend, especially for GPU-accelerated or distributed workloads. The CPU-only lightning.qubit backend is available on all major platforms via pip; GPU backends require appropriate hardware and drivers but are well-documented.
Install
pennylane-lightning on PyPI
pip
pip install pennylane-lightninguv
uv add pennylane-lightningpoetry
poetry add pennylane-lightningInstalling pennylane-lightning
Before you install
Low installation friction with a pure-wheel distribution. Actively maintained with recent commits and a stable release cadence; supports current Python versions (3.11+).
License in practice
Released under Apache License 2.0 (permissive), allowing commercial use and modification. GPU backends use NVIDIA cuQuantum SDK headers under their own respective licenses.
Quickstart
pip install pennylane-lightning
import pennylane as pnl
dev = pnl.device('lightning.qubit', wires=2)
@pnl.qnode(dev)
def circuit():
pnl.PauliX(wires=0)
return pnl.expval(pnl.PauliZ(0))
print(circuit())
Requires Python 3.11 or above. GPU backends (lightning.gpu, lightning.amdgpu, lightning.kokkos with CUDA/HIP) require corresponding GPU drivers and toolkits; most are available via pip for common platforms, but some require source builds.
Verify before relying
- Performance benchmarks comparing lightning.qubit, lightning.gpu, and lightning.tensor backends on typical workloads.
- Whether scipy-openblas32 is automatically installed or must be explicitly configured for optimal performance.
- Compatibility and performance characteristics of MPI-enabled backends on specific HPC clusters.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — pennylane, scipy-openblas32 |
| Maintenance | actively maintained — 94 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 749,420/month — #5,161 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pennylane_lightning-0.45.0-py3-none-any.whl
Tags
More Physics packages
NetworkX provides data structures and…
permissive · top 1,000 on PyPI
sympySymPy is a Python library for symbolic…
permissive · top 1,000 on PyPI
pydicomPydicom reads, modifies, and writes DICOM…
permissive · top 5,000 on PyPI
albumentationsAlbumentations applies image transformations to…
permissive · top 5,000 on PyPI
CoolPropCoolProp provides thermodynamic and transport…
permissive · top 5,000 on PyPI
pyquaternionProvides quaternion representation,…
permissive · top 5,000 on PyPI
pennylanePennyLane is a quantum computing framework that…
permissive · top 15,000 on PyPI
custatevec-cu12cuStateVec provides GPU-accelerated state…
unclear · top 15,000 on PyPI
quimbQuimb provides Python tools for quantum…
permissive · top 15,000 on PyPI
custatevec-cu13cuStateVec provides GPU-accelerated state…
unclear · top 15,000 on PyPI
cudensitymat-cu13cuDensityMat provides GPU-accelerated density…
unclear · top 15,000 on PyPI
cutensornet-cu13cuTensorNet is a GPU-accelerated library for…
unclear · top 15,000 on PyPI
amazon-braket-default-simulatorProvides a local quantum circuit simulator for…
permissive · top 15,000 on PyPI
cirq-coreCirq-core provides the foundational framework…
permissive · top 15,000 on PyPI
tensorrt-cu12-libsProvides NVIDIA TensorRT libraries for CUDA 12…
unclear · top 15,000 on PyPI
qiskit-aerAer is a high-performance quantum circuit…
permissive · top 5,000 on PyPI