Skip to content

Commit 7df0cba

Browse files
authored
Final final fixes (#234)
* fix DDMRG test * Fix typo * tweak test to stabilize
1 parent c419625 commit 7df0cba

File tree

4 files changed

+11
-18
lines changed

4 files changed

+11
-18
lines changed

docs/src/examples/classic2d/1.hard-hexagon/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ F = 0.8839037051703857 S = 0.546862287635581 ξ = 13.8496825856899
6464

6565
## The scaling hypothesis
6666

67-
The dominant eigenvector is of course only an approximation. The finite bond dimension enforces a finite correlation length, which effectively introduces a length scale in the system. This can be exploited to formulate a [pollmann2009](@cite), which in turn allows to extract the central charge.
67+
The dominant eigenvector is of course only an approximation. The finite bond dimension enforces a finite correlation length, which effectively introduces a length scale in the system. This can be exploited to formulate a scaling hypothesis [pollmann2009](@cite), which in turn allows to extract the central charge.
6868

6969
First we need to know the entropy and correlation length at a bunch of different bond dimensions. Our approach will be to re-use the previous approximated dominant eigenvector, and then expanding its bond dimension and re-running VUMPS.
7070
According to the scaling hypothesis we should have ``S \propto \frac{c}{6} log(ξ)``. Therefore we should find ``c`` using

docs/src/examples/classic2d/1.hard-hexagon/main.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
"source": [
8787
"## The scaling hypothesis\n",
8888
"\n",
89-
"The dominant eigenvector is of course only an approximation. The finite bond dimension enforces a finite correlation length, which effectively introduces a length scale in the system. This can be exploited to formulate a [pollmann2009](@cite), which in turn allows to extract the central charge.\n",
89+
"The dominant eigenvector is of course only an approximation. The finite bond dimension enforces a finite correlation length, which effectively introduces a length scale in the system. This can be exploited to formulate a scaling hypothesis [pollmann2009](@cite), which in turn allows to extract the central charge.\n",
9090
"\n",
9191
"First we need to know the entropy and correlation length at a bunch of different bond dimensions. Our approach will be to re-use the previous approximated dominant eigenvector, and then expanding its bond dimension and re-running VUMPS.\n",
9292
"According to the scaling hypothesis we should have $S \\propto \\frac{c}{6} log(ξ)$. Therefore we should find $c$ using"

examples/classic2d/1.hard-hexagon/main.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ println("F = $F\tS = $S\tξ = $ξ")
5151
md"""
5252
## The scaling hypothesis
5353
54-
The dominant eigenvector is of course only an approximation. The finite bond dimension enforces a finite correlation length, which effectively introduces a length scale in the system. This can be exploited to formulate a [pollmann2009](@cite), which in turn allows to extract the central charge.
54+
The dominant eigenvector is of course only an approximation. The finite bond dimension enforces a finite correlation length, which effectively introduces a length scale in the system. This can be exploited to formulate a scaling hypothesis [pollmann2009](@cite), which in turn allows to extract the central charge.
5555
5656
First we need to know the entropy and correlation length at a bunch of different bond dimensions. Our approach will be to re-use the previous approximated dominant eigenvector, and then expanding its bond dimension and re-running VUMPS.
5757
According to the scaling hypothesis we should have ``S \propto \frac{c}{6} log(ξ)``. Therefore we should find ``c`` using

test/algorithms.jl

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -596,27 +596,20 @@ end
596596
end
597597

598598
@testset "Dynamical DMRG" verbose = true begin
599-
ham = force_planar(-1.0 * transverse_field_ising(; g=-4.0))
600-
gs, = find_groundstate(InfiniteMPS([ℙ^2], [ℙ^10]), ham, VUMPS(; verbosity=0))
601-
window = WindowMPS(gs, copy.([gs.AC[1]; [gs.AR[i] for i in 2:10]]), gs)
602-
603-
szd = force_planar(S_z())
604-
@test [expectation_value(gs, i => szd) for i in 1:length(window)]
605-
[expectation_value(window, i => szd) for i in 1:length(window)] atol = 1e-10
606-
607-
openham = open_boundary_conditions(ham, length(window.window))
608-
polepos = expectation_value(window.window, openham,
609-
environments(window.window, openham))
599+
L = 10
600+
H = force_planar(-transverse_field_ising(; L, g=-4))
601+
gs, = find_groundstate(FiniteMPS(L, ℙ^2, ℙ^10), H; verbosity=verbosity_conv)
602+
E₀ = expectation_value(gs, H)
610603

611-
vals = (-0.5:0.2:0.5) .+ polepos
604+
vals = (-0.5:0.2:0.5) .+ E₀
612605
eta = 0.3im
613606

614-
predicted = [1 / (v + eta - polepos) for v in vals]
607+
predicted = [1 / (v + eta - E₀) for v in vals]
615608

616609
@testset "Flavour $f" for f in (Jeckelmann(), NaiveInvert())
617610
alg = DynamicalDMRG(; flavour=f, verbosity=0, tol=1e-8)
618611
data = map(vals) do v
619-
result, = propagator(window.window, v + eta, openham, alg)
612+
result, = propagator(gs, v + eta, H, alg)
620613
return result
621614
end
622615
@test data predicted atol = 1e-8
@@ -696,7 +689,7 @@ end
696689
H = force_planar(repeat(transverse_field_ising(; g=4), 2))
697690

698691
dt = 1e-3
699-
sW1 = make_time_mpo(H, dt, TaylorCluster(; N=3))
692+
sW1 = make_time_mpo(H, dt, TaylorCluster(; N=3, compression=true, extension=true))
700693
sW2 = make_time_mpo(H, dt, WII())
701694
W1 = MPSKit.DenseMPO(sW1)
702695
W2 = MPSKit.DenseMPO(sW2)

0 commit comments

Comments
 (0)