The package can be added as usual through the package manager:
julia> Pkg.add("ITensorBase")
using ITensorBase: ITensorBase, ITensor, Index
using LinearAlgebra: qr
using NamedDimsArrays: aligndims, unname
using Test: @test
i = Index(2)
j = Index(2)
k = Index(2)
a = randn(i, j)
@test a[j[2], i[1]] == a[1, 2]
@test a[j => 2, i => 1] == a[1, 2]
a′ = randn(j, i)
b = randn(j, k)
c = a * b
@test unname(c, (i, k)) ≈ unname(a, (i, j)) * unname(b, (j, k))
d = a + a′
@test unname(d, (i, j)) ≈ unname(a, (i, j)) + unname(a′, (i, j))
@test a ≈ aligndims(a, (j, i))
q, r = qr(a, (i,))
@test q * r ≈ a
Automatic allocation
a = ITensor(i, j)
a[j[1], i[2]] = 1 + 2im
eltype(a) == Complex{Int}
@test a[i[2], j[1]] == 1 + 2im
This page was generated using Literate.jl.