macro_rules! path {
[] => { ... };
[$( ($t0:expr, $t1:expr) ),*] => { ... };
[ { $( ( $index:expr, [ $( $tok:tt )* ] ) ),* $(,)? } $(, ($t0:expr, $t1:expr) )* ] => { ... };
}Expand description
Macro to create (nested) contraction paths, assuming the left tensor is replaced in each contraction.
For instance, path![{(2, [(0, 2), (0, 1)])}, (0, 1), (0, 2)] creates a nested
contraction path that
- recursively contracts the composite tensor 2 with the contraction path
[(0, 2), (0, 1)] - contracts tensors 0 and 1, replacing tensor 0 with the result
- contracts tensors 0 and (now contracted) tensor 2, replacing tensor 0 with the result