Open-source project
PennyLaneAI/pennylane avatar
PennyLaneAI/pennylane

PennyLane: A Differentiable Quantum Programming Stack for Python

PennyLane is an open-source quantum software platform for quantum computing, quantum machine learning, and quantum chemistry. Create meaningful quantum algorithms, from inspiration to implementation.

3,465 stars860 forksPythonApache-2.0

At a glance

What is it?
PennyLane is an Apache-2.0 Python library that makes quantum circuits differentiable across Autograd, JAX, PyTorch and TensorFlow, and that runs the same circuit on simulators or hardware. The value is in the interface, not in the simulator speed.
Who is it for?
Adopt PennyLane if your work is variational: parameter-shift or adjoint gradients on circuits you also want to run on real hardware, and you want the same Python function to train under Autograd, JAX, PyTorch or TensorFlow. Do not adopt it if you only need large-scale state-vector simulation or static circuit transpilation for a single vendor's device; the Lightning simulators and vendor SDKs target those jobs more directly.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What PennyLane Is Actually For

The problem PennyLane addresses is the gap between a quantum circuit and a training loop. A circuit is a fixed sequence of gates; a variational algorithm is that sequence with free parameters that a classical optimizer pushes around. Treating those parameters as differentiable variables is what lets you write a quantum model as a Python function and hand it to an existing optimizer. The README frames the project as a platform for quantum computing, quantum machine learning and quantum chemistry, and the repository topics list autograd, jax, pytorch and tensorflow alongside qiskit and cirq. That topic list is a fair summary of the audience: people who already write Python and already have a gradient-based workflow, and who want a circuit to sit inside it. If your work is instead about compiling a fixed circuit for one vendor's hardware, most of what PennyLane offers is overhead.

The QNode and Device Model

The architecture visible in the material is a two-layer split. Circuits are defined in Python and wrapped so that they become differentiable functions; execution is delegated to a device, which can be a simulator or hardware. The README describes PennyLane as hardware agnostic and hardware ready, and points to a devices page and to plugins for superconducting qubits, trapped ions, neutral atoms and photonics. The practical consequence is that the circuit definition does not change when the backend does. The second layer is the interface layer. Because the topics include autograd, JAX, PyTorch and TensorFlow, the same circuit can be trained under whichever automatic-differentiation framework the surrounding code already uses. That is the design decision that distinguishes the project from a circuit-construction library: differentiation is the primary abstraction, and the device is a pluggable execution target behind it. The README also points to the Catalyst compiler and the Lightning simulators as the performance path, which tells you where the boundary sits. PennyLane defines and differentiates; Catalyst compiles; Lightning executes. If you need speed, you are expected to reach for those, not to expect the default simulator to be the fast one.

Installing and Getting a First Circuit Running

The README gives one installation command and one hard constraint. PennyLane requires Python 3.12 and above, and installation with dependencies is done through pip:

python -m pip install pennylane

That version floor is worth reading twice. If your environment is pinned to Python 3.11 or earlier, you cannot install the current release without upgrading the interpreter, and that is a larger change than adding a dependency. Docker images are published on the PennyLane Docker Hub page, and the README links to a description of PennyLane Docker support in the Lightning documentation, which is the route to take if the host Python cannot be moved. For a first circuit, the README does not inline a code example; it directs readers to the interactive tutorials at pennylane.ai/codebook/pennylane-fundamentals and to the quickstart guide at pennylane.ai/features. That is a deliberate choice by the maintainers, and it means the README alone is not enough to get a working QNode. The documentation site is where the circuit, device and gradient configuration actually live.

Where the Abstraction Costs You

The device abstraction is the main trade-off. A circuit written against the PennyLane interface is portable, but portability is paid for at the plugin boundary: what actually runs is whatever the plugin supports, and the README does not enumerate per-plugin gate sets or measurement support. The material states that PennyLane integrates with a wide range of devices and links to a devices page; it does not claim that every circuit runs unchanged everywhere. Treat that as unverified for your specific target and check the plugin documentation before you design around it. A second limitation is the performance boundary already noted. The README positions Lightning as the high-performance simulator path for GPUs, supercomputers and the cloud, and Catalyst as the compiler. If your workload is a large state-vector simulation with no training loop, you are paying for a differentiation layer you are not using. The third gap is in the README itself: it is heavy on links and light on mechanism. There is no inline example of a QNode, no list of configuration keys for choosing an interface or a differentiation method, and no statement of which gradient rules apply to which measurements. Those answers exist in the documentation, but a reader who only reads the repository front page will not find them there.

How It Differs from Qiskit and Cirq

Qiskit and Cirq appear in the repository's own topic list, so the comparison is one the project invites. The difference is in what the top-level object is. Qiskit and Cirq are primarily circuit-construction and execution toolkits: you build a circuit, transpile it, and submit it. PennyLane's top-level object is a differentiable function whose parameters happen to be circuit angles, which is why autograd, JAX, PyTorch and TensorFlow are topics rather than integrations mentioned in passing. If your goal is to transpile a circuit for a specific backend and run it once, the toolkit model is a shorter path and PennyLane adds an interface you will not call. If your goal is to define a loss over circuit outputs and minimize it with an optimizer you already use, the differentiable-function model removes the glue code you would otherwise write to move parameters in and out of the circuit. That is the real difference in approach, and it is a difference in the shape of the API, not in the set of gates available.

Release Cadence and What Upgrading Involves

The release history shows a steady cadence: v0.45.0 in May 2026, v0.45.1 in June 2026, and v0.46.0b1 in September 2026, with the most recent push to main in September 2026. Patch releases exist alongside minor releases, so there is a channel for fixes between feature drops. The cost of that cadence lands in two places. First, a minor version bump in a library whose abstraction is differentiation can change how gradients are computed or which interfaces are supported; the release notes linked from the README are the place to check before upgrading, not the version number. Second, the Python 3.12 floor means the library's supported interpreter range moves with the project, so an upgrade can force an interpreter upgrade in CI. Pin the version you have validated and read the release notes for the version you intend to move to. On licensing, PennyLane is Apache-2.0, which is a permissive licence with an explicit patent grant and a requirement to preserve notices. That is a statement about the licence text, not legal advice; if you are redistributing PennyLane inside a product, have your own counsel read the terms, and note that the README points to separate projects (Catalyst, the Lightning simulators) whose licensing may differ from the core library.

Editorial conclusion

Adopt PennyLane if your work is variational: parameter-shift or adjoint gradients on circuits you also want to run on real hardware, and you want the same Python function to train under Autograd, JAX, PyTorch or TensorFlow. Do not adopt it if you only need large-scale state-vector simulation or static circuit transpilation for a single vendor's device; the Lightning simulators and vendor SDKs target those jobs more directly. Before committing, verify three things: that Python 3.12 or above is available in your environment, that your target device has a plugin listed on pennylane.ai/devices, and that your gradient method is supported for the measurement you return, since the documentation ties trainable parameters to specific differentiation rules.

Official sources

  1. License: Apache-2.0
  2. PennyLaneAI/pennylane on GitHub
  3. Project website
  4. README
  5. Releases
Community notes

Community notes