Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additions needed for sweeping algorithms on trees #18

Merged
merged 20 commits into from
Jan 9, 2023
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
c81a211
Sweeping algorithms for tree tensor networks: draft
Oct 31, 2022
b3ca106
Switch off numerical truncation by default in OpSum->TTNO converter
leburgel Nov 1, 2022
b389589
Merge branch 'indsnetwork_additions' into tree_sweeping
leburgel Nov 3, 2022
e00c345
Remove functionalities that were merged into NamedGraphs.jl
leburgel Nov 3, 2022
74dc679
Merge branch 'indsnetwork_additions' into tree_sweeping
leburgel Nov 3, 2022
f883124
Merge remote-tracking branch 'origin' into tree_sweeping
leburgel Nov 4, 2022
0eb9ef9
Remove temporary `expect` in favor or `expect.jl` merged from main
leburgel Nov 4, 2022
d337f7c
Use `convert_eltype` instead of `convert_leaf_eltype` where appropria…
leburgel Nov 28, 2022
77be11c
Change `linkdims` to return `NamedDimDataGraph`
leburgel Nov 28, 2022
d6b9633
Update
leburgel Dec 12, 2022
26ec817
Merge branch 'main' into tree_sweeping
leburgel Dec 12, 2022
40a9975
Move implementation to `loginner`, make `logdot` the alias.
leburgel Dec 21, 2022
a04d3cf
No more mutables; remove many in-place operations.
leburgel Dec 22, 2022
152db53
Remove in-place operations.
leburgel Jan 9, 2023
d490aed
Merge remote-tracking branch 'origin' into tree_sweeping
leburgel Jan 9, 2023
e9f0c7a
Remove unnecessary comment.
leburgel Jan 9, 2023
914b711
Merge branch 'main' into tree_sweeping
mtfishman Jan 9, 2023
6cb3e36
Fix imports.jl
mtfishman Jan 9, 2023
591cd3c
Update directory name from treetensornetwork to treetensornetworks
mtfishman Jan 9, 2023
105cec6
Fix some warnings
mtfishman Jan 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ Dictionaries = "85a47980-9c8c-11e8-2b9f-f7ca1fa99fb4"
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
ITensors = "9136182c-28ba-11e9-034c-db9fb085ebd5"
IsApprox = "28f27b66-4bd8-47e7-9110-e2746eb8bed7"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MultiDimDictionaries = "87ff4268-a46e-478f-b30a-76b83dd64e3c"
NamedGraphs = "678767b0-92e7-4007-89e4-4527a8725b19"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
SparseArrayKit = "a9a3c162-d163-4c15-8926-b8794fbefed2"
SplitApplyCombine = "03a91e81-4c3e-53e1-a0a4-9c0c8f19dd66"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb"

[compat]
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

A package to provide general network data structures and tools to use with ITensors.jl.


This particular branch contains a draft of the extensions needed to implement sweeping
algorithms for tree tensor networks.

## Installation

This package relies on a few unregistered packages. To install, you will need to do:
This package relies on a few unregistered packages. To install this version, you will need
to do:

```julia
julia> using Pkg
Expand All @@ -17,7 +19,7 @@ julia> Pkg.add(url="https://github.com/mtfishman/NamedGraphs.jl")

julia> Pkg.add(url="https://github.com/mtfishman/DataGraphs.jl")

julia> Pkg.add(url="https://github.com/mtfishman/ITensorNetworks.jl")
julia> Pkg.add(url="https://github.com/leburgel/ITensorNetworks.jl#tree_sweeping")
```


Expand Down
15 changes: 12 additions & 3 deletions src/ITensorNetworks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,20 @@ using DataGraphs
using Dictionaries
using DocStringExtensions
using Graphs
using IsApprox
using ITensors
using ITensors.ContractionSequenceOptimization
using ITensors.ITensorVisualizationCore
using MultiDimDictionaries
using NamedGraphs
using Requires
using SparseArrayKit
mtfishman marked this conversation as resolved.
Show resolved Hide resolved
using SplitApplyCombine
using StaticArrays
using Suppressor

# TODO: export from ITensors
using ITensors: commontags, @Algorithm_str, Algorithm
using ITensors: commontags, @Algorithm_str, Algorithm, OneITensor

using Graphs: AbstractEdge, AbstractGraph, Graph, add_edge!
using MultiDimDictionaries: IndexType, SliceIndex
Expand Down Expand Up @@ -110,7 +113,6 @@ const UniformDataGraph{D} = NamedDimDataGraph{
}

include("utils.jl")
include("namedgraphs.jl")
include("itensors.jl")
include("partition.jl")
include("lattices.jl")
Expand All @@ -125,7 +127,14 @@ include("expect.jl")
include("models.jl")
include("tebd.jl")
include("itensornetwork.jl")
include(joinpath("treetensornetwork", "treetensornetwork.jl"))
include(joinpath("treetensornetwork", "abstracttreetensornetwork.jl"))
include(joinpath("treetensornetwork", "ttns.jl"))
include(joinpath("treetensornetwork", "ttno.jl"))
include(joinpath("treetensornetwork", "opsum_to_ttno.jl"))
include(joinpath("treetensornetwork", "abstractprojttno.jl"))
include(joinpath("treetensornetwork", "projttno.jl"))
include(joinpath("treetensornetwork", "projttnosum.jl"))
include("utility.jl")

include("exports.jl")

Expand Down
2 changes: 2 additions & 0 deletions src/abstractindsnetwork.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ is_directed(::Type{<:AbstractIndsNetwork}) = false
vertex_data(graph::AbstractIndsNetwork, args...) = vertex_data(data_graph(graph), args...)
edge_data(graph::AbstractIndsNetwork, args...) = edge_data(data_graph(graph), args...)

to_vertex(tn::AbstractIndsNetwork, args...) = to_vertex(underlying_graph(tn), args...)

#
# Index access
#
Expand Down
Loading