Skip to content

Commit

Permalink
Improve quickstart - Introduction (#2530)
Browse files Browse the repository at this point in the history
* change introduction

* add pics

* figure out best figure placement

* improve first sentence

* Update doc/introduction/pennylane.rst

* Update doc/introduction/pennylane.rst

* Update doc/introduction/pennylane.rst

* finalise first sentence

Co-authored-by: Josh Izaac <josh146@gmail.com>
  • Loading branch information
mariaschuld and josh146 committed May 4, 2022
1 parent e326486 commit fb797be
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 70 deletions.
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.
99 changes: 29 additions & 70 deletions doc/introduction/pennylane.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,85 +3,44 @@

.. _pl_intro:

Introduction
============
What is PennyLane?
==================

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 programming quantum computers.
Its differentiable programming paradigm enables the execution and training of quantum programs on various 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.

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
: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.

0 comments on commit fb797be

Please sign in to comment.