diff --git a/examples/mps.jl b/examples/mps.jl index 63a0be9c..8f3804f9 100644 --- a/examples/mps.jl +++ b/examples/mps.jl @@ -3,10 +3,11 @@ using ITensors using ITensorNetworks using ITensorUnicodePlots using Random +using NamedGraphs Random.seed!(1234) -g = chain_lattice_graph(4) +g = named_path_graph(4) s = siteinds("S=1/2", g) diff --git a/src/ITensorNetworks.jl b/src/ITensorNetworks.jl index 6df0d036..fb4c6711 100644 --- a/src/ITensorNetworks.jl +++ b/src/ITensorNetworks.jl @@ -71,7 +71,6 @@ include("observers.jl") include("visualize.jl") include("graphs.jl") include("itensors.jl") -include("lattices.jl") include("abstractindsnetwork.jl") include("indextags.jl") include("indsnetwork.jl") diff --git a/src/exports.jl b/src/exports.jl index a3ef21f5..09dbc3bd 100644 --- a/src/exports.jl +++ b/src/exports.jl @@ -109,10 +109,6 @@ export path_graph_structure, binary_tree_structure # ITensorNetworks: approx_itensornetwork.jl export approx_itensornetwork -# ITensorNetworks: lattices.jl -# TODO: DELETE -export hypercubic_lattice_graph, square_lattice_graph, chain_lattice_graph - # ITensorNetworks: partition.jl export partition, partition_vertices, subgraphs, subgraph_vertices diff --git a/src/lattices.jl b/src/lattices.jl deleted file mode 100644 index 1035b663..00000000 --- a/src/lattices.jl +++ /dev/null @@ -1,19 +0,0 @@ -function hypercubic_lattice_graph(dims::Tuple{Vararg{Int}}) - return NamedGraph(grid(dims); vertices=dims) -end -function hypercubic_lattice_graph(dim::Int) - return NamedGraph(grid((dim,)), 1:dim) -end -function hypercubic_lattice_graph(dim1::Int, dim2::Int, dims::Int...) - return hypercubic_lattice_graph((dim1, dim2, dims...)) -end -square_lattice_graph(dims::Tuple{Int,Int}) = hypercubic_lattice_graph(dims) -square_lattice_graph(dim1::Int, dim2::Int) = hypercubic_lattice_graph((dim1, dim2)) -cubic_lattice_graph(dims::Tuple{Int,Int,Int}) = hypercubic_lattice_graph(dims) -function cubic_lattice_graph(dim1::Int, dim2::Int, dim3::Int) - return hypercubic_lattice_graph((dim1, dim2, dim3)) -end - -chain_lattice_graph(dims::Tuple{Int}) = hypercubic_lattice_graph(dims) -# This case is special, and the vertices are just integers -chain_lattice_graph(dim::Int) = hypercubic_lattice_graph(dim) diff --git a/src/treetensornetworks/solvers/deprecated/projmpo_mps2.jl b/src/treetensornetworks/solvers/deprecated/projmpo_mps2.jl index 9a042c57..a24255fe 100644 --- a/src/treetensornetworks/solvers/deprecated/projmpo_mps2.jl +++ b/src/treetensornetworks/solvers/deprecated/projmpo_mps2.jl @@ -46,4 +46,4 @@ contract(P::ProjMPO_MPS2, v::ITensor) = contract(P.PH, v) proj_mps(P::ProjMPO_MPS2) = [proj_mps(m) for m in P.Ms] -underlying_graph(P::ProjMPO_MPS2) = chain_lattice_graph(length(P.PH.H)) # tree patch +underlying_graph(P::ProjMPO_MPS2) = named_path_graph(length(P.PH.H)) # tree patch