Skip to content

Commit

Permalink
Remove import quantum
Browse files Browse the repository at this point in the history
  • Loading branch information
Tankya2 committed Oct 30, 2024
1 parent f33c44e commit f9e74fe
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/qibotn/backends/cutensornet.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class CuTensorNet(NumpyBackend): # pragma: no cover

def __init__(self, runcard):
super().__init__()
import cuquantum
from cuquantum import cudaDataType, ComputeType, __version__ # pylint: disable=import-error
from cuquantum import cutensornet as cutn # pylint: disable=import-error

if runcard is not None:
Expand Down Expand Up @@ -59,22 +59,21 @@ def __init__(self, runcard):
self.expectation_enabled = False

self.name = "qibotn"
self.cuquantum = cuquantum
self.cutn = cutn
self.platform = "cutensornet"
self.versions["cuquantum"] = self.cuquantum.__version__
self.versions["cuquantum"] = __version__
self.supports_multigpu = True
self.handle = self.cutn.create()

global CUDA_TYPES
CUDA_TYPES = {
"complex64": (
self.cuquantum.cudaDataType.CUDA_C_32F,
self.cuquantum.ComputeType.COMPUTE_32F,
cudaDataType.CUDA_C_32F,
ComputeType.COMPUTE_32F,
),
"complex128": (
self.cuquantum.cudaDataType.CUDA_C_64F,
self.cuquantum.ComputeType.COMPUTE_64F,
cudaDataType.CUDA_C_64F,
ComputeType.COMPUTE_64F,
),
}

Expand Down

0 comments on commit f9e74fe

Please sign in to comment.