Skip to main content

PennyLane is a Python quantum machine learning library by Xanadu Inc.

Project description

PennyLane

Travis Codecov coverage Codacy grade Read the Docs PyPI PyPI - Python Version Discourse posts

PennyLane is a cross-platform Python library for quantum machine learning, automatic differentiation, and optimization of hybrid quantum-classical computations.

Learn more about quantum machine learning with PennyLane: view and download QML examples and demos over at https://pennylane.ai/qml.

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, and Microsoft QDK.

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.

For a full list of PennyLane plugins, see the PennyLane website.

Installation

PennyLane requires Python version 3.5 and above. Installation of PennyLane, as well as all dependencies, can be done using pip:

$ python -m pip install pennylane

Getting started

For getting started with PennyLane, check out some of the key concepts behind quantum machine learning, before moving on to some introductory tutorials.

Then, take a deeper dive into quantum machine learning by exploring cutting-edge algorithms using PennyLane and near-term quantum hardware, with our collection of QML tutorials.

You can also check out our documentation for more details on the quantum operations, and to explore the available optimization tools provided by PennyLane, and detailed guides on how to write your own PennyLane-compatible quantum device.

Finally, play around with the numerous devices and plugins available for running your hybrid optimizations — these include IBM Q, provided by the PennyLane-Qiskit plugin, as well as the Rigetti Aspen-1 QPU.

Contributing to PennyLane

We welcome contributions — simply fork the PennyLane repository, and then make a pull request containing your contribution. All contributers to PennyLane will be listed as authors on the releases. All users who contribute significantly to the code (new plugins, new functionality, etc.) will be listed on the PennyLane arXiv paper.

We also encourage bug reports, suggestions for new features and enhancements, and even links to cool projects or applications built on PennyLane.

See our contributions page for more details.

Authors

Ville Bergholm, Josh Izaac, Maria Schuld, Christian Gogolin, and Nathan Killoran.

If you are doing research using PennyLane, please cite our paper:

Ville Bergholm, Josh Izaac, Maria Schuld, Christian Gogolin, Carsten Blank, Keri McKiernan, and Nathan Killoran. PennyLane: Automatic differentiation of hybrid quantum-classical computations. 2018. arXiv:1811.04968

Support

If you are having issues, please let us know by posting the issue on our Github issue tracker.

We also have a PennyLane discussion forum - come join the discussion and chat with our PennyLane team.

License

PennyLane is free and open source, released under the Apache License, Version 2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for PennyLane, version 0.8.0
Filename, size File type Python version Upload date Hashes
Filename, size PennyLane-0.8.0-py3-none-any.whl (195.4 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size PennyLane-0.8.0.tar.gz (211.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page