Skip to content

Commit

Permalink
Merge pull request #435 from qiboteam/docup
Browse files Browse the repository at this point in the history
documentation update
  • Loading branch information
scarrazza authored Jul 4, 2021
2 parents 6b7ef33 + 6ff50dc commit 8c5fe1b
Show file tree
Hide file tree
Showing 9 changed files with 316 additions and 50 deletions.
132 changes: 124 additions & 8 deletions doc/source/applications.rst
Original file line number Diff line number Diff line change
@@ -1,27 +1,143 @@
Application tutorials
=====================
Applications
============

In this section we present some examples of quantum circuits applied to specific
problems.

_______________________

Applications by topic
---------------------

Complexity theory
^^^^^^^^^^^^^^^^^

.. toctree::
:maxdepth: 1

tutorials/aavqe/README.md
tutorials/grover3sat/README.md
tutorials/adiabatic3sat/README.md


Condensed Matter Physics
^^^^^^^^^^^^^^^^^^^^^^^^

.. toctree::
:maxdepth: 1

tutorials/aavqe/README.md


Cryptography
^^^^^^^^^^^^

.. toctree::
:maxdepth: 1

tutorials/hash-grover/README.md


Finance
^^^^^^^

.. toctree::
:maxdepth: 1

tutorials/unary/README.md


High-Energy Physics
^^^^^^^^^^^^^^^^^^^

.. toctree::
:maxdepth: 1

tutorials/qPDF/qPDF.ipynb


Quantum Physics
^^^^^^^^^^^^^^^

.. toctree::
:maxdepth: 1

tutorials/qsvd/README.md
tutorials/3_tangle/README.md
tutorials/adiabatic/README.md
tutorials/shor/README.md
tutorials/bell-variational/README.md
tutorials/falqon/README.md
tutorials/grover/README.md

Quantum Machine Learning
^^^^^^^^^^^^^^^^^^^^^^^^

.. toctree::
:maxdepth: 1

tutorials/variational_classifier/README.md
tutorials/reuploading_classifier/README.md
tutorials/autoencoder/README.md
tutorials/EF_QAE/README.md

_______________________

Applications by algorithm
-------------------------

Variational Quantum Circuits
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. toctree::
:maxdepth: 1

tutorials/aavqe/README.md
tutorials/variational_classifier/README.md
tutorials/reuploading_classifier/README.md
tutorials/autoencoder/README.md
tutorials/qsvd/README.md
tutorials/3_tangle/README.md
tutorials/EF_QAE/README.md
tutorials/unary/README.md
tutorials/bell-variational/README.md
tutorials/qPDF/qPDF.ipynb


Grover's Algorithm
^^^^^^^^^^^^^^^^^^

.. toctree::
:maxdepth: 1

tutorials/grover3sat/README.md
tutorials/hash-grover/README.md
tutorials/grover/README.md


Shor's Factorization Algorithms
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. toctree::
:maxdepth: 1

tutorials/shor/README.md


Adiabatic Evolution
^^^^^^^^^^^^^^^^^^^

.. toctree::
:maxdepth: 1

tutorials/adiabatic/README.md
tutorials/adiabatic3sat/README.md
tutorials/EF_QAE/README.md
tutorials/shor/README.md
tutorials/qPDF/qPDF.ipynb
tutorials/bell-variational/README.md


FALQON
^^^^^^

.. toctree::
:maxdepth: 1

tutorials/falqon/README.md
tutorials/grover/README.md

Binary file modified doc/source/backends.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
179 changes: 157 additions & 22 deletions doc/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ present a schematic view of the currently supported backends.
.. image:: backends.png

Quantum simulation is proposed through dedicated backends for single node
multi-GPU and multi-threading CPU setups. Quantum hardware control is under
development.
multi-GPU and multi-threading CPU setups. Quantum hardware control is supported
for chips based on superconducting qubits.

_______________________

Expand All @@ -65,11 +65,22 @@ Base package
Simulation backends
^^^^^^^^^^^^^^^^^^^

We provide multiple simulation backends for Qibo, which are automatically loaded if the corresponding packages are installed, following the hierarchy below:
We provide multiple simulation backends for Qibo, which are automatically loaded
if the corresponding packages are installed, following the hierarchy below:

* :ref:`installing-qibotf` (*recommended*): an efficient simulation backend for CPU, GPU and multi-GPU based on TensorFlow custom operators. Install this package if you need to simulate quantum circuits with large number of qubits or complex quantum algorithms which may benefit from computing parallelism.
* :ref:`installing-qibojit`: an efficient simulation backend for CPU and GPU based on just-in-time (JIT) compiled custom operators. Install this package if you need to simulate quantum circuits with large number of qubits or complex quantum algorithms which may benefit from computing parallelism.
* :ref:`installing-qibotf`: an efficient simulation backend for CPU, GPU and multi-GPU based on TensorFlow custom operators. Install this package if you need to simulate quantum circuits with large number of qubits or complex quantum algorithms which may benefit from computing parallelism.
* :ref:`installing-tensorflow`: a pure TensorFlow implementation for quantum simulation which provides access to gradient descent optimization and the possibility to implement classical and quantum architectures together. This backend is not optimized for memory and speed, use :ref:`installing-qibotf` instead.
* :ref:`installing-numpy`: a lightweight quantum simulator shipped with the :ref:`installing-qibo` base package. Use this simulator if your CPU architecture is not supported by the other backends.
* :ref:`installing-numpy`: a lightweight quantum simulator shipped with the :ref:`installing-qibo` base package. Use this simulator if your CPU architecture is not supported by the other backends. Please note that the simulation performance is quite poor in comparison to other backends.

.. _hardware-backends:

Hardware backends
^^^^^^^^^^^^^^^^^

