Re-organize the files into subfolders as per Qibo doc convention
This commit is contained in:
committed by
Alessandro Candido
parent
45a28a025c
commit
3ddb866e89
11
docs/source/getting-started/index.rst
Normal file
11
docs/source/getting-started/index.rst
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
Getting started
|
||||||
|
===============
|
||||||
|
|
||||||
|
In this section we present the basic aspects of the Qibotn design and provide installation instructions.
|
||||||
|
Please visit the following sections to understand how ``qibotn`` works.
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
|
||||||
|
installation
|
||||||
|
quickstart
|
||||||
10
docs/source/getting-started/installation.rst
Normal file
10
docs/source/getting-started/installation.rst
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
Installation instructions
|
||||||
|
=========================
|
||||||
|
|
||||||
|
QiboTN can be installed directly from the source repository on Github:
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
git clone https://github.com/qiboteam/qibotn.git
|
||||||
|
cd qibotn
|
||||||
|
poetry install
|
||||||
51
docs/source/getting-started/quickstart.rst
Normal file
51
docs/source/getting-started/quickstart.rst
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
Quick start
|
||||||
|
===========
|
||||||
|
|
||||||
|
Setting the backend
|
||||||
|
"""""""""""""""""""
|
||||||
|
QiboTN supports two backends cutensornet (using CuQuantum library) and Quimbbackend (using Quimb library) for tensor network based simulations. The backend can be set using the following command line.
|
||||||
|
|
||||||
|
For CuQuantum library,
|
||||||
|
|
||||||
|
.. testcode::
|
||||||
|
qibo.set_backend(backend="qibotn", platform="cutensornet", runcard=computation_settings)
|
||||||
|
..
|
||||||
|
|
||||||
|
and for Quimb library
|
||||||
|
|
||||||
|
.. testcode::
|
||||||
|
qibo.set_backend(
|
||||||
|
backend="qibotn", platform="QuimbBackend", runcard=computation_settings
|
||||||
|
)
|
||||||
|
..
|
||||||
|
|
||||||
|
Setting the runcard
|
||||||
|
""""""""""""""""""""
|
||||||
|
Basic structure of runcard is
|
||||||
|
|
||||||
|
.. testcode::
|
||||||
|
computation_settings = {
|
||||||
|
"MPI_enabled": False,
|
||||||
|
"MPS_enabled": False,
|
||||||
|
"NCCL_enabled": False,
|
||||||
|
"expectation_enabled": {
|
||||||
|
"pauli_string_pattern": "IXZ",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
..
|
||||||
|
|
||||||
|
Basic example
|
||||||
|
""""""""""""
|
||||||
|
.. testcode::
|
||||||
|
# Construct the circuit
|
||||||
|
c = Circuit(2)
|
||||||
|
# Add some gates
|
||||||
|
c.add(gates.H(0))
|
||||||
|
c.add(gates.H(1))
|
||||||
|
|
||||||
|
# Execute the circuit and obtain the final state
|
||||||
|
result = c()
|
||||||
|
|
||||||
|
print(result.state())
|
||||||
|
|
||||||
|
..
|
||||||
@@ -46,8 +46,8 @@ Contents
|
|||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
:caption: Introduction
|
:caption: Introduction
|
||||||
Installation
|
|
||||||
Quickstart
|
getting-started/index
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
|
|||||||
Reference in New Issue
Block a user