PennyLane
Quantum differentiable programming, with a qchem module for variational chemistry (VQE).
Tool 086 of 100 in the MolForge directory of open-source tools. Every fact below was read from the repository's host on 2026-11-28.

What PennyLane is
PennyLane is a Python framework for quantum differentiable programming: a quantum circuit is written as a Python function, and its measured outputs can be differentiated with respect to gate parameters by automatic differentiation, in the same way a neural network is trained. Gradients flow through NumPy, PyTorch, JAX or TensorFlow, which makes variational algorithms such as the variational quantum eigensolver (VQE) a matter of defining a cost function and calling an optimiser.
The qchem module builds molecular Hamiltonians from a geometry and a basis set, either with PennyLane's own differentiable Hartree-Fock solver or via OpenFermion and PySCF, and supplies templates for chemistry ansätze such as UCCSD, particle-conserving Givens rotation circuits and adaptive circuit construction. Hamiltonians can be tapered using symmetries to save qubits. Circuits run on built-in simulators, including the Lightning backends, or on hardware through device plugins for several providers.
PennyLane is a general quantum machine learning framework in which chemistry is one application; molecules that fit today's simulators and devices remain small.
Features
- Quantum circuits as differentiable Python functions with autograd, PyTorch, JAX and TensorFlow interfaces
- qchem module building molecular Hamiltonians with a differentiable Hartree-Fock solver
- Import of operators from OpenFermion and PySCF-based backends
- Ansatz templates: UCCSD, AllSinglesDoubles and Givens-rotation particle-conserving circuits
- Qubit tapering with Z2 symmetries to reduce qubit count
- Built-in simulators including the Lightning backends, plus device plugins for hardware providers
- Curated datasets of molecular Hamiltonians and reference energies
What it is for
- Run a VQE for a small molecule with gradient-based optimisation
- Compute nuclear gradients by differentiating through the Hamiltonian construction
- Build and taper a molecular Hamiltonian before running on hardware
- Prototype adaptive ansatz circuits on a simulator
- Embed quantum circuits in a PyTorch or JAX training loop
Verified facts
| Family | Quantum computing for chemistry |
|---|---|
| Language or basis | Python |
| Repository | https://github.com/PennyLaneAI/pennylane (GitHub) |
| Licence | Apache-2.0 (SPDX identifier as declared in the repository) |
| Main language on GitHub | Python |
| Last commit | 2026-11-28 |
| Latest release | No GitHub release tagged; follow the repository's own versioning |
| Stars | 3,541 on 2026-11-28 |
| Open issues and pull requests | 488 on 2026-11-28 |
| Repository created | 2018-04-17 |
| Verified | 2026-11-28 by MolForge's checking script, against the host's API |
Where PennyLane fits
Solve electronic structure on, or in simulation of, quantum computers.
Questions people ask
- Can PennyLane do chemistry without PySCF?
- Yes, for small molecules. PennyLane includes its own differentiable Hartree-Fock implementation with Gaussian basis sets, which lets you differentiate energies with respect to nuclear coordinates and basis parameters. For larger systems, other reference methods or more basis sets, the molecular_hamiltonian function can use an OpenFermion-PySCF backend instead.
- Does PennyLane run on real quantum hardware?
- Through plugins. PennyLane itself ships simulators; separate plugin packages connect it to hardware and cloud services from several providers, including IBM devices via a Qiskit plugin and Amazon Braket. The same circuit code runs on a simulator or a device by changing the device line.
- What does differentiable mean here?
- Expectation values returned by a circuit can be differentiated with respect to its parameters, using methods such as the parameter-shift rule, adjoint differentiation on simulators or backpropagation. This lets gradient-based optimisers train circuit parameters and lets quantum circuits sit inside classical machine learning models as ordinary differentiable layers.
- How is PennyLane different from Qiskit Nature?
- PennyLane is a general framework organised around differentiable circuits, with chemistry as one module alongside quantum machine learning; it is device-agnostic through plugins. Qiskit Nature is a dedicated natural-science pipeline tied to Qiskit and IBM's primitives. Both produce molecular Hamiltonians and support VQE; they differ in programming model and ecosystem.
- Is PennyLane open source?
- Yes. The repository declares the Apache-2.0 licence (SPDX identifier read from the host on 2026-11-28). Read the licence text in the repository before redistributing or embedding it.
- Where is the PennyLane source code?
- At https://github.com/PennyLaneAI/pennylane (GitHub). This is the address the host reported on the day of verification; renamed repositories are followed to their new home.
- Is PennyLane still maintained?
- The last commit was pushed on 2026-11-28, and no release is tagged on GitHub; the repository had 488 open issues and pull requests on 2026-11-28.
- Does MolForge use PennyLane?
- No. MolForge runs nine of the hundred tools in this directory (RDKit, OpenMM, AutoDock Vina, Open Babel, MDTraj, pymbar and NGL, plus PySCF and xTB in MFsig); PennyLane is listed because of its place in quantum computing for chemistry, not because we run it.
Our comments on PennyLane
MolForge does not run PennyLane in production. This page is a verified pointer, not a review: the facts above come from the repository on the date shown, the description is ours, and we make no claim about accuracy or speed that we have not measured. If you maintain PennyLane and something here is wrong or out of date, write to hello@molforge.ai and we will correct the source file.
Test status
Not tested by MolForge. To check PennyLane yourself: clone the repository, follow the installation section of its README, and run the test suite the project ships before trusting a result; the last-commit date and the open issue count above tell you how alive the project is.