As used in
|
auto idxs = get_unique_indices(Product(ts)); |
this function is not suitable as it won't update proto-indices in case one of the proto-indices in an expression gets contracted.
This is illustrated by the current code producing:
I{a_3<i_2,i_3>,a_4<i_2,i_3>;i_1,i_2}:N-N-N = 3 f{i_3;i_1}:N-C-S * t{a_3<i_2,i_3>,a_4<i_2,i_3>;i_2,i_3}:N-C-S
where the proto indices should now be a_3<i_2,i_1> and a_2<i_2,i_1>.
/CC @bimalgaudel