Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 4, 2024
1 parent fe83631 commit c3a845c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/qibotn/backends/cutensornet.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def __init__(self, runcard):
super().__init__()
import cuquantum
from cuquantum import cutensornet as cutn # pylint: disable=import-error

if runcard is not None:
self.MPI_enabled = runcard.get("MPI_enabled", False)
self.NCCL_enabled = runcard.get("NCCL_enabled", False)
Expand Down
8 changes: 4 additions & 4 deletions src/qibotn/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def dense_vector_tn_MPI(qibo_circ, datatype, n_samples=8):
Dense vector of quantum circuit.
"""

import cuquantum.cutensornet as cutn
from cuquantum import Network
from mpi4py import MPI
import cuquantum.cutensornet as cutn

root = 0
comm = MPI.COMM_WORLD
Expand Down Expand Up @@ -150,10 +150,10 @@ def dense_vector_tn_nccl(qibo_circ, datatype, n_samples=8):
Returns:
Dense vector of quantum circuit.
"""
import cuquantum.cutensornet as cutn
from cupy.cuda import nccl
from cuquantum import Network
from mpi4py import MPI
import cuquantum.cutensornet as cutn

root = 0
comm_mpi = MPI.COMM_WORLD
Expand Down Expand Up @@ -259,10 +259,10 @@ def expectation_pauli_tn_nccl(qibo_circ, datatype, pauli_string_pattern, n_sampl
Returns:
Expectation of quantum circuit due to pauli string.
"""
import cuquantum.cutensornet as cutn
from cupy.cuda import nccl
from cuquantum import Network
from mpi4py import MPI
import cuquantum.cutensornet as cutn

root = 0
comm_mpi = MPI.COMM_WORLD
Expand Down Expand Up @@ -368,9 +368,9 @@ def expectation_pauli_tn_MPI(qibo_circ, datatype, pauli_string_pattern, n_sample
Returns:
Expectation of quantum circuit due to pauli string.
"""
import cuquantum.cutensornet as cutn
from cuquantum import Network
from mpi4py import MPI # this line initializes MPI
import cuquantum.cutensornet as cutn

root = 0
comm = MPI.COMM_WORLD
Expand Down

0 comments on commit c3a845c

Please sign in to comment.