Problems with ITensor update

Hello,

I installed a new package called RandomMatrix and after this the package ITensors do not seem to work anymore. When I try to call truncate it displays the following message:

MethodError: no method matching svd(::NDTensors.DenseTensor{Float64, 2, Tuple{Index{Int64}, Index{Int64}}, NDTensors.Dense{Float64, Vector{Float64}}}; lefttags::TagSet, cutoff::Float64)

Closest candidates are:
  svd(::NDTensors.DenseTensor{ElT, 2, IndsT}; mindim, maxdim, cutoff, use_absolute_cutoff, use_relative_cutoff, alg, min_blockdim) where {ElT, IndsT} got unsupported keyword argument "lefttags"
   @ NDTensors C:\Users\abouc\.julia\packages\NDTensors\kR4oQ\src\linearalgebra\linearalgebra.jl:97
  svd(::NDTensors.DenseTensor{<:Number, N, IndsT}, ::Tuple{Vararg{Int64, NL}}, ::Tuple{Vararg{Int64, NR}}; kwargs...) where {N, IndsT, NL, NR}
   @ NDTensors C:\Users\abouc\.julia\packages\NDTensors\kR4oQ\src\dense\linearalgebra\decompositions.jl:19
  svd(::AbstractMatrix{T}, ::AbstractMatrix{T}) where T<:Union{Float32, Float64, ComplexF32, ComplexF64} got unsupported keyword arguments "lefttags", "cutoff"
   @ LinearAlgebra C:\Users\abouc\AppData\Local\Programs\julia-1.9.2\share\julia\stdlib\v1.9\LinearAlgebra\src\svd.jl:405
  ...


Stacktrace:
 [1] kwerr(::NamedTuple{(:lefttags, :cutoff), Tuple{TagSet, Float64}}, ::Function, ::NDTensors.DenseTensor{Float64, 2, Tuple{Index{Int64}, Index{Int64}}, NDTensors.Dense{Float64, Vector{Float64}}})
   @ Base .\error.jl:165
 [2] svd(A::ITensor, Linds::Vector{Index{Int64}}; kwargs::Base.Pairs{Symbol, Any, Tuple{Symbol, Symbol}, NamedTuple{(:lefttags, :cutoff), Tuple{TagSet, Float64}}})
   @ ITensors C:\Users\abouc\.julia\packages\ITensors\t2bln\src\tensor_operations\matrix_decomposition.jl:147
 [3] truncate!(::NDTensors.Algorithm{:frobenius}, M::MPS; site_range::UnitRange{Int64}, kwargs::Base.Pairs{Symbol, Float64, Tuple{Symbol}, NamedTuple{(:cutoff,), Tuple{Float64}}})
   @ ITensors C:\Users\abouc\.julia\packages\ITensors\t2bln\src\mps\abstractmps.jl:1679
 [4] truncate!
   @ C:\Users\abouc\.julia\packages\ITensors\t2bln\src\mps\abstractmps.jl:1666 [inlined]
 [5] truncate!(M::MPS; alg::String, kwargs::Base.Pairs{Symbol, Float64, Tuple{Symbol}, NamedTuple{(:cutoff,), Tuple{Float64}}})
   @ ITensors C:\Users\abouc\.julia\packages\ITensors\t2bln\src\mps\abstractmps.jl:1663
 [6] truncate!
   @ C:\Users\abouc\.julia\packages\ITensors\t2bln\src\mps\abstractmps.jl:1662 [inlined]
 [7] #truncate#725
   @ C:\Users\abouc\.julia\packages\ITensors\t2bln\src\mps\abstractmps.jl:1689 [inlined]
 [8] top-level scope
   @ show.jl:1128

I tried to remove the package RandomMatrix and reinstall ITensor but it still does not work.
I am using ITensors v0.3.36 and Julia 1.9.2.

Thank you very much for your help,
Aleix

I reinstalled Julia and it just worked fine. Thank you very much.
A

1 Like

Glad to hear that fixed it. Good that you let us know anyway, so we can be aware of similar issues other users might have.

1 Like