-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
629a584
commit 8c9bc60
Showing
1 changed file
with
41 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,43 @@ | ||
API | ||
=== | ||
Quick start | ||
----------- | ||
----------- | ||
|
||
.. autosummary:: | ||
:toctree: generated | ||
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. | ||
|
||
lumache | ||
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()) | ||
|
||
.. |