Dispatching contractions#

We employ dedicated methods for special contractions that appear in MPS and PEPS algorithms. Employing those methods in the algorithms provides a dispatching mechanism to utilize sparse tensor objects, e.g., yastn.tn.fpeps.DoublePepsTensor.

yastn.Tensor._attach_01(M, T)#

M._attach_01(T) == ncon([T, M], ((-0, 1, 2, -2), (2, 1, -1, -3))).

yastn.Tensor._attach_12(M, T)#

M._attach_12(T) == ncon([T, M], ((-0, 1, 2, -2), (-3, 2, 1, -1))).

yastn.Tensor._attach_23(M, T)#

M._attach_23(T) == ncon([T, M], ((-0, 1, 2, -2), (-1, -3, 2, 1))).

yastn.Tensor._attach_30(M, T)#

M._attach_30(T) == ncon([T, M], ((-0, 1, 2, -2), (1, -1, -3, 2))).