Skip to content

Commit e6f5208

Browse files
committed
Fixed a tiny bug.
1 parent 39b1e67 commit e6f5208

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tensorcircuit/mpscircuit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ def measure(
10771077
backend.convert_to_tensor(np.array([1.0], dtype=dtypestr)),
10781078
)
10791079

1080-
p = p * backend.sum(ps * m)
1080+
p = p * backend.sum(ps * backend.cast(m, dtype=rdtypestr))
10811081
mps._mps.tensors[site] = backend.einsum("iaj,a->ij", tensor, m)[:, None, :]
10821082
sample = backend.stack(sample)
10831083
sample = backend.real(sample)

0 commit comments

Comments
 (0)