SyTen

◆ SYTEN_STABLE_TENSOR_SORT

#define SYTEN_STABLE_TENSOR_SORT

There currently appear to be a few places in the toolkit that are extremely sensitive to the ordering of blocks within a tensor.

Ideally, this should not be the case, but

  • firstly, I'm not entirely sure where all these places are and
  • secondly, I'm not entirely sure it is possible to entirely rely on quantum numbers to determine the position of blocks within a tensor.

If you are positive that you fixed both issues, you can undefine this and potentially remove the guarded pieces below. Please test extensively with large-scale calculations.

~ Claudius, 2016-03-09

This appears to be strongly linked to a relatively fast loss of precision in heavily-operated-on CGC tensors. When sorting blocks by number of operations prior to acting on them in Tensor::reduce(), this problem is avoided perfectly. However, the way to count those number of operations still appears somewhat imperfect at the moment so we'll stick with preserving tensor ordering as much as possible for now. In the long term, this may be beneficial, see issue K9ABw and commit 49f51327f for details.

~ Claudius, 2017-05-26