diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..d0c3cbf --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = source +BUILDDIR = build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 0000000..747ffb7 --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.https://www.sphinx-doc.org/ + exit /b 1 +) + +if "%1" == "" goto help + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/docs/source/Installation.rst b/docs/source/Installation.rst new file mode 100644 index 0000000..2cfa720 --- /dev/null +++ b/docs/source/Installation.rst @@ -0,0 +1,23 @@ +Usage +----- +----- + +Installation +------------ + +To use QiboTn, first install it using pip: + +.. code-block:: console + (.venv) $pip install lumache + +Creating recipes +---------------- + +To retrieve a list of random ingredients, +you can use the ``lumache.get_random_ingredients()`` function: + +.. autofunction:: lumache.get_random_ingredients +>>> import lumache +>>> lumache.get_random_ingredients() +['shells', 'gorgonzola', 'parsley'] + diff --git a/docs/source/Quickstart.rst b/docs/source/Quickstart.rst new file mode 100644 index 0000000..a64af0a --- /dev/null +++ b/docs/source/Quickstart.rst @@ -0,0 +1,7 @@ +API +=== + +.. autosummary:: + :toctree: generated + + lumache \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py new file mode 100644 index 0000000..74bba04 --- /dev/null +++ b/docs/source/conf.py @@ -0,0 +1,61 @@ +# Configuration file for the Sphinx documentation builder. +# +# For the full list of built-in configuration values, see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +import os +import sys +from recommonmark.transform import AutoStructify + +sys.path.insert(0, os.path.abspath("..")) + +import qibotn + +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information + +project = 'Qibotn' +copyright = "The Qibo team" +author = "The Qibo team" + +# The full version, including alpha/beta/rc tags +release = qibotn.__version__ + +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + + +master_doc = "index" + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + "sphinx.ext.autodoc", + "sphinx.ext.doctest", + "sphinx.ext.coverage", + "sphinx.ext.napoleon", + "sphinx.ext.intersphinx", + "sphinx_copybutton", + "recommonmark", + "nbsphinx", + "sphinxcontrib.katex", +] + +templates_path = ['_templates'] +exclude_patterns = [] + + + +# -- Options for HTML output ------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output + +html_theme = "furo" +html_static_path = ['_static'] + diff --git a/docs/source/index.rst b/docs/source/index.rst new file mode 100644 index 0000000..2539a33 --- /dev/null +++ b/docs/source/index.rst @@ -0,0 +1,61 @@ +.. title:: + QiboTN + +What is QiboTN? +================================== +QiboTN is the dedicated `Qibo `_ backend to support large-scale simulation of quantum circuits and acceleration. + +Supported Computation: + +- Tensornet (TN) +- Matrix Product States (MPS) + +Tensor Network contractions to: + +- dense vectors +- expecation values of given Pauli string + +The supported HPC configurations are: + +- single-node CPU +- single-node GPU or GPUs +- multi-node multi-GPU with Message Passing Interface (MPI) +- multi-node multi-GPU with NVIDIA Collective Communications Library (NCCL) + +Currently, the supported tensor network libraries are: + +- [cuQuantum](https://github.com/NVIDIA/cuQuantum), an NVIDIA SDK of optimized libraries and tools for accelerating quantum computing workflows. +- [quimb](https://quimb.readthedocs.io/en/latest/), an easy but fast python library for ‘quantum information many-body’ calculations, focusing primarily on tensor networks. + +How to Use the Documentation +============================ + +Welcome to the comprehensive documentation for QiboTN! This guide will help you navigate through the various sections and make the most of the resources available. + + +1. **Getting started**: Begin by referring to the + :doc:`/Installation/` guide to set up the ``QiboTN`` library in your environment. + +2. **Tutorials**: Explore the :doc:`Quickstart/` section for basic usage examples + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + +Contents +-------- +-------- + +.. toctree:: + + usage + api + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search`