Skip to content

Commit 54bd507

Browse files
fix non tensor input
1 parent d76df7d commit 54bd507

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tensorcircuit/quantum.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1426,7 +1426,8 @@ def PauliString2COO(l: Sequence[int], weight: Optional[float] = None) -> Tensor:
14261426
:rtype: Tensor
14271427
"""
14281428
n = len(l)
1429-
l = backend.cast(l, dtype="int64")
1429+
l = num_to_tensor(l, dtype="int64")
1430+
# l = backend.cast(l, dtype="int64")
14301431
one = num_to_tensor(0b1, dtype="int64")
14311432
idx_x = num_to_tensor(0b0, dtype="int64")
14321433
idx_y = num_to_tensor(0b0, dtype="int64")

0 commit comments

Comments
 (0)