@@ -40,7 +40,7 @@ Hence both are written explicitly.
4040=#
4141
4242function _get_hotrg_xproj (
43- A1:: TensorMap {E, S, 2, 2} , A2:: TensorMap {E, S, 2, 2} ,
43+ A1:: AbstractTensorMap {E, S, 2, 2} , A2:: AbstractTensorMap {E, S, 2, 2} ,
4444 trunc:: TensorKit.TruncationScheme
4545 ) where {E, S}
4646 #= join in y-direction, keep x-indices open (A1 below A2)
@@ -72,7 +72,7 @@ function _get_hotrg_xproj(
7272end
7373
7474function _get_hotrg_yproj (
75- A1:: TensorMap {E, S, 2, 2} , A2:: TensorMap {E, S, 2, 2} ,
75+ A1:: AbstractTensorMap {E, S, 2, 2} , A2:: AbstractTensorMap {E, S, 2, 2} ,
7676 trunc:: TensorKit.TruncationScheme
7777 ) where {E, S}
7878 #= join in x-direction, keep y-indices open (A1 on the left of A2)
@@ -104,50 +104,50 @@ function _get_hotrg_yproj(
104104end
105105
106106function _step_hotrg_y (
107- A1:: TensorMap {E, S, 2, 2} , A2:: TensorMap {E, S, 2, 2} ,
108- trunc :: TensorKit.TruncationScheme
107+ A1:: AbstractTensorMap {E, S, 2, 2} , A2:: AbstractTensorMap {E, S, 2, 2} ,
108+ Ux :: AbstractTensorMap{E, S, 2, 1}
109109 ) where {E, S}
110110 #= compression along the y-direction
111111 -3
112112 |
113113 ┌---1---A2---3--┐
114114 | | |
115- -1--U † 5 U -- -4
115+ -1--Ux † 5 Ux -- -4
116116 | | |
117117 └---2---A1---4--┘
118118 |
119119 -2
120120 =#
121- U, = _get_hotrg_xproj (A1, A2, trunc)
122121 @tensor T[- 1 - 2 ; - 3 - 4 ] :=
123- conj (U [1 2 ; - 1 ]) * U [3 4 ; - 4 ] * A2[1 5 ; - 3 3 ] * A1[2 - 2 ; 5 4 ]
122+ conj (Ux [1 2 ; - 1 ]) * Ux [3 4 ; - 4 ] * A2[1 5 ; - 3 3 ] * A1[2 - 2 ; 5 4 ]
124123 return T
125124end
126125
127126function _step_hotrg_x (
128- A1:: TensorMap {E, S, 2, 2} , A2:: TensorMap {E, S, 2, 2} ,
129- trunc :: TensorKit.TruncationScheme
127+ A1:: AbstractTensorMap {E, S, 2, 2} , A2:: AbstractTensorMap {E, S, 2, 2} ,
128+ Uy :: AbstractTensorMap{E, S, 2, 1}
130129 ) where {E, S}
131130 #= compression along the x-direction
132131 -3
133132 |
134- ┌3--U- -4┐
133+ ┌3--Uy -4┐
135134 | |
136135 -1--A1--5---A2-- -4
137136 | |
138- └1--U †-2┘
137+ └1-Uy †-2┘
139138 |
140139 -2
141140 =#
142- U, = _get_hotrg_yproj (A1, A2, trunc)
143141 @tensor T[- 1 - 2 ; - 3 - 4 ] :=
144- A1[- 1 1 ; 3 5 ] * A2[5 2 ; 4 - 4 ] * conj (U [1 2 ; - 2 ]) * U [3 4 ; - 3 ]
142+ A1[- 1 1 ; 3 5 ] * A2[5 2 ; 4 - 4 ] * conj (Uy [1 2 ; - 2 ]) * Uy [3 4 ; - 3 ]
145143 return T
146144end
147145
148146function step! (scheme:: HOTRG , trunc:: TensorKit.TruncationScheme )
149- scheme. T = _step_hotrg_y (scheme. T, scheme. T, trunc)
150- scheme. T = _step_hotrg_x (scheme. T, scheme. T, trunc)
147+ Ux, = _get_hotrg_xproj (scheme. T, scheme. T, trunc)
148+ scheme. T = _step_hotrg_y (scheme. T, scheme. T, Ux)
149+ Uy, = _get_hotrg_yproj (scheme. T, scheme. T, trunc)
150+ scheme. T = _step_hotrg_x (scheme. T, scheme. T, Uy)
151151 return scheme
152152end
153153
0 commit comments