From 6bdf100b3b80ad3a6533ec9fe2274d5f328f45f0 Mon Sep 17 00:00:00 2001 From: tankya2 Date: Tue, 30 Jan 2024 15:54:53 +0800 Subject: [PATCH] Update function call name [skip CI] --- src/qibotn/backends/gpu.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/qibotn/backends/gpu.py b/src/qibotn/backends/gpu.py index 2d28987..47f667f 100644 --- a/src/qibotn/backends/gpu.py +++ b/src/qibotn/backends/gpu.py @@ -71,9 +71,8 @@ class CuTensorNet(NumpyBackend): # pragma: no cover """ - import qibotn.src.qibotn.eval + import qibotn.eval as eval - cutn = qibotn.eval MPI_enabled = self.MPI_enabled MPS_enabled = self.MPS_enabled NCCL_enabled = self.NCCL_enabled @@ -89,7 +88,7 @@ class CuTensorNet(NumpyBackend): # pragma: no cover raise_error(NotImplementedError, "QiboTN cannot support initial state.") - state = cutn.eval(circuit, self.dtype) + state = eval.dense_vector_tn(circuit, self.dtype) if ( MPI_enabled == False @@ -108,7 +107,7 @@ class CuTensorNet(NumpyBackend): # pragma: no cover "abs_cutoff": 1e-12, }, } # make this user input - state = cutn.eval_mps(circuit, gate_algo, self.dtype) + state = eval.dense_vector_mps(circuit, gate_algo, self.dtype) if ( MPI_enabled == True @@ -120,7 +119,7 @@ class CuTensorNet(NumpyBackend): # pragma: no cover raise_error(NotImplementedError, "QiboTN cannot support initial state.") - state, rank = cutn.eval_tn_MPI(circuit, self.dtype, 32) + state, rank = eval.dense_vector_tn_MPI(circuit, self.dtype, 32) if rank > 0: state = np.array(0) @@ -134,7 +133,7 @@ class CuTensorNet(NumpyBackend): # pragma: no cover raise_error(NotImplementedError, "QiboTN cannot support initial state.") - state, rank = cutn.eval_tn_nccl(circuit, self.dtype, 32) + state, rank = eval.dense_vector_tn_nccl(circuit, self.dtype, 32) if rank > 0: state = np.array(0) @@ -148,7 +147,7 @@ class CuTensorNet(NumpyBackend): # pragma: no cover raise_error(NotImplementedError, "QiboTN cannot support initial state.") - state = cutn.eval_expectation(circuit, self.dtype) + state = eval.expectation_tn(circuit, self.dtype) if ( MPI_enabled == True @@ -160,7 +159,7 @@ class CuTensorNet(NumpyBackend): # pragma: no cover raise_error(NotImplementedError, "QiboTN cannot support initial state.") - state, rank = cutn.eval_tn_MPI_expectation( + state, rank = eval.expectation_tn_MPI( circuit, self.dtype, 32) if rank > 0: @@ -176,7 +175,7 @@ class CuTensorNet(NumpyBackend): # pragma: no cover raise_error(NotImplementedError, "QiboTN cannot support initial state.") - state, rank = cutn.eval_tn_nccl_expectation( + state, rank = eval.expectation_tn_nccl( circuit, self.dtype, 32) if rank > 0: