# PennyLane: a differentiable quantum programming library for Python

> PennyLane is a Python library for building quantum circuits that can be differentiated and trained with the same autodiff frameworks as neural networks. It targets researchers who need gradients through quantum hardware or simulators, and it is not a circuit-drawing toy.

**PennyLaneAI/pennylane** — 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.

- Repository: https://github.com/PennyLaneAI/pennylane
- Website: https://pennylane.ai
- Stars: 3,483 · Forks: 875
- Language: Python
- License: Apache-2.0
- Published: 2026-09-10 · Updated: 2026-09-10 · Language: en
- Canonical page: https://hysenlabs.com/projects/pennylaneai-pennylane

## What PennyLane solves for quantum machine learning work

Most quantum SDKs treat a circuit as something you build and submit. PennyLane treats it as something you differentiate. The project describes itself as "a cross-platform Python library for quantum computing, quantum machine learning, and quantum chemistry" whose goal is to "Train a quantum computer the same way as a neural network." That single sentence explains the audience: people who already have a training loop in autograd, JAX, PyTorch or TensorFlow and want a quantum circuit to sit inside it as one more differentiable layer.

The topics list on the repository confirms the shape of the project: autograd, automatic-differentiation, jax, pytorch, tensorflow, neural-network, optimization. Those are not quantum terms. They are machine learning terms, and their presence tells you the library is aimed at hybrid workflows where a classical optimizer updates parameters that live inside a circuit.

The second audience is quantum chemistry and Hamiltonian simulation. The README points to a chemistry introduction and to resource estimation demos, which is a different job from training: you want to prepare a state, measure an expectation value, and compare against a classical baseline. PennyLane supports both, but they stress different parts of the API.

Who it is not for: someone who wants a visual circuit editor, or who wants to submit a fixed job to one provider and read the histogram. Vendor SDKs do that with less machinery.

## How the differentiable circuit mechanism works

The architecture visible in the repository is a Python package with a device layer. The pennylane/ directory holds the core, and pennylane/devices/tests exists as a separate test target in the Makefile, which indicates devices are pluggable and expected to satisfy a shared contract. A device is the thing that executes a circuit, whether that is a local simulator or remote hardware.

Around that, PennyLane supplies interfaces. The dependencies in pyproject.toml include autograd, autoray and numpy, and the topic list names JAX, PyTorch and TensorFlow. The pattern is that a circuit is written once and the same parameter array can be attached to whichever autodiff framework you are already using, so gradients flow back through the circuit into your optimizer.

Simulation is not left to the core alone. pennylane-lightning is a direct dependency with a floor of version 0.45, and the README describes "high-performance Lightning simulators" that run on GPUs, supercomputers and the cloud. There is also a separate Catalyst compiler repository referenced for compilation. So the data flow is roughly: you define a circuit, a device executes or compiles it, and the result is an expectation value or sample set that the autodiff framework can differentiate.

The repository also carries tach.toml, which is a module boundary tool, and a .pylintrc plus .pre-commit-config.yaml. Those files say something about maintenance discipline: the project enforces internal module boundaries rather than letting the package grow into a single import graph.

## Installing PennyLane and running a first circuit

The README states that PennyLane requires Python version 3.12 and above, and that installation of PennyLane and all dependencies can be done with pip. The command it gives is:

```bash
python -m pip install pennylane
```

That pulls in the runtime dependencies listed in pyproject.toml, including scipy, networkx, rustworkx, appdirs, requests, numpy 2.0 or newer, and pennylane-lightning 0.45 or newer. If you prefer to work from a checkout, the Makefile defines an install target that runs `uv pip install .`, so the repository's own development flow assumes uv is present.

Docker images are published on the PennyLane Docker Hub page, and the README links to a description of Docker support in the Lightning documentation. That is the route to take if you want the compiled simulators without managing a Python environment by hand.

Once installed, the quickest orientation is the project's own material rather than the README, which does not include a code example. The README points to a quickstart guide and to interactive tutorials under the Codebook, specifically a "pennylane-fundamentals" track. For a first real use, follow that track: it introduces the circuit-building pattern and the measurement step in the order the project intends. The README's Getting Started section is explicit that these tutorials are "designed to introduce key features and help you start building quantum circuits right away."

One practical note on versions. The most recent release listed is v0.46.0b1, a beta dated 2026-09-09. The last stable release before it is v0.45.1 from 2026-06-26. If you are pinning for a production or paper-replication workflow, pin to the stable line rather than the beta, because the beta is labelled as such by the project.

## Where PennyLane is the wrong choice

The most obvious limitation is the Python floor. Version 3.12 and above is a hard requirement, stated in both the README and the requires-python field. If your cluster, your lab image or your CI runner is still on 3.10 or 3.11, PennyLane will not install without upgrading the interpreter first. That is a real cost on shared infrastructure where you do not control the base image.

Second, PennyLane is a framework, not a hardware client. The README claims integration with a wide range of quantum hardware devices across superconducting, trapped ion, neutral atom and photonic platforms, but those integrations live in plugins, and the plugin is what actually talks to the vendor. If your goal is to run one circuit on one specific machine and read counts, going through the vendor's own SDK is fewer moving parts.

