PennyLane

PennyLane is a Python 3 software framework for optimization and machine learning of quantum and hybrid quantum-classical computations. The library provides a unified architecture for near-term quantum computing devices, supporting both qubit and continuous-variable paradigms.

PennyLane’s core feature is the ability to compute gradients of variational quantum circuits in a way that is compatible with classical techniques such as backpropagation. PennyLane thus extends the automatic differentiation algorithms common in optimization and machine learning to include quantum and hybrid computations. A plugin system makes the framework compatible with any gate-based quantum simulator or hardware. On the classical front, PennyLane interfaces with accelerated machine learning libraries such as TensorFlow, PyTorch, and autograd. PennyLane can be used for the optimization of variational quantum eigensolvers, quantum approximate optimization, quantum machine learning models, and many other applications.

Features

  • Follow the gradient. Built-in automatic differentiation of quantum circuits.
  • Best of both worlds. Support for hybrid quantum and classical models; connect quantum hardware with PyTorch, TensorFlow, and NumPy.
  • Batteries included. Provides optimization and machine learning tools.
  • Device independent. The same quantum circuit model can be run on different backends. Install plugins to access even more devices, including Strawberry Fields, IBM Q, Google Cirq, Rigetti Forest, Microsoft QDK, and ProjectQ.

Available plugins

  • PennyLane-SF: Supports integration with Strawberry Fields, a full-stack Python library for simulating continuous variable (CV) quantum optical circuits.
  • PennyLane-qiskit: Supports integration with Qiskit, an open-source quantum computation framework by IBM. Provides device support for the Qiskit Aer quantum simulators, and IBM Q hardware devices.
  • PennyLane-cirq: Supports integration with Cirq, an open-source quantum computation framework by Google.
  • PennyLane-Forest: Supports integration with PyQuil, the Rigetti Forest SDK, and the Rigetti QCS, an open-source quantum computation framework by Rigetti. Provides device support for the the Quantum Virtual Machine (QVM) and Quantum Processing Units (QPUs) hardware devices.
  • PennyLane-Qsharp: Supports integration with the Microsoft Quantum Development Kit, a quantum computation framework that uses the Q# quantum programming language.