Skip to content

Move from SparseArrays to a package with multidimensional sparse array support? #194

@akirakyle

Description

@akirakyle

There's currently a sparsematrix.jl file here and a sparse.jl file in QuantumInterface with functions extending SparseArrays with:

  • some gemm! and gemv! functions
  • _permutedims which works on arrays with ndims > 2 as SparseArrays only implements permutedims for ndims = 2
  • ptrace

I wasn't able to find much evidence that SparseArrays has plans to support anything other than vectors and matrices. The docs even list some external packages that handle multidimensional arrays. Several of these seem to offer interfaces that could help simplify the code we have here. For example, anything offering an Einstein summation notation interface would make ptrace a one-liner.

Finch.jl is perhaps the most interesting one on the list for our use cases and potential to offer significant speedups. Also it might be possible to use its lazy feature as part of the Lazy{Ket,Product,Sum,Tensor}. However, it's still lacking some basic features we would want here like reshape.

A better library for multidimensional sparse arrays would be especially helpful for having cleaner code for the all the superoperator support I'm working on as it would hopefully avoid issues like this (relevant issue: JuliaSparse/SparseArrays.jl#24).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions