skillfed

pennylane-lightning

PennyLane-Lightning plugin

pennylane-lightning v0.45.0 749.4K downloads/30d#5,161 on PyPI144
Permissive license Apache-2.0 Active released

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-lightning

uv

uv add pennylane-lightning

poetry

poetry add pennylane-lightning

Installing 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

Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: Science/ResearchNatural Language :: EnglishOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering :: Physics

Tags

quantum simulator pluginpennylane gpu backendquantum state vector simulationhigh performance quantum computingtensor network simulatorquantum machine learning acceleration
quantum-computinggpu-acceleratedhpc

More Physics packages

Further reading