ITensorNetworks.jl
ITensorNetworks.jl copied to clipboard
Convenient constructors for tensor networks on grids
Currently to make a tensor network on a grid (a finite MPS/PEPS) the interface is:
using NamedGraphs
using ITensorNetworks
s = siteinds("S=1/2", named_grid((2, 2)))
ψ = ITensorNetwork(s; link_space=4)
or without site indices:
ψ = ITensorNetwork(named_grid((2, 2)); link_space=4)
It would be convenient to have some shorthands like:
s = siteinds("S=1/2", (2, 2))
# s = siteinds("S=1/2", 2, 2)
ψ = ITensorNetwork(s; link_space=4)
or:
ITensorNetwork((2, 2); link_space=4)
# ITensorNetwork(2, 2; link_space=4)
The notation siteinds("S=1/2", 5) for making a path graph of length 5 will conflict with ITensors.jl notation so for now that one may have to be siteinds("S=1/2", (5,)). Additionally, we should allow functions like ITensorNetwork accept Vector{<:Index} which gets output by siteinds("S=1/2", 5), and in general allow Vector{<:Index} act like an IndsNetwork with linear integer vertex names, like Vector{ITensor} should act like an ITensorNetwork with linear integer vertex names.