Skip to content

Commit e20abf4

Browse files
committed
circuit: fix #240 trivial TN circuit rehearsal
1 parent cafc423 commit e20abf4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

quimb/tensor/circuit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1350,7 +1350,7 @@ def rehearsal_dict(tn, tree):
13501350
"tn": tn,
13511351
"tree": tree,
13521352
"W": tree.contraction_width(),
1353-
"C": math.log10(tree.contraction_cost()),
1353+
"C": math.log10(max(tree.contraction_cost(), 1)),
13541354
}
13551355

13561356

0 commit comments

Comments
 (0)