diff --git a/NDTensors/src/NamedDimsArrays/ext/NamedDimsArraysTensorAlgebraExt/src/NamedDimsArraysTensorAlgebraExt.jl b/NDTensors/src/NamedDimsArrays/ext/NamedDimsArraysTensorAlgebraExt/src/NamedDimsArraysTensorAlgebraExt.jl index f9dc5aaa15..a397507f44 100644 --- a/NDTensors/src/NamedDimsArrays/ext/NamedDimsArraysTensorAlgebraExt/src/NamedDimsArraysTensorAlgebraExt.jl +++ b/NDTensors/src/NamedDimsArrays/ext/NamedDimsArraysTensorAlgebraExt/src/NamedDimsArraysTensorAlgebraExt.jl @@ -1,5 +1,6 @@ module NamedDimsArraysTensorAlgebraExt include("contract.jl") +include("fusedims.jl") include("qr.jl") include("eigen.jl") include("svd.jl") diff --git a/NDTensors/src/NamedDimsArrays/ext/NamedDimsArraysTensorAlgebraExt/src/eigen.jl b/NDTensors/src/NamedDimsArrays/ext/NamedDimsArraysTensorAlgebraExt/src/eigen.jl index d62a77c6d1..01905313f8 100644 --- a/NDTensors/src/NamedDimsArrays/ext/NamedDimsArraysTensorAlgebraExt/src/eigen.jl +++ b/NDTensors/src/NamedDimsArrays/ext/NamedDimsArraysTensorAlgebraExt/src/eigen.jl @@ -1,8 +1,8 @@ ## using ..ITensors: IndexID using LinearAlgebra: LinearAlgebra, Hermitian, eigen ## using ..NDTensors.DiagonalArrays: DiagonalMatrix -using ..NDTensors.NamedDimsArrays: AbstractNamedDimsArray, dimnames, name, unname -using ..NDTensors: Spectrum, truncate!! +using ...NDTensors.NamedDimsArrays: AbstractNamedDimsArray, dimnames, name, unname +## using ...NDTensors: Spectrum, truncate!! function LinearAlgebra.eigen( na::Hermitian{T,<:AbstractNamedDimsArray{T}}; mindim=nothing, diff --git a/NDTensors/src/NamedDimsArrays/ext/NamedDimsArraysTensorAlgebraExt/src/fusedims.jl b/NDTensors/src/NamedDimsArrays/ext/NamedDimsArraysTensorAlgebraExt/src/fusedims.jl index d74d733ad6..50c21ccf88 100644 --- a/NDTensors/src/NamedDimsArrays/ext/NamedDimsArraysTensorAlgebraExt/src/fusedims.jl +++ b/NDTensors/src/NamedDimsArrays/ext/NamedDimsArraysTensorAlgebraExt/src/fusedims.jl @@ -1,3 +1,5 @@ +using ...NDTensors.TensorAlgebra: fusedims, splitdims + function TensorAlgebra.fusedims(na::AbstractNamedDimsArray, fusions::Pair...) # TODO: generalize to multiple fused groups of dimensions @assert isone(length(fusions)) diff --git a/NDTensors/src/NamedDimsArrays/ext/NamedDimsArraysTensorAlgebraExt/src/qr.jl b/NDTensors/src/NamedDimsArrays/ext/NamedDimsArraysTensorAlgebraExt/src/qr.jl index 6e79d27529..c46155d12e 100644 --- a/NDTensors/src/NamedDimsArrays/ext/NamedDimsArraysTensorAlgebraExt/src/qr.jl +++ b/NDTensors/src/NamedDimsArrays/ext/NamedDimsArraysTensorAlgebraExt/src/qr.jl @@ -1,6 +1,6 @@ -using ..ITensors: IndexID +# using ..ITensors: IndexID using LinearAlgebra: LinearAlgebra, qr -using ..NDTensors.NamedDimsArrays: AbstractNamedDimsArray, dimnames, name, unname +using ...NDTensors.NamedDimsArrays: AbstractNamedDimsArray, dimnames, name, unname function LinearAlgebra.qr(na::AbstractNamedDimsArray; positive=nothing) # TODO: Make this more systematic. i, j = dimnames(na) diff --git a/NDTensors/test/ITensors/Project.toml b/NDTensors/test/ITensors/Project.toml new file mode 100644 index 0000000000..7ee8b76af0 --- /dev/null +++ b/NDTensors/test/ITensors/Project.toml @@ -0,0 +1,4 @@ +[deps] +ITensors = "9136182c-28ba-11e9-034c-db9fb085ebd5" +NDTensors = "23ae76d9-e61a-49c4-8f12-3f1a16adf9cf" +SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"