Wondering how difficult it is to extend `optimaltree` function to handle more general contraction, the "generalized tensor network" in * https://arxiv.org/abs/1710.01437 * https://arxiv.org/pdf/1806.05964 Or, must we switch to `treewidth` like algorithm? like https://arxiv.org/abs/quant-ph/0511069