Skip to content

Commit ad24342

Browse files
committed
Update constructor docs
1 parent 825584b commit ad24342

2 files changed

Lines changed: 13 additions & 18 deletions

File tree

docs/src/deprecated_methods.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ Suggestions of methods which could be deleted.
1111
ITensorNetwork{V}()
1212
```
1313

14+
* From a collection of ITensorNetworks. Merges (Kronecker or tensor product) of input networks (`itensornetwork.jl`):
15+
```julia
16+
ITensorNetwork(itns::Vector{ITensorNetwork})
17+
```
18+
1419
* From a named graph, forwards to construction from `IndsNetwork` (`itensornetwork.jl`):
1520
```julia
1621
ITensorNetwork{V}(g::NamedGraph)

docs/src/interface_methods.md

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,18 @@ Recommended methods for building applications on top of ITensorNetworks.
66

77
These ITensorNetwork constructor interfaces are foundational to other constructors:
88

9-
* Copy constructor (`itensornetwork.jl`):
9+
* From dictionary-like objects, including other `ITensorNetwork` objects, or a `Dict`
10+
from vertices to `ITensor`.
1011
```julia
11-
ITensorNetwork{V}(tn::ITensorNetwork)
12+
# `keys(tensors)` are vertices, `values(tensors)` are tensors on those vertices
13+
ITensorNetwork(tensors)
14+
ITensorNetwork{V}(tensors)
1215
```
1316

14-
* From vertex-tensor pairings (`itensornetwork.jl`):
17+
* From collections of vertices and tensors. E.g. a `Vector{Int}` and a `Vector{ITensor}`.
1518
```julia
16-
# Dictionary of vertices => tensors
17-
ITensorNetwork(ts::AbstractDictionary{<:Any, ITensor})
18-
ITensorNetwork(ts::AbstractDict{<:Any, ITensor})
19-
20-
# Vector of `vertex => ITensor` pairs
21-
ITensorNetwork(ts::AbstractVector{<:Pair{<:Any, ITensor}})
22-
23-
# Vector of vertices, vector of ITensors
24-
ITensorNetwork(vertices::AbstractVector, tensors::AbstractVector{ITensor})
25-
```
26-
27-
* From a collection of ITensorNetworks. Merges (Kronecker or tensor product) of input networks (`itensornetwork.jl`):
28-
```julia
29-
ITensorNetwork(itns::Vector{ITensorNetwork})
19+
ITensorNetwork(vertices, tensors)
20+
ITensorNetwork{V}(vertices, tensors)
3021
```
3122

3223
* From a vector of `ITensor`s, with vertex labels auto-assigned to `eachindex(ts)`.
@@ -35,7 +26,6 @@ These ITensorNetwork constructor interfaces are foundational to other constructo
3526
ITensorNetwork(ts::AbstractVector{ITensor})
3627
```
3728

38-
3929
## Analyzing ITensorNetworks
4030

4131

0 commit comments

Comments
 (0)