Skip to content

Commit

Permalink
Start fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mtfishman committed Nov 22, 2023
1 parent 0f01191 commit 4c6f001
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module NamedDimsArraysTensorAlgebraExt
include("contract.jl")
include("fusedims.jl")
include("qr.jl")
include("eigen.jl")
include("svd.jl")
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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))
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
4 changes: 4 additions & 0 deletions NDTensors/test/ITensors/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[deps]
ITensors = "9136182c-28ba-11e9-034c-db9fb085ebd5"
NDTensors = "23ae76d9-e61a-49c4-8f12-3f1a16adf9cf"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"

0 comments on commit 4c6f001

Please sign in to comment.