--- id: pennylane-lightning version: "0.45.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # pennylane-lightning — PennyLane-Lightning plugin License: permissive · Maintenance: active · Downloads: 749.4K/mo ## 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 above — 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 pip install pennylane-lightning uv add pennylane-lightning 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_current - Install friction: low - Maintenance: active - Downloads: 749.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags quantum simulator plugin, pennylane gpu backend, quantum state vector simulation, high performance quantum computing, tensor network simulator, quantum machine learning acceleration, quantum-computing, gpu-accelerated, hpc [View on SkillFed](https://skillfed.io/packages/pennylane-lightning) · [View on PyPI](https://pypi.org/project/pennylane-lightning/)