Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ITensors"
uuid = "9136182c-28ba-11e9-034c-db9fb085ebd5"
authors = ["Matthew Fishman <[email protected]>", "Miles Stoudenmire <[email protected]>"]
version = "0.9.9"
version = "0.9.10"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand Down
4 changes: 2 additions & 2 deletions src/tensor_operations/matrix_decomposition.jl
Original file line number Diff line number Diff line change
Expand Up @@ -581,8 +581,8 @@ using NDTensors: map_diag!
function sqrt_decomp(D::ITensor, u::Index, v::Index)
(storage(D) isa Union{Diag,DiagBlockSparse}) ||
error("Must be a diagonal matrix ITensor.")
sqrtDL = diag_itensor(u, dag(u)')
sqrtDR = diag_itensor(v, dag(v)')
sqrtDL = adapt(datatype(D), diag_itensor(u, dag(u)'))
sqrtDR = adapt(datatype(D), diag_itensor(v, dag(v)'))
map_diag!(sqrt ∘ abs, sqrtDL, D)
map_diag!(sqrt ∘ abs, sqrtDR, D)
δᵤᵥ = copy(D)
Expand Down
2 changes: 2 additions & 0 deletions test/base/test_svd.jl
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ include(joinpath(@__DIR__, "utils", "util.jl"))

for dir in [ITensors.Out, ITensors.In]
L, R, spec = ITensors.factorize_svd(A, l1, l2; dir, ortho="none")
@test datatype(L) == datatype(A)
@test datatype(R) == datatype(A)
@test dir == ITensors.dir(commonind(L, R))
@test norm(L * R - A) <= 1e-14
end
Expand Down
Loading