Fix the rendering issue
This commit is contained in:
@@ -3,27 +3,32 @@ Quick start
|
|||||||
|
|
||||||
Setting the backend
|
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,
|
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.
|
||||||
|
|
||||||
.. testcode::
|
To use cuQuantum library, cutensornet can be specified as follows:
|
||||||
qibo.set_backend(backend="qibotn", platform="cutensornet", runcard=computation_settings)
|
|
||||||
..
|
|
||||||
|
|
||||||
and for Quimb library
|
.. code-block:: bash
|
||||||
|
|
||||||
|
qibo.set_backend(
|
||||||
|
backend="qibotn", platform="cutensornet", runcard=computation_settings
|
||||||
|
)
|
||||||
|
|
||||||
|
Similarly, to use Quimb library, QuimbBackend can be as follows:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
.. testcode::
|
|
||||||
qibo.set_backend(
|
qibo.set_backend(
|
||||||
backend="qibotn", platform="QuimbBackend", runcard=computation_settings
|
backend="qibotn", platform="QuimbBackend", runcard=computation_settings
|
||||||
)
|
)
|
||||||
..
|
|
||||||
|
|
||||||
Setting the runcard
|
Setting the runcard
|
||||||
"""""""""""""""""""
|
"""""""""""""""""""
|
||||||
Basic structure of runcard is
|
|
||||||
|
|
||||||
.. testcode::
|
The basic structure of the runcard is as follows:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
computation_settings = {
|
computation_settings = {
|
||||||
"MPI_enabled": False,
|
"MPI_enabled": False,
|
||||||
"MPS_enabled": False,
|
"MPS_enabled": False,
|
||||||
@@ -32,14 +37,17 @@ Basic structure of runcard is
|
|||||||
"pauli_string_pattern": "IXZ",
|
"pauli_string_pattern": "IXZ",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
..
|
|
||||||
|
|
||||||
Basic example
|
Basic example
|
||||||
"""""""""""""
|
"""""""""""""
|
||||||
|
|
||||||
.. testcode::
|
The following is a basic example:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
# Construct the circuit
|
# Construct the circuit
|
||||||
c = Circuit(2)
|
c = Circuit(2)
|
||||||
|
|
||||||
# Add some gates
|
# Add some gates
|
||||||
c.add(gates.H(0))
|
c.add(gates.H(0))
|
||||||
c.add(gates.H(1))
|
c.add(gates.H(1))
|
||||||
@@ -48,5 +56,3 @@ Basic example
|
|||||||
result = c()
|
result = c()
|
||||||
|
|
||||||
print(result.state())
|
print(result.state())
|
||||||
|
|
||||||
..
|
|
||||||
|
|||||||
Reference in New Issue
Block a user