Greedy(; metric = removedsize, choose = pop!)
Greedy contraction path solver. Greedily selects contractions that maximize a metric.
metricis a function that evaluates candidate pairwise tensor contractions. Defaults to
chooseis a function that extracts a pairwise tensor contraction between candidates. Defaults to candidate that maximize
true, consider outer products as candidates. Defaults to
The implementation uses a binary heaptree to sort candidate pairwise tensor contractions. Then recursively,
- Selects and extracts a candidate from the heaptree using the
- Updates the
metricof the candidates which contain neighbouring indices to the one selected.
- Append the selected index to the path and go back to step 1.