We provide the following hardware control backends for Qibo:

* :ref:`installing-qiboicarusq`: a module for laboratories, containing the specifics to operate Qibo on chips based on superconducting qubits, designed specifically for the IcarusQ experiment at `CQT <https://https://www.quantumlah.org/>`_.

_______________________

Expand All @@ -79,15 +90,15 @@ Operating systems support
In the table below we summarize the status of *pre-compiled binaries
distributed with pypi* for the packages listed above.

+------------------+------+------------------+------------+
| Operating System | qibo | qibotf (cpu/gpu) | tensorflow |
+==================+======+==================+============+
| Linux x86 | Yes | Yes/Yes | Yes |
+------------------+------+------------------+------------+
| MacOS >= 10.15 | Yes | Yes/No | Yes |
+------------------+------+------------------+------------+
| Windows | Yes | No/No | Yes |
+------------------+------+------------------+------------+
+------------------+------+---------+------------------+------------+
| Operating System | qibo | qibojit | qibotf (cpu/gpu) | tensorflow |
+==================+======+=========+==================+============+
| Linux x86 | Yes | Yes | Yes/Yes | Yes |
+------------------+------+---------+------------------+------------+
| MacOS >= 10.15 | Yes | Yes | Yes/No | Yes |
+------------------+------+---------+------------------+------------+
| Windows | Yes | Yes | No/No | Yes |
+------------------+------+---------+------------------+------------+

.. note::
All packages are supported for Python >= 3.6.
Expand Down Expand Up @@ -136,6 +147,79 @@ In order to install Qibo from source, you can simply clone the GitHub repository
_______________________

.. _installing-qibojit:

qibojit
^^^^^^^

The ``qibojit`` package contains a simulator implementation based on
just-in-time (JIT) custom kernels using `numba <https://numba.pydata.org/>`_
and `cupy <https://cupy.dev/>`_.

This backend is used by default, however, if needed, in order to switch to the
``qibojit`` backend please do:

.. code-block:: python
import qibo
qibo.set_backend("qibojit")
Installing with pip
"""""""""""""""""""

The installation using ``pip`` is the recommended approach to install
``qibojit``.

In order to install the package use the following command:

.. code-block:: bash
pip install qibo[qibojit]
The ``pip`` program will download and install all the required
dependencies.

.. note::
The ``pip`` package requires a cupy pre-compiled version with CUDA
support, so make sure the `cupy <https://cupy.dev/>`_ version installed
matches the specifics of your GPU and drivers.


Installing from source
""""""""""""""""""""""

The installation procedure presented in this section is useful if you have to
develop the code from source.

In order to install the package perform the following steps:

.. code-block::
git clone https://github.com/qiboteam/qibojit.git
cd qibojit
then proceed with the installation of requirements with:

.. code-block::
pip install -r requirements.txt
Then proceed with the ``qibojit`` installation using ``pip``

.. code-block::
pip install .
or if you prefer to manually execute all installation steps:

.. code-block::
# builds binaries
python setup.py deve
_______________________

.. _installing-qibotf:

qibotf
Expand All @@ -144,8 +228,7 @@ qibotf
The ``qibotf`` package contains a custom simulator implementation based on
TensorFlow and custom operators in CUDA/C++.

This backend is used by default, however, if needed, in order to switch to the
``qibotf`` backend please do:
If needed, in order to switch to the ``qibotf`` backend please do:

.. code-block:: python
Expand All @@ -169,13 +252,12 @@ The ``pip`` program will download and install all the required
dependencies.

.. note::
The ``pip`` packages for linux are compiled with CUDA support, so if your
system has a NVIDIA GPU, Qibo will perform calculations on GPU. Note that
``qibotf`` uses TensorFlow for GPU management, if your system has a NVIDIA
GPU, make sure TensorFlow runs on GPU, please refer to the `official
documentation <https://www.tensorflow.org/install/gpu>`_.
The ``pip`` packages for linux are compiled with CUDA support, so if your
system has a NVIDIA GPU, Qibo will perform calculations on GPU. Note that
``qibotf`` uses TensorFlow for GPU management, if your system has a NVIDIA
GPU, make sure TensorFlow runs on GPU, please refer to the `official
documentation <https://www.tensorflow.org/install/gpu>`_.

.. _installing-from-source:

Installing from source
""""""""""""""""""""""
Expand Down Expand Up @@ -244,6 +326,8 @@ or if you prefer to manually execute all installation steps:
# installs the Qibo packages
python setup.py install # or python setup.py develop
_______________________

.. _installing-tensorflow:
Expand Down Expand Up @@ -291,3 +375,54 @@ please do:
import qibo
qibo.set_backend("numpy")
_______________________

.. _installing-qiboicarusq:

qiboicarusq
^^^^^^^^^^^

The ``qiboicarusq`` package contains the hardware control drivers for chips
based on superconducting qubits. More details are available at the code
`repository <https://github.com/qiboteam/qiboicarusq.git>`_.

This backend is designed for laboratories, in order to switch to the ``qiboicarusq``
backend please do:

.. code-block:: python
import qibo
qibo.set_backend("qiboicarusq")
Installing from source
""""""""""""""""""""""

The installation procedure presented in this section is useful if you have to
install and develop the code from source.

In order to install the package perform the following steps:

.. code-block::
git clone https://github.com/qiboteam/qiboicarusq.git
cd qiboicarusq
then proceed with the installation of requirements with:

.. code-block::
pip install -r requirements.txt
Then proceed with the ``qiboicarusq`` installation using ``pip``

.. code-block::
pip install .
or if you prefer to manually execute all installation steps:

.. code-block::
# builds binaries
python setup.py develop
Loading

0 comments on commit 8c5fe1b

Please sign in to comment.