Skip to content

Commit 8ae617c

Browse files
authored
Minor cleanup of internals (#91)
1 parent 19a1568 commit 8ae617c

File tree

5 files changed

+26
-410
lines changed

5 files changed

+26
-410
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ITensorInfiniteMPS"
22
uuid = "1dc1fb26-a137-4954-ae60-1bd4106e95ad"
33
authors = ["Matthew Fishman <[email protected]> and contributors"]
4-
version = "0.1.0"
4+
version = "0.2.0"
55

66
[deps]
77
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"

README.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,33 +21,32 @@ This package is a work in progress. Here are some examples of the interface:
2121
julia> using ITensors, ITensorMPS, ITensorInfiniteMPS
2222

2323
julia> s = siteinds("S=1/2", 3)
24-
3-element Array{Index{Int64},1}:
25-
(dim=2|id=652|"S=1/2,Site,n=1")
26-
(dim=2|id=984|"S=1/2,Site,n=2")
27-
(dim=2|id=569|"S=1/2,Site,n=3")
24+
3-element Vector{Index{Int64}}:
25+
(dim=2|id=988|"S=1/2,Site,n=1")
26+
(dim=2|id=220|"S=1/2,Site,n=2")
27+
(dim=2|id=650|"S=1/2,Site,n=3")
2828

2929
julia> ψ = InfiniteMPS(s) # Infinite MPS with 3-site unit cell
3030
InfiniteMPS
31-
[1] IndexSet{3} (dim=1|id=317|"Link,c=0,l=3") (dim=2|id=652|"S=1/2,Site,c=1,n=1") (dim=1|id=77|"Link,c=1,l=1")
32-
[2] IndexSet{3} (dim=1|id=77|"Link,c=1,l=1") (dim=2|id=984|"S=1/2,Site,c=1,n=2") (dim=1|id=868|"Link,c=1,l=2")
33-
[3] IndexSet{3} (dim=1|id=868|"Link,c=1,l=2") (dim=2|id=569|"S=1/2,Site,c=1,n=3") (dim=1|id=317|"Link,c=1,l=3")
34-
31+
[1] ((dim=1|id=108|"Link,c=0,l=3"), (dim=2|id=988|"S=1/2,Site,c=1,n=1"), (dim=1|id=112|"Link,c=1,l=1"))
32+
[2] ((dim=1|id=112|"Link,c=1,l=1"), (dim=2|id=220|"S=1/2,Site,c=1,n=2"), (dim=1|id=429|"Link,c=1,l=2"))
33+
[3] ((dim=1|id=429|"Link,c=1,l=2"), (dim=2|id=650|"S=1/2,Site,c=1,n=3"), (dim=1|id=108|"Link,c=1,l=3"))
3534

3635
julia> ψ[2] == replacetags(ψ[5], "c=2" => "c=1") # Indexing outside of the unit cell gets tensors from other unit cells
3736
true
3837

3938
julia> ψ₁ = ψ[1:3] # Create a finite MPS from the tensors of the first unit cell
4039
MPS
41-
[1] IndexSet{3} (dim=1|id=317|"Link,c=0,l=3") (dim=2|id=652|"S=1/2,Site,c=1,n=1") (dim=1|id=77|"Link,c=1,l=1")
42-
[2] IndexSet{3} (dim=1|id=77|"Link,c=1,l=1") (dim=2|id=984|"S=1/2,Site,c=1,n=2") (dim=1|id=868|"Link,c=1,l=2")
43-
[3] IndexSet{3} (dim=1|id=868|"Link,c=1,l=2") (dim=2|id=569|"S=1/2,Site,c=1,n=3") (dim=1|id=317|"Link,c=1,l=3")
40+
[1] ((dim=1|id=108|"Link,c=0,l=3"), (dim=2|id=988|"S=1/2,Site,c=1,n=1"), (dim=1|id=112|"Link,c=1,l=1"))
41+
[2] ((dim=1|id=112|"Link,c=1,l=1"), (dim=2|id=220|"S=1/2,Site,c=1,n=2"), (dim=1|id=429|"Link,c=1,l=2"))
42+
[3] ((dim=1|id=429|"Link,c=1,l=2"), (dim=2|id=650|"S=1/2,Site,c=1,n=3"), (dim=1|id=108|"Link,c=1,l=3"))
4443

4544

4645
julia> ψ₂ = ψ[4:6] # Create a finite MPS from the tensors of the second unit cell
4746
MPS
48-
[1] IndexSet{3} (dim=1|id=317|"Link,c=1,l=3") (dim=2|id=652|"S=1/2,Site,c=2,n=1") (dim=1|id=77|"Link,c=2,l=1")
49-
[2] IndexSet{3} (dim=1|id=77|"Link,c=2,l=1") (dim=2|id=984|"S=1/2,Site,c=2,n=2") (dim=1|id=868|"Link,c=2,l=2")
50-
[3] IndexSet{3} (dim=1|id=868|"Link,c=2,l=2") (dim=2|id=569|"S=1/2,Site,c=2,n=3") (dim=1|id=317|"Link,c=2,l=3")
47+
[1] ((dim=1|id=108|"Link,c=1,l=3"), (dim=2|id=988|"S=1/2,Site,c=2,n=1"), (dim=1|id=112|"Link,c=2,l=1"))
48+
[2] ((dim=1|id=112|"Link,c=2,l=1"), (dim=2|id=220|"S=1/2,Site,c=2,n=2"), (dim=1|id=429|"Link,c=2,l=2"))
49+
[3] ((dim=1|id=429|"Link,c=2,l=2"), (dim=2|id=650|"S=1/2,Site,c=2,n=3"), (dim=1|id=108|"Link,c=2,l=3"))
5150
```
5251
Useful operations like gauging and optimization are in progress, so stay tuned!
5352

src/ITensorInfiniteMPS.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ using ITensorMPS: AbstractMPS
2727
import ITensors:
2828

2929
include("ITensors.jl")
30-
include("ITensorNetworks.jl")
3130
include("itensormap.jl")
3231
include("celledvectors.jl")
3332
include("abstractinfinitemps.jl")
@@ -61,7 +60,6 @@ export Cell,
6160
InfiniteBlockMPO,
6261
InfiniteSumLocalOps,
6362
ITensorMap,
64-
ITensorNetwork,
6563
TransferMatrix,
6664
@Model_str,
6765
Model,

0 commit comments

Comments
 (0)