Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve quickstart - Introduction #2530

Merged
merged 12 commits into from
May 4, 2022
Binary file added doc/_static/code-intro.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
100 changes: 30 additions & 70 deletions doc/introduction/pennylane.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,85 +3,45 @@

.. _pl_intro:

Introduction
============
Overview
========
mariaschuld marked this conversation as resolved.
Show resolved Hide resolved

PennyLane provides a bridge between classical and quantum computations, making it
easy to build and optimize hybrid computations. Prominent examples are
*variational quantum eigensolvers* and *quantum machine learning models*.

Bridging the classical and quantum world
----------------------------------------

Classical computations, as well as optimization or training of models, are executed using
one of the standard scientific computing or machine learning libraries. PennyLane provides an
**interface** to these libraries, making them quantum-aware.

PennyLane's standard interface is `NumPy <https://numpy.org/>`_,
but interfaces to powerful machine learning libraries like `PyTorch <https://pytorch.org/>`_,
`Tensorflow <https://www.tensorflow.org/>`_, and `JAX <https://github.com/google/jax>`__ are also available.

The quantum computations are sent to a **device** for execution. A device can be real quantum
hardware or a classical simulator. PennyLane comes with default simulator devices,
but is well-integrated with external software and hardware to run quantum
circuits---such as Xanadu's Strawberry Fields, Rigetti's Forest, IBM's Qiskit, or Google's Cirq.

Communication between the classical computing library and quantum devices is coordinated in
PennyLane via a suite of **plugins**:

.. image:: ../_static/jigsaw.png
:align: center
:width: 90%
.. figure:: ../_static/code.png
:align: left
:figwidth: 350px
:width: 300px
:target: javascript:void(0);

|

The main job of PennyLane is to manage the evaluation of parametrized quantum circuits
(so-called *variational circuits*) on quantum devices,
and to make them accessible to the machine learning libraries.
PennyLane also provides access to gradients of quantum circuits, which the machine
learning library can use to perform backpropagation, including through quantum
circuits---an essential process for optimization and machine learning.
PennyLane is a cross-platform Python library for differentiable programming of
quantum computers, enabling the execution and training of quantum programs on various
mariaschuld marked this conversation as resolved.
Show resolved Hide resolved
backends.

PennyLane connects quantum computing with powerful machine learning frameworks
like `NumPy <https://numpy.org/>`_'s `autograd <https://github.com/HIPS/autograd>`__,
`JAX <https://github.com/google/jax>`__,
`PyTorch <https://pytorch.org/>`_, and `TensorFlow <https://www.tensorflow.org/>`_,
making them quantum-aware.
mariaschuld marked this conversation as resolved.
Show resolved Hide resolved

More details
------------
Its central job is to manage the execution of quantum computations, including
the evaluation of circuits and the computation of their gradients.
This information is forwarded to the classical
framework, creating seamless quantum-classical pipelines for applications.

In the following sections you can learn more about the key features of PennyLane:
|

.. image:: ../_static/code.png
.. figure:: ../_static/jigsaw.png
mariaschuld marked this conversation as resolved.
Show resolved Hide resolved
:align: right
:width: 300px
:figwidth: 500px
:width: 450px
:target: javascript:void(0);

1. :doc:`circuits` shows how PennyLane unifies and simplifies
the process of programming quantum circuits with trainable parameters.

..

2. :doc:`interfaces` introduces how PennyLane is used with different
optimization libraries to optimize quantum circuits or hybrid computations.

..

3. :doc:`operations` outlines the various quantum circuit building blocks
provided in PennyLane.

..

4. :doc:`measurements` presents the different options available to measure
the output of quantum circuits.

..

5. :doc:`templates` gives an overview of different larger-scale composable
layers for building quantum algorithms.

..

6. :doc:`optimizers` details the built-in tools for optimizing and training
quantum computing and quantum machine learning circuits.

..
PennyLane's design principle states that
circuits can be run on various kinds of simulators or hardware devices without making any changes --
the complex job of optimising communication with the devices, compiling circuits to suit the backend,
and choosing the best gradient strategies is taken care of.

7. :doc:`configuration` provides details about how to customize
PennyLane and provide credentials for quantum hardware access.
The library comes with default simulator devices, but is well-integrated with
`external software and hardware <https://pennylane.ai/plugins.html>`__ to run quantum
circuits---such as IBM's Qiskit, or Google's Cirq, Rigetti's Forest, or Xanadu's Strawberry Fields.