Skip to content

Commit

Permalink
Merge branch 'main' into kmp5/refactor/tensorop_and_cutensor_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kmp5VT authored Sep 3, 2024
2 parents a4fcb9e + 63e7e73 commit e16484e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions NDTensors/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "NDTensors"
uuid = "23ae76d9-e61a-49c4-8f12-3f1a16adf9cf"
authors = ["Matthew Fishman <[email protected]>"]
version = "0.3.39"
version = "0.3.41"

[deps]
Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697"
Expand Down Expand Up @@ -54,7 +54,7 @@ NDTensorsTBLISExt = "TBLIS"
NDTensorscuTENSORExt = "cuTENSOR"

[compat]
AMDGPU = "0.9"
AMDGPU = "0.9, 1"
Accessors = "0.1.33"
Adapt = "3.7, 4"
ArrayLayouts = "1.4"
Expand Down
3 changes: 2 additions & 1 deletion NDTensors/src/diag/diagtensor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ setdiag(T::UniformDiagTensor, val) = tensor(Diag(val), inds(T))
end
end
@propagate_inbounds getindex(T::DiagTensor{<:Number,1}, ind::Int) = storage(T)[ind]
@propagate_inbounds getindex(T::DiagTensor{<:Number,0}) = storage(T)[1]
using NDTensors.Expose: expose
@propagate_inbounds getindex(T::DiagTensor{<:Number,0}) = getindex(expose(storage(T)))

# Set diagonal elements
# Throw error for off-diagonal
Expand Down
2 changes: 1 addition & 1 deletion NDTensors/test/test_diag.jl
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ using .NDTensorsTestUtils: devices_list, is_supported_eltype
@test x == dev(diagm(0 => vr))
@test x == D
end

@test sqrt(contract(D, (-1, -2), conj(D), (-1, -2))[]) norm(D)
# This if statement corresponds to the reported bug:
# https://github.com/JuliaGPU/Metal.jl/issues/364
if !(dev == NDTensors.mtl && elt === ComplexF32)
Expand Down
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.6.16"
version = "0.6.17"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand Down
2 changes: 1 addition & 1 deletion src/lib/ITensorMPS/src/mpo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ end
"""
error_contract(y::MPS, A::MPO, x::MPS;
make_inds_match::Bool = true)
error_contract(y::MPS, x::MPS, x::MPO;
error_contract(y::MPS, x::MPS, A::MPO;
make_inds_match::Bool = true)
Compute the distance between A|x> and an approximation MPS y:
Expand Down

0 comments on commit e16484e

Please sign in to comment.