From 347cb354424482a0c2ae14dba2d32c37436a9069 Mon Sep 17 00:00:00 2001 From: tankya2 Date: Fri, 2 Feb 2024 12:53:48 +0800 Subject: [PATCH] Update readme --- README.md | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 25b499c..2e9b09c 100644 --- a/README.md +++ b/README.md @@ -4,22 +4,22 @@ To get started, `python setup.py install` to install the tools and dependencies. # Computation Supported -- Tensornet (TN) - - TN contraction to dense vector - - TN contraction to dense vector with Message Passing Interface (MPI) - - TN contraction to dense vector with NCCL - - TN contraction to expectation of given Pauli string - - TN contraction to expectation of given Pauli string with Message Passing Interface (MPI) - - TN contraction to expectation of given Pauli string with NCCL +1. Tensornet (TN) with contractions to: + - dense vector + - expecation of given Pauli string -- Matrix Product State (MPS) - - MPS contraction to dense vector + For each TN case: + - single node + - multi node with Message Passing Interface (MPI) + - multi node with NCCL + +2. Tensornet (TN) with contractions to: + - dense vector (single node) # Sample Codes ## Single Node The code below shows an example of how to activate the Cuquantum TensorNetwork backend of Qibo. -
-```
+```py
 import numpy as np
 from qibo import Circuit, gates
 import qibo
@@ -29,7 +29,6 @@ import qibo
 # If computation_settings is not specified, the default setting is used in which all booleans will be False. 
 # This will trigger the dense vector computation of the tensornet.
 
-computation_settings = {
     'MPI_enabled': False,
     'MPS_enabled': {
                 "qr_method": False,
@@ -70,13 +69,11 @@ result = c()
 
 print(result.state())
 ```
-
## Multi-Node Multi-node is enabled by setting either the MPI or NCCL enabled flag to True in the computation settings. Below shows the script to launch on 2 nodes with 2 GPUs each. $node_list contains the IP of the nodes assigned. -
-```
+
+```sh
 mpirun -n 4 -hostfile $node_list python test.py
-```
-
\ No newline at end of file +``` \ No newline at end of file