@@ -187,6 +187,7 @@ Return the virtual space of the bond to the left of sites `pos`.
187187function left_virtualspace end
188188left_virtualspace (A:: GenericMPSTensor ) = space (A, 1 )
189189left_virtualspace (O:: MPOTensor ) = space (O, 1 )
190+ left_virtualspace (ψ:: AbstractMPS ) = map (Base. Fix1 (left_virtualspace, ψ), eachsite (ψ))
190191
191192"""
192193 right_virtualspace(ψ::AbstractMPS, [pos=1:length(ψ)])
@@ -200,6 +201,7 @@ Return the virtual space of the bond to the right of site(s) `pos`.
200201function right_virtualspace end
201202right_virtualspace (A:: GenericMPSTensor ) = space (A, numind (A))'
202203right_virtualspace (O:: MPOTensor ) = space (O, 4 )'
204+ right_virtualspace (ψ:: AbstractMPS ) = map (Base. Fix1 (right_virtualspace, ψ), eachsite (ψ))
203205
204206"""
205207 physicalspace(ψ::AbstractMPS, [pos=1:length(ψ)])
@@ -211,6 +213,7 @@ physicalspace(A::MPSTensor) = space(A, 2)
211213physicalspace (A:: GenericMPSTensor ) = prod (x -> space (A, x), 2 : (numind (A) - 1 ))
212214physicalspace (O:: MPOTensor ) = space (O, 2 )
213215physicalspace (O:: AbstractBlockTensorMap{<:Any, <:Any, 2, 2} ) = only (space (O, 2 ))
216+ physicalspace (ψ:: AbstractMPS ) = map (Base. Fix1 (physicalspace, ψ), eachsite (ψ))
214217
215218"""
216219 eachsite(state::AbstractMPS)
0 commit comments