skillfed

pennylane

PennyLane is a cross-platform Python library for quantum computing, quantum machine learning, and quantum chemistry. Train a quantum computer the same way as a neural network.

pennylane v0.45.1 297.9K downloads/30d#7,878 on PyPI3,412
Permissive license Apache-2.0 Active released

What it is and what it does

PennyLane is a quantum computing platform that bridges the gap between quantum algorithm research and practical implementation. It provides a Python interface to define quantum circuits, simulate them on classical hardware, and execute them on real quantum devices. The framework treats quantum computing as a differentiable programming problem, allowing you to train quantum circuits like neural networks using automatic differentiation through autograd and autoray.

The package integrates with a broad ecosystem: it depends on scipy, numpy, networkx, and rustworkx for numerical and graph operations; uses pennylane-lightning for high-performance simulation; and supports hardware-agnostic circuit compilation and resource estimation. It's designed for researchers and developers working in quantum machine learning, quantum chemistry, quantum optimization, and general quantum algorithm development, with extensive documentation, tutorials, and a research demo library.

Use it for:

  • Build and train variational quantum algorithms for optimization or machine learning tasks using gradient-based methods
  • Simulate quantum circuits on classical hardware to prototype algorithms before deploying to real quantum devices
  • Develop quantum chemistry simulations to study molecular properties and reactions
  • Estimate resource requirements and compile circuits for specific quantum hardware platforms
  • Explore quantum machine learning models by treating quantum circuits as differentiable layers in hybrid workflows

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

PennyLane is a quantum computing framework that lets you build, simulate, and optimize quantum circuits and algorithms using Python, with support for quantum machine learning, quantum chemistry, and integration with multiple quantum hardware backends.

Yes. PennyLane is actively maintained, has low installation friction, carries no known security vulnerabilities, and is released under a permissive license. It's the right choice if you're doing quantum computing, quantum machine learning, or quantum chemistry work in Python and need a framework that bridges simulation and real hardware. The 15 dependencies are standard scientific packages, and the active community and documentation support make it a solid foundation for quantum research.

Install

pennylane on PyPI

pip

pip install pennylane

uv

uv add pennylane

poetry

poetry add pennylane

Installing pennylane

Before you install

Low friction installation via pip with a pure-wheel distribution. Active maintenance with a release 49 days ago and ongoing commits. Requires Python 3.11 or above. Brings in 15 runtime dependencies including scipy, numpy, and pennylane-lightning, which is manageable for a scientific package of this scope.

License in practice

Released under Apache License 2.0 (permissive), meaning you can use, modify, and distribute PennyLane freely in both open-source and commercial projects with minimal restrictions—just include a copy of the license.

Quickstart

pip install pennylane

import pennylane as qml
from pennylane import numpy as np

# Create a quantum device
dev = qml.device('default.qubit', wires=2)

# Define a quantum circuit
@qml.qnode(dev)
def circuit(params):
    qml.RX(params[0], wires=0)
    qml.RY(params[1], wires=1)
    qml.CNOT(wires=[0, 1])
    return qml.expval(qml.PauliZ(0))

result = circuit([0.1, 0.2])

Requires Python 3.11 or above. For GPU-accelerated simulation, additional setup of pennylane-lightning with GPU support may be needed.

Verify before relying

  • Whether pennylane-lightning is automatically installed or requires separate setup for GPU acceleration
  • Performance characteristics and simulation limits for circuit depth or qubit count
  • Compatibility details with specific quantum hardware providers beyond the generic integration claim

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.11)
Install friction low — pure-Python wheel
Runtime dependencies 15 — scipy, networkx, rustworkx, autograd, appdirs, autoray, cachetools, pennylane-lightning, requests, tomlkit, typing_extensions, packaging, diastatic-malt, numpy, gast
Maintenance actively maintained — 49 days since the last release
Last repo commit
First released
Downloads 297,899/month — #7,878 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pennylane-0.45.1-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 computing frameworkquantum machine learningquantum circuit simulationquantum algorithm developmenthybrid quantum-classical computingquantum chemistry simulationquantum hardware integration
quantum-computingmachine-learningsimulation

More Physics packages