11{
22 "cells" : [
33 {
4- "cell_type" : " code" ,
5- "execution_count" : null ,
6- "metadata" : {},
74 "outputs" : [],
5+ "cell_type" : " code" ,
86 "source" : [
97 " using Markdown #hide"
10- ]
8+ ],
9+ "metadata" : {},
10+ "execution_count" : null
1111 },
1212 {
1313 "cell_type" : " markdown" ,
14- "metadata" : {},
1514 "source" : [
1615 " # Simple update for the Fermi-Hubbard model at half-filling\n " ,
1716 " \n " ,
2726 " with $\\ sigma \\ in \\ {\\ uparrow,\\ downarrow\\ }$ and $n_{i,\\ sigma} = c_{i,\\ sigma}^+ c_{i,\\ sigma}^-$.\n " ,
2827 " \n " ,
2928 " Let's get started by seeding the RNG and importing the required modules:"
30- ]
29+ ],
30+ "metadata" : {}
3131 },
3232 {
33- "cell_type" : " code" ,
34- "execution_count" : null ,
35- "metadata" : {},
3633 "outputs" : [],
34+ "cell_type" : " code" ,
3735 "source" : [
3836 " using Random\n " ,
3937 " using TensorKit, PEPSKit\n " ,
4038 " Random.seed!(12329348592498);"
41- ]
39+ ],
40+ "metadata" : {},
41+ "execution_count" : null
4242 },
4343 {
4444 "cell_type" : " markdown" ,
45- "metadata" : {},
4645 "source" : [
4746 " ## Defining the Hamiltonian\n " ,
4847 " \n " ,
4948 " First, we define the Hubbard model at $t=1$ hopping and $U=6$ using `Trivial` sectors for\n " ,
5049 " the particle and spin symmetries, and set $\\ mu = U/2$ for half-filling. The model will be\n " ,
5150 " constructed on a $2 \\ times 2$ unit cell, so we have:"
52- ]
51+ ],
52+ "metadata" : {}
5353 },
5454 {
55- "cell_type" : " code" ,
56- "execution_count" : null ,
57- "metadata" : {},
5855 "outputs" : [],
56+ "cell_type" : " code" ,
5957 "source" : [
6058 " t = 1\n " ,
6159 " U = 6\n " ,
6260 " Nr, Nc = 2, 2\n " ,
6361 " H = hubbard_model(Float64, Trivial, Trivial, InfiniteSquare(Nr, Nc); t, U, mu = U / 2);\n " ,
6462 " physical_space = Vect[fℤ₂](0 => 2, 1 => 2);"
65- ]
63+ ],
64+ "metadata" : {},
65+ "execution_count" : null
6666 },
6767 {
6868 "cell_type" : " markdown" ,
69- "metadata" : {},
7069 "source" : [
7170 " ## Running the simple update algorithm\n " ,
7271 " \n " ,
7978 " First, we shall use a small D for the random PEPS initialization, which is chosen as 4 here.\n " ,
8079 " For convenience, here we work with real tensors with `Float64` entries.\n " ,
8180 " The bond weights are still initialized as identity matrices."
82- ]
81+ ],
82+ "metadata" : {}
8383 },
8484 {
85- "cell_type" : " code" ,
86- "execution_count" : null ,
87- "metadata" : {},
8885 "outputs" : [],
86+ "cell_type" : " code" ,
8987 "source" : [
9088 " virtual_space = Vect[fℤ₂](0 => 2, 1 => 2)\n " ,
9189 " peps = InfinitePEPS(rand, Float64, physical_space, virtual_space; unitcell = (Nr, Nc));\n " ,
9290 " wts = SUWeight(peps);"
93- ]
91+ ],
92+ "metadata" : {},
93+ "execution_count" : null
9494 },
9595 {
9696 "cell_type" : " markdown" ,
97- "metadata" : {},
9897 "source" : [
9998 " Starting from the random state, we first use a relatively large evolution time step\n " ,
10099 " `dt = 1e-2`. After convergence at D = 4, to avoid stucking at some bad local minimum,\n " ,
101100 " we first increase D to 12, and drop it back to D = 8 after a while.\n " ,
102101 " Afterwards, we keep D = 8 and gradually decrease `dt` to `1e-4` to improve convergence."
103- ]
102+ ],
103+ "metadata" : {}
104104 },
105105 {
106- "cell_type" : " code" ,
107- "execution_count" : null ,
108- "metadata" : {},
109106 "outputs" : [],
107+ "cell_type" : " code" ,
110108 "source" : [
111109 " dts = [1.0e-2, 1.0e-2, 1.0e-3, 4.0e-4, 1.0e-4]\n " ,
112110 " tols = [1.0e-7, 1.0e-7, 1.0e-8, 1.0e-8, 1.0e-8]\n " ,
118116 " alg = SimpleUpdate(; trunc, bipartite = false)\n " ,
119117 " global peps, wts, = time_evolve(peps, H, dt, maxiter, alg, wts; tol, check_interval = 2000)\n " ,
120118 " end"
121- ]
119+ ],
120+ "metadata" : {},
121+ "execution_count" : null
122122 },
123123 {
124124 "cell_type" : " markdown" ,
125- "metadata" : {},
126125 "source" : [
127126 " ## Computing the ground-state energy\n " ,
128127 " \n " ,
131130 " which is initialized using the simple update bond weights. Next we use it to initialize\n " ,
132131 " another run with bigger environment dimension. The dynamic adjustment of environment dimension\n " ,
133132 " is achieved by using `trunc=truncrank(χ)` with different `χ`s in the CTMRG runs:"
134- ]
133+ ],
134+ "metadata" : {}
135135 },
136136 {
137- "cell_type" : " code" ,
138- "execution_count" : null ,
139- "metadata" : {},
140137 "outputs" : [],
138+ "cell_type" : " code" ,
141139 "source" : [
142140 " χenv₀, χenv = 6, 16\n " ,
143141 " env_space = Vect[fℤ₂](0 => χenv₀ / 2, 1 => χenv₀ / 2)\n " ,
148146 " env, peps; alg = :sequential, tol = 1.0e-8, maxiter = 50, trunc = truncrank(χ)\n " ,
149147 " )\n " ,
150148 " end"
151- ]
149+ ],
150+ "metadata" : {},
151+ "execution_count" : null
152152 },
153153 {
154154 "cell_type" : " markdown" ,
155- "metadata" : {},
156155 "source" : [
157156 " We measure the energy by computing the `H` expectation value, where we have to make sure to\n " ,
158157 " normalize with respect to the unit cell to obtain the energy per site:"
159- ]
158+ ],
159+ "metadata" : {}
160160 },
161161 {
162- "cell_type" : " code" ,
163- "execution_count" : null ,
164- "metadata" : {},
165162 "outputs" : [],
163+ "cell_type" : " code" ,
166164 "source" : [
167165 " E = expectation_value(peps, H, env) / (Nr * Nc)\n " ,
168166 " @show E;"
169- ]
167+ ],
168+ "metadata" : {},
169+ "execution_count" : null
170170 },
171171 {
172172 "cell_type" : " markdown" ,
173- "metadata" : {},
174173 "source" : [
175174 " Finally, we can compare the obtained ground-state energy against the literature, namely the\n " ,
176175 " QMC estimates from [Qin et al.](@cite qin_benchmark_2016). We find that the results generally\n " ,
177176 " agree:"
178- ]
177+ ],
178+ "metadata" : {}
179179 },
180180 {
181- "cell_type" : " code" ,
182- "execution_count" : null ,
183- "metadata" : {},
184181 "outputs" : [],
182+ "cell_type" : " code" ,
185183 "source" : [
186184 " Es_exact = Dict(0 => -1.62, 2 => -0.176, 4 => 0.8603, 6 => -0.6567, 8 => -0.5243)\n " ,
187185 " E_exact = Es_exact[U] - U / 2\n " ,
188186 " @show (E - E_exact) / abs(E_exact);"
189- ]
187+ ],
188+ "metadata" : {},
189+ "execution_count" : null
190190 },
191191 {
192192 "cell_type" : " markdown" ,
193- "metadata" : {},
194193 "source" : [
195194 " ---\n " ,
196195 " \n " ,
197196 " *This notebook was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).*"
198- ]
197+ ],
198+ "metadata" : {}
199199 }
200200 ],
201+ "nbformat_minor" : 3 ,
201202 "metadata" : {
202- "kernelspec" : {
203- "display_name" : " Julia 1.11.7" ,
204- "language" : " julia" ,
205- "name" : " julia-1.11"
206- },
207203 "language_info" : {
208204 "file_extension" : " .jl" ,
209205 "mimetype" : " application/julia" ,
210206 "name" : " julia" ,
211207 "version" : " 1.11.7"
208+ },
209+ "kernelspec" : {
210+ "name" : " julia-1.11" ,
211+ "display_name" : " Julia 1.11.7" ,
212+ "language" : " julia"
212213 }
213214 },
214- "nbformat" : 4 ,
215- "nbformat_minor" : 3
216- }
215+ "nbformat" : 4
216+ }
0 commit comments