Skip to content

Commit c30fc3e

Browse files
committed
handle storagetype better
1 parent df834d2 commit c30fc3e

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

src/states/abstractmps.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ TensorKit.spacetype(ψtype::Type{<:AbstractMPS}) = spacetype(site_type(ψtype))
200200
TensorKit.sectortype::AbstractMPS) = sectortype(typeof(ψ))
201201
TensorKit.sectortype(ψtype::Type{<:AbstractMPS}) = sectortype(site_type(ψtype))
202202

203+
TensorKit.storagetype(ψtype::Type{<:AbstractMPS}) = storagetype(site_type(ψtype))
204+
203205
"""
204206
left_virtualspace(ψ::AbstractMPS, [pos=1:length(ψ)])
205207

src/states/finitemps.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,9 +387,6 @@ end
387387

388388
site_type(::Type{<:FiniteMPS{A}}) where {A} = A
389389
bond_type(::Type{<:FiniteMPS{<:Any, B}}) where {B} = B
390-
function TensorKit.storagetype(::Union{MPS, Type{MPS}}) where {A, MPS <: FiniteMPS{A}}
391-
return storagetype(A)
392-
end
393390

394391
function left_virtualspace::FiniteMPS, n::Integer)
395392
checkbounds(ψ, n)

0 commit comments

Comments
 (0)