Skip to content

Commit 6a98903

Browse files
committed
tensor3d move cyclic check
1 parent 332f202 commit 6a98903

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

quimb/tensor/tensor_3d.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,12 +1070,6 @@ def _contract_boundary_core(
10701070
compress_opts=None,
10711071
canonize_opts=None,
10721072
):
1073-
if self.is_cyclic_x() or self.is_cyclic_y() or self.is_cyclic_z():
1074-
raise NotImplementedError(
1075-
"Cannot yet use _contract_boundary_core "
1076-
"(i.e. `mode=\"peps\"`) on cyclic networks."
1077-
)
1078-
10791073
canonize_opts = ensure_dict(canonize_opts)
10801074
canonize_opts.setdefault("absorb", "right")
10811075
compress_opts = ensure_dict(compress_opts)
@@ -1581,6 +1575,15 @@ def contract_boundary(
15811575
contract_boundary_opts["canonize"] = canonize
15821576
contract_boundary_opts["compress_opts"] = compress_opts
15831577

1578+
if (
1579+
(mode == "peps") and
1580+
(self.is_cyclic_x() or self.is_cyclic_y() or self.is_cyclic_z())
1581+
):
1582+
raise NotImplementedError(
1583+
"Cannot yet use _contract_boundary_core "
1584+
"(i.e. `mode=\"peps\"`) on cyclic networks."
1585+
)
1586+
15841587
return self._contract_interleaved_boundary_sequence(
15851588
contract_boundary_opts=contract_boundary_opts,
15861589
sequence=sequence,

0 commit comments

Comments
 (0)