Skip to content

Commit

Permalink
Update function call name [skip CI]
Browse files Browse the repository at this point in the history
  • Loading branch information
Tankya2 committed Jan 30, 2024
1 parent 93331aa commit 391d252
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/qibotn/backends/gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,8 @@ def execute_circuit(
"""

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
Expand All @@ -89,7 +88,7 @@ def execute_circuit(
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
Expand All @@ -108,7 +107,7 @@ def execute_circuit(
"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
Expand All @@ -120,7 +119,7 @@ def execute_circuit(
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)

Expand All @@ -134,7 +133,7 @@ def execute_circuit(
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)

Expand All @@ -148,7 +147,7 @@ def execute_circuit(
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
Expand All @@ -160,7 +159,7 @@ def execute_circuit(
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:
Expand All @@ -176,7 +175,7 @@ def execute_circuit(
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:
Expand Down

0 comments on commit 391d252

Please sign in to comment.