You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is possible for a `FiniteMPS` object to have non-trivial left- and/or right edge spaces.
56
+
This can be convenient whenever the state is embedded in a larger system (e.g. as part of a [`WindowMPS`](@ref)), or to allow for non-trivially charged symmetric states.
57
+
Therefore, be mindful that when constructing a `FiniteMPS` from tensors directly, you need to handle the edges separately.
36
58
37
59
### Gauging and canonical forms
38
60
@@ -102,25 +124,26 @@ The idea behind this construction is that one never has to worry about how the s
102
124
103
125
## InfiniteMPS
104
126
105
-
An [`InfiniteMPS`](@ref)can be thought of as being very similar to a finite mps, where the set of tensors is repeated periodically.
127
+
An [`InfiniteMPS`](@ref)represents a periodically repeating unit cell of MPS tensors.
106
128
107
-
It can also be created by passing in a vector of `TensorMap`s:
129
+
### Construction
130
+
131
+
Similar to `FiniteMPS`, the easiest way of constructing an `InfiniteMPS` is by specifying an [`InfiniteMPSManifold`](@ref) describing one unit cell:
108
132
109
133
```@example states
110
-
data = [rand(ComplexF64, ℂ^4 ⊗ ℂ^2 ← ℂ^4) for _ in 1:2]
111
-
state = InfiniteMPS(data)
134
+
pspaces = [ℂ^2, ℂ^2] # 2-site unit cell
135
+
vspaces = [ℂ^4, ℂ^5] # virtual space to the left of each site
136
+
manifold = InfiniteMPSManifold(pspaces, vspaces)
137
+
ψinf = rand(manifold)
112
138
```
113
139
114
-
or by initializing it from given spaces
140
+
Alternatively, we may also start from explicit site tensors:
115
141
116
142
```@example states
117
-
phys_spaces = fill(ℂ^2, 2)
118
-
virt_spaces = [ℂ^4, ℂ^5] # by convention to the right of a site
119
-
state = InfiniteMPS(phys_spaces, virt_spaces)
143
+
As = [rand(ComplexF64, imanifold[i]) for i in 1:length(imanifold)]
144
+
ψinf2 = InfiniteMPS(As)
120
145
```
121
146
122
-
Note that the code above creates an `InfiniteMPS` with a two-site unit cell, where the given virtual spaces are located to the right of their respective sites.
123
-
124
147
### Gauging and canonical forms
125
148
126
149
Much like for `FiniteMPS`, we can again query the gauged tensors `AL`, `AR`, `C` and `AC`.
@@ -142,8 +165,9 @@ It represents a window of mutable tensors (a finite MPS), embedded in an infinit
142
165
It can therefore be created accordingly, ensuring that the edges match:
0 commit comments