Skip to content

Commit 548df37

Browse files
committed
updated docs
1 parent a360b43 commit 548df37

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

docs/src/tut/anyonic_statmech.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ init = InfiniteMPS([physical],[virtual]);
2727

2828
and then pass it on to "leading_boundary":
2929
```julia
30-
(dominant,_) = leading_boundary(init,mpo,Vumps());
30+
(dominant,_) = leading_boundary(init,mpo,VUMPS());
3131
```
3232

3333
This dominant eigenvector contains a lot of hidden information, for example the following calculates the free energy:
@@ -55,7 +55,7 @@ envs = environments(dominant,mpo);
5555
#this will take a fairly long time
5656
for Ds in 5:5:50
5757
(dominant,envs) = changebonds(dominant,mpo,OptimalExpand(trscheme = truncdim(5)),envs);
58-
(dominant,envs) = leading_boundary(dominant,mpo,Vumps(maxiter=200));
58+
(dominant,envs) = leading_boundary(dominant,mpo,VUMPS(maxiter=200));
5959
push!(entropies,real(entropy(dominant)[1]));
6060
push!(corlens,correlation_length(dominant));
6161
end

docs/src/tut/haldane.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ physical_space = Rep[SU₂](1=>1);
2121
virtual_space = Rep[SU₂](0=>20,1=>20,2=>10,3=>10,4=>5);
2222

2323
initial_state = FiniteMPS(rand,ComplexF64,len,physical_space,virtual_space);
24-
(gs,envs,delta) = find_groundstate(initial_state,ham,Dmrg());
24+
(gs,envs,delta) = find_groundstate(initial_state,ham,DMRG());
2525
```
2626

2727
The typical way to find excited states is to minmize the energy while adding an error term ``lambda | gs > < gs | ``. Here we will instead use the [quasiparticle ansatz](https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.111.080401).
@@ -53,7 +53,7 @@ A much nicer way of obtaining the haldane gap is by working directly in the ther
5353
```julia
5454
virtual_space = Rep[SU₂](1//2=>20,3//2=>20,5//2=>10,7//2=>10,9//2=>5); # this is bond dimension 300!
5555
initial_state = InfiniteMPS([physical_space],[virtual_space]);
56-
(gs,envs,delta) = find_groundstate(initial_state,ham,Vumps());
56+
(gs,envs,delta) = find_groundstate(initial_state,ham,VUMPS());
5757
```
5858

5959
One difference with the finite size case is that we not only can - but also have to - specify a momentum label. We can scan for k = 0 to pi by calling:

docs/src/tut/isingcft.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ ham = periodic_boundary_conditions(nonsym_ising_ham(),circumference);
108108

109109
state = FiniteMPS(circumference,ℂ^2,ℂ^50 #=bond dimension=#);
110110

111-
(gs,envs) = find_groundstate(state,ham,Dmrg());
111+
(gs,envs) = find_groundstate(state,ham,DMRG());
112112
```
113113

114114
Excitations on top of the groundstate can be found using the quasiparticle ansatz. This returns quasiparticle states, which you can just convert back to the usual finite mps's.

docs/src/tut/timeev.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ init = FiniteMPS(rand,ComplexF64,len,ℂ^2,ℂ^10);
3737

3838
Find the pre-quench groundstate
3939
```julia
40-
(ψ₀,_) = find_groundstate(init,ising_ham(0.5),Dmrg());
40+
(ψ₀,_) = find_groundstate(init,ising_ham(0.5),DMRG());
4141
```
4242

4343
We can define a help function that measures the loschmith echo
@@ -51,7 +51,7 @@ we will initially use a 2site tdvp scheme to increase the bond dimension while t
5151
ψₜ = deepcopy(ψ₀);
5252
dt = 0.01;
5353

54-
(ψₜ,envs) = timestep(ψₜ,ising_ham(2),dt,Tdvp2(trscheme=truncdim(20)));
54+
(ψₜ,envs) = timestep(ψₜ,ising_ham(2),dt,TDVP2(trscheme=truncdim(20)));
5555
```
5656

5757
"envs" is a kind of cache object that keeps track of all environments in ψ. It is often advantageous to re-use the environment, so that mpskit doesn't need to recalculate everything.
@@ -60,7 +60,7 @@ Putting it all together, we get
6060
```julia
6161
function finite_sim(len; dt = 0.05, finaltime = 5.0)
6262
ψ₀ = FiniteMPS(rand,ComplexF64,len,ℂ^2,ℂ^10);
63-
(ψ₀,_) = find_groundstate(ψ₀,ising_ham(0.5),Dmrg());
63+
(ψ₀,_) = find_groundstate(ψ₀,ising_ham(0.5),DMRG());
6464

6565
post_quench_ham = ising_ham(2);
6666
ψₜ = deepcopy(ψ₀);
@@ -70,7 +70,7 @@ function finite_sim(len; dt = 0.05, finaltime = 5.0)
7070
times = collect(0:dt:finaltime);
7171

7272
@showprogress for t = times[2:end]
73-
alg = t > 3*dt ? Tdvp() : Tdvp2(trscheme = truncdim(50))
73+
alg = t > 3*dt ? TDVP() : TDVP2(trscheme = truncdim(50))
7474
(ψₜ,envs) = timestep(ψₜ,post_quench_ham,dt,alg,envs);
7575
push!(echos,echo(ψₜ,ψ₀))
7676
end

docs/src/tut/xxz_groundstate.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ state = InfiniteMPS([random_data]);
2828

2929
The groundstate can then be found by calling find_groundstate.
3030
```julia
31-
(groundstate,cache,delta) = find_groundstate(state,ham,Vumps());
31+
(groundstate,cache,delta) = find_groundstate(state,ham,VUMPS());
3232
```
3333

3434
As you can see, vumps strugles to converge. On it's own, that is already quite curious.
@@ -62,12 +62,12 @@ ham = repeat(ham,2);
6262

6363
Running vumps
6464
```julia
65-
(groundstate,cache,delta) = find_groundstate(state,ham,Vumps(maxiter=100,tol_galerkin=1e-12));
65+
(groundstate,cache,delta) = find_groundstate(state,ham,VUMPS(maxiter=100,tol_galerkin=1e-12));
6666
```
6767
we get convergence, but it takes an enormous amount of iterations. The reason behind this becomes more obvious at higher bond dimensions
6868

6969
```julia
70-
(groundstate,cache,delta) = find_groundstate(state,ham,Idmrg2(trscheme=truncdim(100),maxiter=100,tol_galerkin=1e-12));
70+
(groundstate,cache,delta) = find_groundstate(state,ham,IDMRG2(trscheme=truncdim(100),maxiter=100,tol_galerkin=1e-12));
7171

7272
entanglementplot(groundstate)
7373
```
@@ -105,5 +105,5 @@ Even though the bond dimension is higher then in the non symmetric example:
105105

106106
Vumps converges much much faster
107107
```julia
108-
(groundstate,cache,delta) = find_groundstate(state,ham,Vumps(maxiter=400,tol_galerkin=1e-12));
108+
(groundstate,cache,delta) = find_groundstate(state,ham,VUMPS(maxiter=400,tol_galerkin=1e-12));
109109
```

0 commit comments

Comments
 (0)