-
Notifications
You must be signed in to change notification settings - Fork 22
Document interface of library #346
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
base: main
Are you sure you want to change the base?
Changes from all commits
6a4c390
addffa6
08b215e
131725c
d6bcc17
1098664
b72097d
723f2da
387b9c0
0dbb412
5d05018
7774218
8216fdc
47a2298
f6bc01e
08cd1fc
523991e
f1b251f
c7a26b1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,100 @@ | ||
| # Deprecated Methods | ||
|
|
||
| Suggestions of methods which could be deleted. | ||
|
|
||
| ## ITensorNetwork Methods | ||
|
|
||
| #### ITensorNetwork Constructors | ||
|
|
||
| * Default constructor (`itensornetwork.jl`). | ||
| ```julia | ||
| ITensorNetwork{V}() | ||
| ``` | ||
|
|
||
| * From a named graph, forwards to construction from `IndsNetwork` (`itensornetwork.jl`): | ||
| ```julia | ||
| ITensorNetwork{V}(g::NamedGraph) | ||
| ITensorNetwork(eltype::Type, undef::UndefInitializer, graph::AbstractNamedGraph; kws...) | ||
| ITensorNetwork(f, graph::AbstractNamedGraph; kwargs...) | ||
| ITensorNetwork(graph::AbstractNamedGraph; kwargs...) | ||
| ``` | ||
|
|
||
| * From a simple graph, forwards to construction from `IndsNetwork` (`itensornetwork.jl`): | ||
| ```julia | ||
| ITensorNetwork(eltype::Type, undef::UndefInitializer, graph::AbstractSimpleGraph; kws...) | ||
| ITensorNetwork(f, graph::AbstractSimpleGraph; kwargs...) | ||
| ITensorNetwork(graph::AbstractSimpleGraph; kwargs...) | ||
| ``` | ||
|
|
||
| * From a function over vertices or from a "value" (e.g. a string like `"Up"`, | ||
| an `Op`, an array, or a per-vertex dict/array) that is converted to a callable and used | ||
| to initialize each vertex tensor (`itensornetwork.jl`): | ||
| ```julia | ||
| ITensorNetwork(value, is::IndsNetwork; kwargs...) | ||
| ITensorNetwork(elt::Type, f, is::IndsNetwork; link_space = trivial_space(is), kws...) | ||
| ITensorNetwork(itensor_constructor::Function, is::IndsNetwork; link_space = trivial_space(is), kwargs...) | ||
| ``` | ||
|
|
||
| * From a single `ITensor`. Wraps the tensor in a single-vertex network (`itensornetwork.jl`): | ||
| ```julia | ||
| ITensorNetwork(t::ITensor) | ||
| ``` | ||
|
|
||
| #### Local Operations on ITensorNetworks | ||
|
|
||
| * Versions of `siteinds` taking a `vertex` argument. Each of these is just an alias for `uniqueinds`. Possibly the wrong design / implementation. (`abstractitensornetwork.jl`). | ||
| ```julia | ||
| siteinds(tn::AbstractITensorNetwork, vertex) # abstractitensornetwork.jl:288 | ||
| siteinds(tn::AbstractITensorNetwork, vertex::Int) # abstractitensornetwork.jl:292 | ||
| ``` | ||
|
|
||
|
|
||
| * Functions in `apply.jl` which are unused, even inside that file (`apply.jl`): | ||
| ```julia | ||
| _gate_vertices(o::ITensor, ψ) | ||
| _gate_vertices(o::AbstractEdge, ψ) | ||
| _contract_gate(o::ITensor, ψv1, Λ, ψv2) | ||
| _contract_gate(o::AbstractEdge, ψv1, Λ, ψv2) | ||
| ``` | ||
|
|
||
| * Collection of tensors neighboring the given vertex (`abstractitensornetwork.jl`): | ||
| ```julia | ||
| neighbor_tensors(tn::AbstractITensorNetwork, vertex) | ||
| ``` | ||
|
|
||
| * Iterate over the tensors at the given vertices, default all vertices (`abstractitensornetwork.jl`): | ||
| ```julia | ||
| eachtensor(tn::AbstractITensorNetwork, vertices = vertices(tn)) | ||
| ``` | ||
|
|
||
| ## Global Operations on ITensorNetworks | ||
|
|
||
|
|
||
| ## TreeTensorNetwork Constructors | ||
|
|
||
| * From `Op` and related types (`opsum_to_ttn.jl`): | ||
| ```julia | ||
| ttn(o::Op, s::IndsNetwork; kws...) | ||
| ttn(o::Scaled{C, Op}, s::IndsNetwork; kws...) | ||
| ttn(o::Sum{Op}, s::IndsNetwork; kws...) | ||
| ttn(o::Prod{Op}, s::IndsNetwork; kws...) | ||
| ttn(o::Scaled{C, Prod{Op}}, s::IndsNetwork; kws...) | ||
| ttn(o::Sum{Scaled{C, Op}}, s::IndsNetwork; kws...) | ||
| ``` | ||
|
Comment on lines
+73
to
+83
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess we'll have to think about the alternatives to these if we remove them. Maybe it would be something like
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was my bad to include the Were your comments above about a more general constructor that would take the place of the The ones really intended to be here in Deprecated are the ones which take other Op-adjacent data like
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see, I thought you were including all I was indeed suggesting getting rid of
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Of course, that would be a longer term change which assumes we are getting rid of the TTN type, and since the current DMRG/TDVP code still expects a TTN then we could replace
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the above would be a good plan. One way we could go would be to start replacing tree tensor network methods with My guess is probably the largest footprint is through parts of the code, like solvers, which rely on the gauging capabilities of tree tensor networks but also of course that's something that could be switched over to ITensorNetworks with a runtime tree check. Also I remember you had some thoughts about gauging and caches that sounded more deep.. we should discuss more. |
||
|
|
||
| ## Miscellaneous Methods | ||
|
|
||
| * Methods in `partitioneditensornetwork.jl`. | ||
| ```julia | ||
| linkinds(pitn::PartitionedGraph, edge::QuotientEdge) | ||
| ``` | ||
| To be revisited after Jack's work on NamedGraphs. | ||
|
|
||
| * Methods in `graphs.jl`. | ||
| Just one methods which constructs a `SimpleGraph` from ITensors (`graphs.jl`). | ||
| ```julia | ||
| SimpleGraphs.SimpleGraph(itensors::Vector{ITensor}) | ||
| ``` | ||
| Not used anywhere in library. | ||
|
|
||
| * Methods in `update_observer.jl`. Not used anywhere in library. | ||
Uh oh!
There was an error while loading. Please reload this page.