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
We provide several examples in the `examples/ folder of the variPEPS Git repository <https://github.com/variPEPS/variPEPS_Python/tree/main/examples>`_ that demonstrate how to use the code for variational energy optimization in typical 2D many-body problems.
11
8
12
-
In this section we want to elaborately walk through the example for the
13
-
Heisenberg AFM on the 2d square lattice to explain a typical usage of the
14
-
library.
9
+
.. In this section we want to elaborately walk through the example for the Heisenberg AFM on the 2d square lattice to explain a typical usage of the library.
15
10
16
11
Heisenberg antiferromagnet on the square lattice
17
12
------------------------------------------------
@@ -49,8 +44,8 @@ Loading of relevant Python modules
49
44
First of all we have to load the relevant Python modules for our simulation. The
50
45
:obj:`varipeps` module includes the full library to perform the variational
51
46
optimization. Internally it is based on the :obj:`jax` framework and its
52
-
:obj:`numpy`-like interface to execute the calculations. Since we need to define
53
-
arrays later to define for example the Hamiltonian, we need to load this numpy
47
+
:obj:`numpy`-like interface to execute the calculations. Since we will need
48
+
arrays to define for example the Hamiltonian, we load this numpy
54
49
interface as well.
55
50
56
51
variPEPS config settings
@@ -59,33 +54,39 @@ variPEPS config settings
59
54
.. code-block:: python
60
55
61
56
# Config Setting
57
+
62
58
## Set maximal steps for the CTMRG routine
63
-
varipeps.config.ad_custom_max_steps =100
64
-
## Set maximal steps for the fix point routine in the gradient calculation
65
59
varipeps.config.ctmrg_max_steps =100
66
60
## Set convergence threshold for the CTMRG routine
67
61
varipeps.config.ctmrg_convergence_eps =1e-7
62
+
## Select the method used to calculate the (full) projectors in the CTMRG routine
63
+
varipeps.config.ctmrg_full_projector_method = (
64
+
varipeps.config.Projector_Method.FISHMAN
65
+
)
66
+
## Enable dynamic increase of CTMRG environment bond dimension
In this block we define some parameters for the model we want to simulate as the
110
-
interaction strength, the physical dimension of our tensor network and the iPEPS
111
-
bond dimension. In the last two lines the start and the maximal enviroment bond
112
-
dimension is defined. A feature of the variPEPS library is that it not only
113
-
supports simulation at a fixed enviroment bond dimension but also a heurisitic
114
-
increase/decrease of the dimension up to a maximal value if the maximal
115
-
truncation error in the CTMRG project calculation is above/below some
116
-
threshold. See in the config block above the parameter
117
-
``ctmrg_heuristic_increase_chi_threshold`` which sets for example the threshold
118
-
when to increase the refinement parameter. The maximal bond dimension ensures
119
-
that the parameter does no increase to too large values where the memory and
120
-
computational resources are exhausted.
110
+
In this block we define imporant parameters for the model we want to simulate, such as as the interaction strength, the physical dimension of our tensor network and the iPEPS bond dimension. In the last two lines the initial and the maximal enviroment bond dimension is defined. A feature of the variPEPS library is that it not only supports simulation at a fixed enviroment bond dimension, but also a heurisitic increase/decrease of the dimension up to a maximal value. The dynamic change is controlled by the truncation error in the CTMRG projector calculation (increase if the truncation errror becomes too large, decrease if it becomes insignificant). For example, in the config block above the parameter ``ctmrg_heuristic_increase_chi_threshold`` is set to the threshold at which to increase the refinement parameter. The maximal bond dimension ``maxChi`` ensures that the parameter does now grow unbounded, to the point where the memory and computational resources are exhausted.
121
111
122
112
Constructing the Hamiltonian
123
113
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -140,12 +130,12 @@ Constructing the Hamiltonian
140
130
)
141
131
142
132
Here the Hamiltonian is constructed for our model. The Heisenberg AFM on the
143
-
square lattice can be described by the sum of the spin-spin interactions over
144
-
the horizontal and vertical bonds. Since we assume in our example a constant
145
-
interaction strength for all bonds, the expectation value can be calculated by
146
-
the same twosite interaction tensor applied in all nearest neighbor
133
+
square lattice can be described by the sum of the spin-spin interactions on
134
+
the horizontal and vertical bonds. Since we assume a constant
135
+
interaction strength for all bonds in our example, the expectation value can be calculated by
136
+
the same two-site interaction gate applied in all nearest neighbor
147
137
directions. The expectation function ``exp_func`` is later used in the
148
-
optimization to calculate the energy which is used as cost function to obtain
138
+
optimization to calculate the energy expectation value, which in turn is used as cost function to obtain
149
139
the ground state.
150
140
151
141
Initial unit cell construction
@@ -158,7 +148,7 @@ Initial unit cell construction
158
148
159
149
Here we define the unit cell structure which is used to simulate our model. In
0 commit comments