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
In this section, we compute the ground-state, finite-T and dynamical properties of a Heisenberg chain, whose Hamiltonian reads
5
-
$$
6
-
H = J\sum_{i}S_{i}\cdot S_{i+1}.
7
-
$$
4
+
In this section, we compute the ground-state, finite-T and dynamical properties of a Heisenberg chain, whose Hamiltonian reads\
5
+
$H = J\sum_{i}S_{i} S_{i+1}$.
8
6
Here we set $J=1$ as energy unit and use spin SU(2) symmetry.
9
7
```@example Heisenberg
10
8
using FiniteMPS
11
-
using CairoMakie, Statistics, LsqFit # visualization
9
+
using CairoMakie, Statistics # visualization
10
+
using LsqFit: curve_fit
11
+
using NumericalIntegration: integrate
12
12
13
13
mkpath("figs_Heisenberg") # save figures
14
14
@@ -32,7 +32,7 @@ aspace = Rep[SU₂](i => 1 for i in 0:1/2:1)
32
32
```
33
33
Here `bspace = Rep[SU₂](0 => 1)` is the space of left boundary bond, `0` is the SU(2) quantum number of the total MPS, and `1` is the multiplicity of the trivial representation, therefore this setup indicates the total MPS is a SU(2) scalar.
34
34
35
-
`aspace` is the space of bulk bonds. Note the fusing of physical space and bond space leads to a constrain due to symmetry. For example, the SU(2) quantum numbers of the bonds exhibit a integer/half integer oscillation, as the physical space exactly shifts the quantum number by 1/2. Here we use a larger (with redundancy) initial bond space so that contraction of bond indices gives a non-vanished result.
35
+
`aspace` is the space of bulk bonds. Note the fusion of physical space and bond space leads to a constrain due to symmetry. For example, the SU(2) quantum numbers of the bonds exhibit a integer/half integer oscillation, as the physical space exactly shifts the bond quantum number by 1/2. Here we use a larger (with redundancy) initial bond space so that contraction of bond indices gives a non-vanished result.
36
36
37
37
```@example Heisenberg
38
38
# DMRG
@@ -113,7 +113,7 @@ $$
113
113
$$
114
114
115
115
## Finite temperature
116
-
Now we move to the finite-temperature properties via [tanTRG](https://doi.org/10.1103/PhysRevLett.130.226502), which belongs to an imaginary-time-evolution method based on MPO TDVP. Note we will use [CBE-TDVP](https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.133.026401) to accelerate the computation.
116
+
Now we move to the finite-temperature properties via [tanTRG](https://doi.org/10.1103/PhysRevLett.130.226502), which belongs to an imaginary-time-evolution method based on TDVP of MPO. Note we will use [CBE-TDVP](https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.133.026401) to accelerate the computation.
117
117
118
118
```@example Heisenberg
119
119
# define a beta list
@@ -150,7 +150,7 @@ Obs = convert(Dict, ObsTree)
150
150
lsSM[1] = calSM(Obs)
151
151
152
152
```
153
-
First we define a $\beta$ list, which determines the step length of imaginary-time cooling. [SETTN](https://journals.aps.org/prb/abstract/10.1103/PhysRevB.95.161104) is adopted to initializes a high-temperature MPO, where `CBEAlg` indicates the algorithm to implement CBE. Currently only `NaiveCBE` is valid, where we directly find the optimal subspace via a svd (use random svd to accelerate), and the expanded bond dimension is set as `D + div(D, 4)`. `lsnoise`set the noise applied in the first several sweeps of variational multiplication. Next we use TDVP to cool down the system.
153
+
First we define a $\beta$ list, which determines the step length of imaginary-time cooling. [SETTN](https://journals.aps.org/prb/abstract/10.1103/PhysRevB.95.161104) is adopted to initialize a high-temperature MPO, where `CBEAlg` indicates the algorithm to implement CBE. Currently only `NaiveCBE` is valid, where we directly find the optimal subspace via a svd (use random svd to accelerate), and the expanded bond dimension is set as `D + div(D, 4)`. `lsnoise`sets the noise applied in the first several sweeps of variational multiplication. Next we use TDVP to cool down the system.
154
154
155
155
```@example Heisenberg
156
156
# TDVP cooling
@@ -169,13 +169,12 @@ for idx in 2:length(lsβ)
169
169
170
170
# update data stored in ObsTree
171
171
calObs!(ObsTree, ρ)
172
-
Obs = convert(Dict, ObsTree)
173
-
lsSM[idx] = calSM(Obs)
172
+
lsSM[idx] = calSM(convert(Dict, ObsTree))
174
173
end
175
174
```
176
-
The key function is this part is `TDVPSweep1!` that performs a single left-to-right and right-to-left 1-TDVP sweep. `GCsweep = true` indicates that a manual `GC.gc()` is called per sweep. If you suffer memory problem when using FiniteMPS.jl, the first thing to try is setting `CGsweep = true` and a stronger `GCstep = true` in the main sweeping function (e.g. `DMRGSweep1!` and `TDVPSweep1!`).
175
+
The key function in this part is `TDVPSweep1!` that performs a single left-to-right and right-to-left 1-TDVP sweep. `GCsweep = true` indicates that a manual `GC.gc()` is called per sweep. If you suffer memory problem when using FiniteMPS.jl, the first thing to try is setting `CGsweep = true` and a stronger `GCstep = true` in the main sweeping function (e.g. `DMRGSweep1!` and `TDVPSweep1!`).
177
176
178
-
In each sweep, the normalization factor after an imaginary-time evolution is extracted to calculate the partition function `lnZ`. In order to calculate spin correlations, regenerating `ObsTree` is not needed, just use `calObs!` again to trigger the in-place update with the new MPO `rho`.
177
+
In each sweep, the normalization factor after an imaginary-time evolution is extracted to calculate the partition function `lnZ`. In order to calculate spin correlations, regenerating `ObsTree` is not necessary, just use `calObs!` again to trigger the in-place update with the new MPO `ρ`.
179
178
180
179
Below is a simple script for visualization, where the temperature dependence of energy $e$, specific heat $c_V$ and AFM structure factor $S(\pi, \pi)$ are shown.
181
180
```@example Heisenberg
@@ -184,7 +183,7 @@ Below is a simple script for visualization, where the temperature dependence of
where $j$ is chosen as a reference site. More specifically, we will use TDVP to compute $\langle S_i^z(t)S_j^z\rangle = e^{iE_gt}\langle \Psi| S_i^z |\Phi(t)\rangle$ where $|\Phi(t)\rangle = e^{-iHt}S_j^z|\Psi\rangle$.
Note we cannot directly compute $\langle S_i^z(t)S_j^z\rangle$, as the operator $S^z$ breaks the SU(2) symmetry. Therefore, what we actually compute is $\langle S_i(t) \cdot S_j\rangle / 3$, where $S_j$ operator is a SU(2) spinor with an additional index that labels the representation space. After preparing the initial `Φ` with correct symmetry index, we call `mul!` function to perform variational multiplication.
247
+
248
+
```@example Heisenberg
249
+
# define a new ObsTree to calculate each inner product ⟨Ψ|S_i|Φ⟩
250
+
ObsTree = ObservableTree(L)
251
+
for i in 1:L
252
+
addObs!(ObsTree, SU2Spin.SS[1], i; name = :S)
253
+
end
254
+
255
+
iso = isometry(aspace_Φ, aspace_S ⊗ aspace_Ψ)
256
+
El = permute(iso', ((2, 1), (3,)))
257
+
calObs!(ObsTree, Ψ, Φ; El = El)
258
+
matSijt[:, 1] = [ObsTree.Refs["S"][(i,)][] / 3 for i in 1:L]
259
+
```
260
+
Emphasize that the isometry to fuse the space of $S_j$ and $|\Psi\rangle$ must be considered carefully. We exactly insert a pair of isometries without changing the contraction result. One is implicitly applied in `mul!` to fuse the two additonal indices to the new one of `Φ`, and the other becomes the left boundary environment tensor `El` sent to `calObs!`.
After collecting all real-space time-dependent spin correlations, we perform FT to obtain the DSF. Note time-reversal symmetry is used in the numerical integration so that only $t>0$ data is required.
317
+
Moreover, we multiply a parzen window function to the time domain to suppress the non-physical oscillation in frequency domain.
218
318
319
+
```@example Heisenberg
320
+
# visualization
321
+
fig = Figure(size = (480, 240))
322
+
ax = Axis(fig[1, 1];
323
+
xlabel = L"k / \pi",
324
+
ylabel = L"\omega",
325
+
limits = ((0, 2), extrema(lsω))
326
+
)
327
+
328
+
hm = heatmap!(ax, lsk, lsω, matSkω)
329
+
Colorbar(fig[1, 2], hm; label = L"S(k, \omega)")
330
+
331
+
# upper and lower boundaries
332
+
lsω_upper = π .* sin.(lsk .* (π/2))
333
+
lsω_lower = (π/2) .* abs.(sin.(lsk .* π))
334
+
lines!(ax, lsk, lsω_upper; color = :white, linestyle = :dash)
335
+
lines!(ax, lsk, lsω_lower; color = :white, linestyle = :dash)
336
+
337
+
save("figs_Heisenberg/Skomega.png", fig)
338
+
```
339
+

340
+
The exact (thermodynamical limit) upper and lower boundaries are also shown. Our numerial results align well with them, up to the frequency resolution (FWHM $\approx 8 / t_\textrm{max}$) due to the finite evolution time $t_\textrm{max} = 10$.
Copy file name to clipboardExpand all lines: docs/src/tutorial/Observable.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,6 @@ Here `Tree` is an `ObservableTree` object that contains all observables to be ca
34
34
```@example Observable
35
35
Obs["SzSz"][(1, 2)]
36
36
```
37
-
is the correlation `\langle S_1^z S_2^z\rangle`. One can perform a simple quantum mechanics calculation to check this result.
37
+
is the correlation $\langle S_1^z S_2^z\rangle$. One can perform a simple quantum mechanics calculation to check this result.
38
38
39
39
Here is just a simple example to show the basic usage, more complex examples that contain fermion correlations and multi-site correlations (e.g. pairing correlations) can be found in the concrete example for [Hubbard model](@ref Hubbard).
0 commit comments