-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
Hi! I found that rightnull has an issue on a TensorMap when trunc is provided.
using TensorKit
m1 = ones((2,2))
m2 = id(ℂ^2)
right_null(m1; kind=:svd, trunc=(;atol=1e-10)) # Ok
right_null(m2; kind=:svd) # Ok
right_null(m2; kind=:svd, trunc=(;atol=1e-10)) # MethodErrorERROR: MethodError: no method matching size(::TensorMap{Float64, ComplexSpace, 1, 1, Vector{Float64}}, ::Int64)
The function `size` exists, but no method is defined for this combination of argument types.
Closest candidates are:
size(::BitVector, ::Integer)
@ Base bitarray.jl:107
size(::LinearAlgebra.Hessenberg, ::Integer)
@ LinearAlgebra ~/.julia/juliaup/julia-1.12.1+0.x64.linux.gnu/share/julia/stdlib/v1.12/LinearAlgebra/src/hessenberg.jl:412
size(::Tuple, ::Integer)
@ Base tuple.jl:31
...
Stacktrace:
[1] truncate(::typeof(right_null!), ::Tuple{…}, strategy::MatrixAlgebraKit.TruncationByValue{…})
@ MatrixAlgebraKit ~/.julia/packages/MatrixAlgebraKit/xv5dv/src/implementations/truncation.jl:24
[2] right_null_svd!(A::TensorMap{…}, Nᴴ::TensorMap{…}, alg::@NamedTuple{}, trunc::@NamedTuple{…})
@ MatrixAlgebraKit ~/.julia/packages/MatrixAlgebraKit/xv5dv/src/implementations/orthnull.jl:290
[3] #right_null!#250
@ ~/.julia/packages/MatrixAlgebraKit/xv5dv/src/implementations/orthnull.jl:266 [inlined]
[4] right_null!
@ ~/.julia/packages/MatrixAlgebraKit/xv5dv/src/implementations/orthnull.jl:255 [inlined]
[5] right_null!(A::TensorMap{Float64, ComplexSpace, 1, 1, Vector{…}}; kwargs::@Kwargs{kind::Symbol, trunc::@NamedTuple{…}})
@ MatrixAlgebraKit ~/.julia/packages/MatrixAlgebraKit/xv5dv/src/interface/orthnull.jl:216
[6] right_null!
@ ~/.julia/packages/MatrixAlgebraKit/xv5dv/src/interface/orthnull.jl:215 [inlined]
[7] #right_null#227
@ ~/.julia/packages/MatrixAlgebraKit/xv5dv/src/interface/orthnull.jl:219 [inlined]
[8] top-level scope
@ REPL[5]:1
Some type information was truncated. Use `show(err)` to see complete types.julia v"1.12.1"
TensorKit v0.15.3
Metadata
Metadata
Assignees
Labels
No labels