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

Replace index page with overview page #79

Merged
merged 1 commit into from
Apr 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ learning, automatic differentiation, and optimization of hybrid quantum-classica

`Qiskit <https://qiskit.org/documentation/>`_ is an open-source framework for quantum computing.

.. header-end-inclusion-marker-do-not-remove

Features
========
Expand All @@ -55,7 +56,6 @@ Features
* Combine Qiskit's high performance simulator and hardware backend support with PennyLane's automatic
differentiation and optimization.

.. header-end-inclusion-marker-do-not-remove
.. installation-start-inclusion-marker-do-not-remove

Installation
Expand Down
2 changes: 1 addition & 1 deletion doc/code.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This section contains the API documentation for the PennyLane-Qiskit plugin.
Unless you are a PennyLane plugin developer, you likely do not need
to use these classes and functions directly.

See the :doc:`devices overview </devices/overview>` page for more
See the :doc:`overview </index>` page for more
details using the available Qiskit devices with PennyLane.

.. currentmodule:: pennylane_qiskit
Expand Down
71 changes: 0 additions & 71 deletions doc/devices/overview.rst

This file was deleted.

83 changes: 71 additions & 12 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,84 @@ PennyLane-Qiskit Plugin

:Release: |release|

.. image:: _static/puzzle.png
:align: center
:width: 70%
:target: javascript:void(0);

|

.. include:: ../README.rst
:start-after: header-start-inclusion-marker-do-not-remove
:end-before: header-end-inclusion-marker-do-not-remove

.. include:: ../README.rst
:start-after: license-start-inclusion-marker-do-not-remove
:end-before: license-end-inclusion-marker-do-not-remove

Once the PennyLane-Qiskit plugin is installed, the the Qiskit devices
can be accessed straightaway in PennyLane, without the need to import new packages.

Devices
~~~~~~~

Currently, there are three different devices available:

.. devicegalleryitem::
:name: 'qiskit.aer'
:description: Qiskit's staple simulator with great features such as noise models.
:link: devices/aer.html

.. devicegalleryitem::
:name: 'qiskit.basicaer'
:description: A simplified version of the Aer device, which requires fewer dependencies.
:link: devices/basicaer.html

.. devicegalleryitem::
:name: 'qiskit.ibmq'
:description: Allows integration with qiskit's hardware backends, and hardware-specific simulators.
:link: devices/ibmq.html

.. raw:: html

<div style='clear:both'></div>
</br>

For example, the ``'qiskit.aer'`` device with two wires is called like this:

.. code-block:: python

import pennylane as qml
dev = qml.device('qiskit.aer', wires=2)


Backends
~~~~~~~~

Qiskit devices have different **backends**, which define which actual simulator or hardware is used by the
device. Different simulator backends are optimized for different types of circuits. A backend can be defined as
follows:

.. code-block:: python

dev = qml.device('qiskit.aer', wires=2, backend='unitary_simulator')

PennyLane chooses the ``qasm_simulator`` as the default backend if no backend is specified.
For more details on the ``qasm_simulator``, including available backend options, see
`Qiskit Qasm Simulator documentation <https://qiskit.org/documentation/stubs/qiskit.providers.aer.QasmSimulator.html>`_.

Tutorials
~~~~~~~~~

To see the PennyLane-Qiskit plugin in action, you can use any of the qubit based `demos
from the PennyLane documentation <https://pennylane.ai/qml/demonstrations.html>`_, for example
the tutorial on `qubit rotation <https://pennylane.ai/qml/demos/tutorial_qubit_rotation.html>`_,
and simply replace ``'default.qubit'`` with any of the available Qiskit devices, such as ``'qiskit.aer'``:

.. code-block:: python

dev = qml.device('qiskit.aer', wires=XXX)

You can also try to run tutorials, such as the qubit rotation tutorial, on actual quantum hardware by
using the ``'qiskit.ibmq'`` device.

To filter tutorials that explicitly use a qiskit device, use the "Qiskit" filter on the right panel of the
`demos <https://pennylane.ai/qml/demonstrations.html>`_.



.. toctree::
:maxdepth: 2
:caption: Getting started
:titlesonly:
:hidden:

Expand All @@ -32,7 +92,6 @@ PennyLane-Qiskit Plugin
:caption: Usage
:hidden:

devices/overview
devices/aer
devices/basicaer
devices/ibmq
Expand Down
2 changes: 1 addition & 1 deletion doc/xanadu_theme/globaltoc.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ <h2>{{ _('Table Of Contents') }}</h2>
<p class="caption">{{ theme_project_nav_name or shorttitle }}</p>
<ul>
<li class="caption toctree-l1 {{'current' if pagename == 'index' }}">
<a class="reference internal" href="{{ pathto('index') }}">About</a>
<a class="reference internal" href="{{ pathto('index') }}">Overview</a>
</li>
</ul>
{% set toctree = toctree(maxdepth=1, collapse=True, includehidden=True) %}
Expand Down