Skip to content

ITensor, Tensor, and Array conversion API #374

Open
@mtfishman

Description

@mtfishman

The Array conversion interface is a bit inconsistent right now. There is the following for trying to avoid copying, which takes the Index ordering as the memory ordering:

  • array(::ITensor)

And these where you have to specify the index ordering:

  • Array{ElT,N}(::ITensor, ::Index...)
  • Array{ElT}(::ITensor, ::Index...)
  • Array(::ITensor, ::Index...)

And then some where Matrix and Vector can be used explcitly:

  • Matrix{ElT}(::ITensor{2}, ::Index, ::Index)
  • Matrix(::ITensor{2}, ::Index, ::Index)
  • Vector(::ITensor{1}, ::Index)
  • Vector{ElT}(::ITensor{1}, ::Index)
  • Vector(::ITensor{1})
  • Vector{ElT}(::ITensor{1})

Functions to add would be:

  • matrix and vector
  • Versions of Array and Matrix where the indices don't have to be specified.
  • Versions of array, matrix, and vector where the index ordering can be specified.
  • Versions of array, matrix, and vector where the desired element type can be specified.

Metadata

Metadata

Assignees

Labels

NDTensorsRequires changes to the NDTensors.jl library.apiIssues related to the interfaceenhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions