TensorKit.jl icon indicating copy to clipboard operation
TensorKit.jl copied to clipboard

Support for A <: AbstractMatrix

Open miakramer opened this issue 3 years ago • 1 comments

Is there any particular reason the interface for Tensor requires A <: DenseMatrix for the storage type? Does this package assume column-major indexing, for example? If not, would a PR removing that requirement and instead requiring A <: AbstractMatrix be welcome?

miakramer avatar Mar 15 '22 19:03 miakramer

Almost all operations that you can do with Tensor(Map) objects, such as contractions and linear algebra factorizations, are currently only supported for DenseMatrix. Actually, in practice, typically only an implementation for Matrix is available; the parametric type is there to support CuArray in the (hopefully near) future. I thus don't quite see what you hope to gain by widening this to AbstractMatrix?

Jutho avatar Mar 15 '22 20:03 Jutho