@@ -79,7 +79,7 @@ function MAK.truncate(
7979 :: typeof (left_null!), (U, S):: NTuple{2, AbstractTensorMap} , strategy:: TruncationStrategy
8080 )
8181 extended_S = SectorDict (
82- c => vcat (diagview (b), zeros (eltype (b), max (0 , size (b, 2 ) - size (b, 1 ))))
82+ c => vcat (diagview (b), zeros (eltype (b), max (0 , size (b, 1 ) - size (b, 2 ))))
8383 for (c, b) in blocks (S)
8484 )
8585 ind = MAK. findtruncated (extended_S, strategy)
@@ -92,11 +92,11 @@ function MAK.truncate(
9292 :: typeof (right_null!), (S, Vᴴ):: NTuple{2, AbstractTensorMap} , strategy:: TruncationStrategy
9393 )
9494 extended_S = SectorDict (
95- c => vcat (diagview (b), zeros (eltype (b), max (0 , size (b, 1 ) - size (b, 2 ))))
95+ c => vcat (diagview (b), zeros (eltype (b), max (0 , size (b, 2 ) - size (b, 1 ))))
9696 for (c, b) in blocks (S)
9797 )
9898 ind = MAK. findtruncated (extended_S, strategy)
99- V_truncated = truncate_space (space (Vᴴ, 1 ), ind)
99+ V_truncated = truncate_space (dual ( space (S, 2 ) ), ind)
100100 Ṽᴴ = similar (Vᴴ, V_truncated ← domain (Vᴴ))
101101 truncate_codomain! (Ṽᴴ, Vᴴ, ind)
102102 return Ṽᴴ, ind
@@ -117,7 +117,7 @@ function MAK.truncate(
117117 :: typeof (right_null!), (S, Vᴴ):: NTuple{2, AbstractTensorMap} , strategy:: NoTruncation
118118 )
119119 ind = SectorDict (c => (size (b, 1 ) + 1 ): size (b, 2 ) for (c, b) in blocks (S))
120- V_truncated = truncate_space (space (Vᴴ, 1 ), ind)
120+ V_truncated = truncate_space (dual ( space (S, 2 ) ), ind)
121121 Ṽᴴ = similar (Vᴴ, V_truncated ← domain (Vᴴ))
122122 truncate_codomain! (Ṽᴴ, Vᴴ, ind)
123123 return Ṽᴴ, ind
0 commit comments