File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -243,6 +243,23 @@ however different strategies to modify this order.
243243 because they share an index label which is next in the `order` list, all other indices
244244 with shared label among them will be contracted, irrespective of their order.
245245
246+ !!! warning "Combining order specifications"
247+
248+ Note that it is currently not possible to combine the NCON style convention of specifying
249+ indices with the use of parentheses. If both are used at the same time, the parentheses
250+ take precedence and the NCON style will be ignored. Any remaining contraction orders
251+ will be evaluated in the default left to right order. For example, in the following
252+ contractions, we have `E1 = A * ((B * D) * C)`, but `E2 = A * ((B * C) * D)`. This is
253+ true even when the parentheses are compatible with the NCON contraction order, as is
254+ the case here.
255+
256+ ```julia
257+ @tensor E1[-1 -2 -3; -4] := A[-1 -2 -3; 4 5] * B[4; 1] * C[5; 2] * D[1 2; -4]
258+ @tensor E2[-1 -2 -3; -4] := A[-1 -2 -3; 4 5] * (B[4; 1] * C[5; 2] * D[1 2; -4])
259+ ```
260+
261+ Additionally, combining the `order = (...)` keyword with parentheses is currently not supported.
262+
246263In the case of more complex tensor networks, the optimal contraction order cannot always
247264easily be guessed or determined on plain sight. It is then useful to be able to optimize the
248265contraction order automatically, given a model for the complexity of contracting the
You can’t perform that action at this time.
0 commit comments