Description
After updating to MPSKit v0.13.11, running find_groundstate with DMRG2 on a finite system throws a MethodError. It appears that a Missing value is being passed into a TensorKit function during the construction of the 2-site Hamiltonian derivative. I used TensorKit v0.16.5 and MPSKitModels v0.4.6.
This code worked as expected in v0.13.10.
Reproducible Example
using MPSKit, TensorKit, MPSKitModels
# Model parameters
const t = 1.0
const U = 3.0
const mu = U / 2
# Construct Hamiltonian from Infinite MPO
H = hubbard_model(InfiniteChain(2); U, t, mu)
H_f = periodic_boundary_conditions(H, 12)
# Initialize State
Vspaces = fill(Vect[fℤ₂](0 => 10, 1 => 10), 11)
psi = FiniteMPS(physicalspace(H_f), Vspaces)
# Algorithm
alg = DMRG2(;
maxiter=1000,
trscheme=trunctol(; atol=10e-2),
tol=10e-5,
verbosity=2
)
# Throws MethodError: no method matching spacetype(::Type{Missing})
find_groundstate(psi, H_f, alg)
Stacktrace
ERROR: MethodError: no method matching spacetype(::Type{Missing})
This error has been manually thrown, explicitly, so the method may exist but be intentionally marked as unimplemented.
Stacktrace:
[1] spacetype(::Type{Missing})
@ TensorKit ...\src\spaces\vectorspaces.jl:398
[2] sectortype(::Type{Missing})
@ TensorKit ...\src\spaces\vectorspaces.jl:348
[3] sectortype(x::Missing)
@ TensorKit ...\src\spaces\vectorspaces.jl:347
[4] prepare_operator!!(H::MPSKit.JordanMPO_AC2_Hamiltonian{...}, ...)
@ MPSKit ...\src\algorithms\derivatives\hamiltonian_derivatives.jl:304
[5] prepare_operator!!
@ ...\src\algorithms\derivatives\derivatives.jl:232 [inlined]
[6] AC2_hamiltonian(site::Int64, below::FiniteMPS, operator::FiniteMPOHamiltonian, ...)
@ MPSKit ...\src\algorithms\derivatives\hamiltonian_derivatives.jl:195
...
Description
After updating to MPSKit v0.13.11, running
find_groundstatewithDMRG2on a finite system throws aMethodError. It appears that aMissingvalue is being passed into aTensorKitfunction during the construction of the 2-site Hamiltonian derivative. I used TensorKit v0.16.5 and MPSKitModels v0.4.6.This code worked as expected in v0.13.10.
Reproducible Example
Stacktrace