|
68 | 68 | # the transfer operation of a density matrix with a utility leg in its codomain is ill defined - how should one braid the utility leg? |
69 | 69 | # hence the checks - to make sure that this operation is uniquely defined |
70 | 70 | function transfer_left(v::MPSTensor{S}, A::MPSTensor{S}, Ab::MPSTensor{S}) where {S} |
71 | | - _can_unambiguously_braid(space(v, 2)) || |
72 | | - throw(ArgumentError("transfer is not uniquely defined with utility space $(space(v,2))")) |
| 71 | + check_ambiguous_braiding(space(v, 2)) |
73 | 72 | @plansor v[-1 -2; -3] := v[1 2; 4] * A[4 5; -3] * τ[2 3; 5 -2] * conj(Ab[1 3; -1]) |
74 | 73 | end |
75 | 74 | function transfer_right(v::MPSTensor{S}, A::MPSTensor{S}, Ab::MPSTensor{S}) where {S} |
76 | | - _can_unambiguously_braid(space(v, 2)) || |
77 | | - throw(ArgumentError("transfer is not uniquely defined with utility space $(space(v,2))")) |
| 75 | + check_ambiguous_braiding(space(v, 2)) |
78 | 76 | @plansor v[-1 -2; -3] := A[-1 2; 1] * τ[-2 4; 2 3] * conj(Ab[-3 4; 5]) * v[1 3; 5] |
79 | 77 | end |
80 | 78 |
|
81 | 79 | # the transfer operation with a utility leg in both the domain and codomain is also ill defined - only due to the codomain utility space |
82 | 80 | function transfer_left(v::MPOTensor{S}, A::MPSTensor{S}, Ab::MPSTensor{S}) where {S} |
83 | | - _can_unambiguously_braid(space(v, 2)) || |
84 | | - throw(ArgumentError("transfer is not uniquely defined with utility space $(space(v,2))")) |
| 81 | + check_ambiguous_braiding(space(v, 2)) |
85 | 82 | @plansor t[-1 -2; -3 -4] := v[1 2; -3 4] * A[4 5; -4] * τ[2 3; 5 -2] * conj(Ab[1 3; -1]) |
86 | 83 | end |
87 | 84 | function transfer_right(v::MPOTensor{S}, A::MPSTensor{S}, Ab::MPSTensor{S}) where {S} |
88 | | - _can_unambiguously_braid(space(v, 2)) || |
89 | | - throw(ArgumentError("transfer is not uniquely defined with utility space $(space(v,2))")) |
| 85 | + check_ambiguous_braiding(space(v, 2)) |
90 | 86 | @plansor t[-1 -2; -3 -4] := A[-1 2; 1] * τ[-2 4; 2 3] * conj(Ab[-4 4; 5]) * v[1 3; -3 5] |
91 | 87 | end |
92 | 88 |
|
|
0 commit comments