Third, the differentiation machinery is overhead you pay for even when you do not need it. A script that prepares a fixed ansatz, samples it and plots a histogram gains nothing from autograd, autoray and the interface layer. The dependency list is not small: scipy, networkx, rustworkx, appdirs, cachetools, requests, packaging, numpy, gast and more. On a constrained environment that matters.

Fourth, the classifiers in pyproject.toml include "Development Status :: 4 - Beta". That is the project's own label, not an outside judgement. Combined with a beta release line at 0.46.0b1, it tells you the API surface is still moving between minor versions. Plan for upgrade work.

Finally, the README makes strong performance claims about Lightning and Catalyst but does not give numbers in the repository text. The performance page is where the project puts that argument. Treat the claim as a pointer to benchmark material, not as a result you can assume for your circuit.

## PennyLane compared with Qiskit and Cirq

Qiskit and Cirq both appear in the repository's topic list, which is a signal about how the project positions itself: as a layer that coexists with them rather than replaces them. The difference in approach is where the differentiation lives.

Qiskit is built around IBM's hardware and its transpiler stack. Its centre of gravity is circuit construction, transpilation to a device's native gate set, and job submission. Gradients exist, but they are a feature of the circuit layer, not the organising principle of the library.

Cirq is built around a gate and moment model, with a strong emphasis on expressing circuits precisely for Google's hardware and on control over scheduling. It is a circuit description library first.

PennyLane starts from the opposite end. The organising principle is that a circuit is a differentiable function of its parameters, and the device is an interchangeable backend. That is why the dependency list is full of autodiff libraries and why the topics read like a deep learning stack. If your problem is "minimize this expectation value over these angles," PennyLane's shape fits the problem. If your problem is "compile this circuit to this device's gate set and submit it," the vendor SDK fits better.

The two are not mutually exclusive in practice. Because PennyLane's device layer is pluggable, a plugin can wrap another SDK, and the repository's device test suite exists to enforce what such a plugin must do.

## Maintenance cadence, licence and upgrade cost

The repository is not archived, and the last push was on 2026-09-10. The release history shows a steady line: v0.45.0 on 2026-05-12, v0.45.1 on 2026-06-26, and v0.46.0b1 on 2026-09-09. A patch release followed by a beta two and a half months later is a normal rhythm for a library of this size, and the presence of .pre-commit-config.yaml, .pylintrc, tach.toml and a coverage configuration in the repository root suggests the project invests in its own tooling.

Upgrade cost is where you should be careful. The version scheme is 0.x, and the project's own classifier says Beta. Minor releases in a 0.x line can carry breaking changes, and the beta at 0.46.0b1 means the next stable release is still in flight. If you depend on PennyLane in a published result, pin the exact version and read the release notes linked from the README before moving. The repository also carries a uv.lock, so a reproducible environment is achievable if you use uv.

On licensing, the package is Apache-2.0, declared both in the LICENSE file and in the license field of pyproject.toml. Apache-2.0 is a permissive licence that includes an explicit patent grant, which matters for a library that may end up inside a commercial research pipeline. It does not require you to open your own code. Separately, the README points to the Catalyst compiler and to the Lightning simulators, which live in other repositories and may carry their own terms; check those independently. This is a description of the licence text, not legal advice.

One more thing to verify before you build on it: the README does not document a rollback or downgrade procedure, so if a 0.x minor release changes a circuit API you rely on, your recovery path is whatever your own version pinning gives you.

## Conclusion

Adopt PennyLane if you need gradients through quantum circuits and want to keep using autograd, JAX, PyTorch or TensorFlow in the same script. Skip it if you only want to draw circuits or run a fixed gate sequence on one vendor's cloud, since a vendor SDK is a shorter path. Before committing, verify that your Python is 3.12 or newer, that pennylane-lightning resolves on your platform, and whether 0.46.0b1 is acceptable or you need the 0.45.1 stable release.

## FAQ

### What is PennyLane used for?

It is used for quantum computing, quantum machine learning and quantum chemistry, and the README describes training a quantum computer the same way as a neural network. The repository's topics list autograd, JAX, PyTorch and TensorFlow, so it is aimed at hybrid workflows where a circuit sits inside a classical training loop.

### How do I install PennyLane?

The README gives a single pip command, python -m pip install pennylane, and states that PennyLane requires Python version 3.12 and above. Working from a checkout, the Makefile's install target runs uv pip install .

### How do I use PennyLane?

The README's Getting Started section points to interactive tutorials and a quickstart guide rather than showing code itself, including a pennylane-fundamentals track in the Codebook. Those tutorials are described as introducing key features and helping you start building quantum circuits.

### Who owns PennyLane?

The repository is hosted under the PennyLaneAI organisation on GitHub, and the project homepage is pennylane.ai. No corporate owner beyond that is named in the README or the repository files.

### What is the meaning of the name PennyLane?

The README and the repository files do not explain the origin or meaning of the name. It is only used as the package name, pennylane, and as the project and organisation name.

## Sources

- [License: Apache-2.0](https://github.com/PennyLaneAI/pennylane/blob/main/LICENSE)
- [PennyLaneAI/pennylane on GitHub](https://github.com/PennyLaneAI/pennylane)
- [Project website](https://pennylane.ai)
- [README](https://github.com/PennyLaneAI/pennylane/blob/main/README.md)
- [Releases](https://github.com/PennyLaneAI/pennylane/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/pennylaneai-pennylane
