-
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
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
6a4c390
Initial work on grouping existing methods.
emsflatiron addffa6
Go through apply.jl and tebd.jl
emsflatiron 08b215e
Document indextags.jl methods
emsflatiron 131725c
Document sitetype.jl methods
emsflatiron d6bcc17
Document graphs.jl methods
emsflatiron 1098664
Update list
emsflatiron b72097d
Document inner.jl
emsflatiron 723f2da
Document expect.jl
emsflatiron 387b9c0
Document normalize.jl and update_observer.jl. Update file list.
emsflatiron 0dbb412
Remove internal_methods.md file. (All methods not in interface or dep…
emsflatiron 5d05018
Document BP cache system and IndsNetwork system.
emsflatiron 7774218
Document contract.jl and contraction_sequences.jl.
emsflatiron 8216fdc
Finish reviewing methods and sorting into interface versus deprecated
emsflatiron 47a2298
Add Experimental Methods file. Move some methods there and to Depreca…
emsflatiron f6bc01e
Add Developer Methods. Move methods to more appropriate files.
emsflatiron 08cd1fc
Increase version
emsflatiron 523991e
Formatting
emsflatiron f1b251f
Remove Organization of Library file from docs
emsflatiron c7a26b1
Merge branch 'main' into MS_doc_interface
emsflatiron 8e3e3d0
Merge branch 'main' into MS_doc_interface
mtfishman e679370
Move some methods to experimental and deprecated
emsflatiron 3bd5d9e
Deprecate unique and commond ind methods for now
emsflatiron 825584b
Move IndsNetwork constructor to Deprecated
emsflatiron ad24342
Update constructor docs
emsflatiron f2ebe8c
Remove redudant constructor from interface
emsflatiron ad1e38f
Merge branch 'main' into MS_doc_interface
mtfishman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,148 @@ | ||
| # Deprecated Methods | ||
|
|
||
| Suggestions of methods which could be deleted. | ||
|
|
||
| ## ITensorNetwork Methods | ||
|
|
||
| #### ITensorNetwork Constructors | ||
|
|
||
| * Default constructor (`itensornetwork.jl`). | ||
| ```julia | ||
| ITensorNetwork{V}() | ||
| ``` | ||
|
|
||
| * (Only actually deprecate / delete this function if the more generic constructor `ITensorNetwork(tensors)` can also handle this case.) | ||
| From a vector of `ITensor`s, with vertex labels auto-assigned to `eachindex(ts)`. | ||
| Edges are inferred from shared indices (`itensornetwork.jl`): | ||
| ```julia | ||
| ITensorNetwork(ts::AbstractVector{ITensor}) | ||
| ``` | ||
|
|
||
| * From a collection of ITensorNetworks. Merges (Kronecker or tensor product) of input networks (`itensornetwork.jl`): | ||
| ```julia | ||
| ITensorNetwork(itns::Vector{ITensorNetwork}) | ||
| ``` | ||
|
|
||
| * 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) | ||
| ``` | ||
|
|
||
| * Construct an `ITensorNetwork` from an `IndsNetwork`. Initializes ITensors with `undef` storage on each vertex | ||
| of the `IndsNetwork` with the corresponding indices (`itensornetwork.jl`): | ||
| ```julia | ||
| ITensorNetwork(eltype::Type, undef::UndefInitializer, is::IndsNetwork; kwargs...) | ||
| ITensorNetwork(eltype::Type, is::IndsNetwork; kwargs...) | ||
| ITensorNetwork(undef::UndefInitializer, is::IndsNetwork; kwargs...) | ||
| ITensorNetwork(is::IndsNetwork; kwargs...) | ||
| ``` | ||
|
emstoudenmire marked this conversation as resolved.
|
||
|
|
||
| #### 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)) | ||
| ``` | ||
|
|
||
| * Indices on the source tensor of `edge` that are not shared with the destination tensor. | ||
| (`abstractitensornetwork.jl`): | ||
| ```julia | ||
| uniqueinds(tn::AbstractITensorNetwork, edge::AbstractEdge) | ||
| uniqueinds(tn::AbstractITensorNetwork, edge::Pair) | ||
| ``` | ||
|
|
||
| * Alias for `uniqueinds` (`abstractitensornetwork.jl`): | ||
| ```julia | ||
| siteinds(tn::AbstractITensorNetwork, vertex) | ||
| siteinds(tn::AbstractITensorNetwork, vertex::Int) | ||
| ``` | ||
|
|
||
| * Indices common to the ITensors on the vertices connected by the edge (`abstractitensornetwork.jl`): | ||
| (Use a set function like `intersection` instead.) | ||
| ```julia | ||
| commoninds(tn::AbstractITensorNetwork, edge) | ||
| linkinds(tn::AbstractITensorNetwork, edge) | ||
| ``` | ||
|
|
||
| * Indices on `tn[vertex]` that aren't shared with any neighbor, i.e. the external/site | ||
| indices of that vertex (`abstractitensornetwork.jl`). | ||
| (Use a set function like `setdiff` instead.) | ||
| ```julia | ||
| uniqueinds(tn::AbstractITensorNetwork, vertex) | ||
| ``` | ||
|
|
||
| ## 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...) | ||
| ``` | ||
|
mtfishman marked this conversation as resolved.
|
||
|
|
||
| ## 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. | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.