Skip to content

Commit e61373c

Browse files
committed
Support to set another conjugated tensor in contraction routine
1 parent e9c1dd0 commit e61373c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

varipeps/contractions/apply.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,10 @@ class definition for details.
121121
if f == "tensor":
122122
tensors.append(peps_tensors[ti])
123123
elif f == "tensor_conj":
124-
tensors.append(peps_tensors[ti].conj())
124+
if hasattr(peps_tensor_objs[ti], "tensor_conj") and peps_tensor_objs[ti].tensor_conj is not None:
125+
tensors.append(peps_tensor_objs[ti].tensor_conj)
126+
else:
127+
tensors.append(peps_tensors[ti].conj())
125128
else:
126129
tensors.append(getattr(peps_tensor_objs[ti], f))
127130

0 commit comments

Comments
 (0)