We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bdf8c4f commit e3f80c2Copy full SHA for e3f80c2
src/qutip_cuquantum/state.py
@@ -43,6 +43,8 @@ def __init__(self, arg, hilbert_dims=None, shape=None, copy=True):
43
shape = arg.shape
44
if hilbert_dims is not None:
45
assert arg.base.hilbert_space_dims == hilbert_dims
46
+ if copy:
47
+ arg = arg.copy()
48
base = arg.base
49
50
elif (CuPyDense is not None and isinstance(arg, CuPyDense)) or isinstance(arg, cp.ndarray):
0 commit comments