Files
final-qibotn/doc/source/getting-started/quickstart.rst
Alessandro Candido 63c3a19fb4 docs: Move to standard folder naming
I also like docs/ more than doc/, but it's the standard in Qibo, and this is valuable
2024-03-01 22:49:34 +01:00

53 lines
1.1 KiB
ReStructuredText

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())
..