Skip to content

[BUG] Check shapes of inputs into ITensor #31

@mtfishman

Description

@mtfishman

Currently this doesn't error:

julia> using ITensorBase: ITensor, Index

julia> ITensor(randn(4, 4), (Index(2), Index(2), Index(2), Index(2)))
named(4, Index(length=2|id=370))×named(4, Index(length=2|id=48)) ITensor with indices named(Base.OneTo(4), Index(length=2|id=370))×named(Base.OneTo(4), Index(length=2|id=48))
4×4 Matrix{Float64}:
 -2.084     -2.25994    0.422081   -0.425774
  0.264314   0.259909   0.55474    -0.86762
 -0.769301   1.25037   -0.0955795  -1.1656
  0.966379   0.564297   0.170477    1.24026

but probably should.

See also ITensor/NamedDimsArrays.jl#37.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions