Skip to content

Commit

Permalink
update en manual (tutorial-7 and -8).
Browse files Browse the repository at this point in the history
  • Loading branch information
k-yoshimi committed Oct 11, 2023
1 parent 0877d04 commit e2f21a1
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/sphinx/en/tutorial/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Tutorial
:maxdepth: 2

simple_tutorial-1
simple_tutorial-7
simple_tutorial-8
simple_tutorial-5
simple_tutorial-6
standard_tutorial-1
standard_tutorial-1
44 changes: 44 additions & 0 deletions docs/sphinx/en/tutorial/simple_tutorial-7.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
.. highlight:: none

Real-Time Evolution of the Transverse Field Ising Model
--------------------------------------------------------

Here, we introduce a calculation example for the real-time evolution of the Ising model on a square lattice when a transverse magnetic field, denoted by ``hx``, is applied. The input and script files used in this tutorial can be found in ``sample/07_timeevolution``.

Initially, we compute the ground state (refer to the ``simple.toml`` file) which serves as our starting state. Specifically, it's set as:

.. literalinclude:: ../../../../sample/07_timeevolution/simple.toml

Given that ``Jz = -1.0``, the ground state becomes ferromagnetic. We use the ground state as the initial state, and save the state tensor with ``tensor_save = "save_tensor"``.

Next, we prepare the input file for the real-time evolution. This can be achieved by setting the ``mode`` to ``time``. Below is a sample input file (``simple_te_strong.toml``):

.. literalinclude:: ../../../../sample/07_timeevolution/simple_te_strong.toml

In this case, the transverse field is set to ``hx = 2.0``, and the time-step for evolution is ``tau = 0.01``. Moreover, since we are utilizing the ground state as our initial condition, we load the state tensor with ``tensor_load = "save_tensor"``. For observing the time evolution with different transverse magnetic fields, we've also prepared sample input files named ``simple_te_middle.toml`` and ``simple_te_weak.toml``. Additionally, there's a script named ``run.sh`` to execute these calculations in one go. Ensure that paths to tools like ``tenes`` are set correctly, and then execute the calculations with:

::

sh run.sh

The computation will conclude in several seconds. Once done, launch gnuplot and enter:

::

load 'plot.plt'

This will plot the temporal evolution of magnetization, :math:`S_z`. The result is displayed in :numref:`fig_tutorial7_timeevolution`.

.. figure:: ../../img/tutorial_07_timeevolution.*
:name: fig_tutorial7_timeevolution
:width: 600px

Graph illustrating the real-time evolution of the Ising model. The vertical axis represents magnetization, and the horizontal axis represents time.

As time evolution progresses, the entanglement increases. At a certain point, the tensor network's capacity may be insufficient to express the wave function. In our case, the jump at ``t=4.25`` for ``hx=2.0`` indicates this issue. When applying this in practice, ensure no such discontinuities exist. If jumps are observed, steps like increasing the ``virtual_dimension`` might be necessary. For instance, adjusting it to ``virtual_dimension = 10`` and redoing the calculation as described above will eliminate the discontinuity, as can be seen in :numref:`fig_tutorial7_te_D10`.

.. figure:: ../../img/tutorial_07_timeevolution_D10.*
:name: fig_tutorial7_te_D10
:width: 600px

Graph showcasing the real-time evolution of the Ising model. The vertical axis denotes magnetization, while the horizontal axis represents time. Results when ``virtual_dimension = 10`` are applied.
31 changes: 31 additions & 0 deletions docs/sphinx/en/tutorial/simple_tutorial-8.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.. highlight:: none

Finite Temperature Calculations for the Transverse Field Ising Model
----------------------------------------------------------------------

In this section, we present a calculation example of the ferromagnetic Ising model on a square lattice subjected to a transverse magnetic field, denoted by ``hx``, at finite temperatures. The input and script files used in this tutorial are located in the ``sample/08_finitetemperature`` directory. Below is a sample input file (`simple_ft_strong.toml`):

.. literalinclude:: ../../../../sample/08_finitetemperature/simple_ft_strong.toml

To perform finite temperature calculations, set the ``mode`` to ``finite``. Here, the transverse magnetic field is set to ``hx = 2.0`` with ``tau = 0.01`` (the inverse temperature step size is 2 times ``tau``). To observe the behavior at different transverse magnetic fields, we've provided additional sample input files: ``simple_ft_middle.toml``, ``simple_te_weak.toml``, and ``simple_ft_zero.toml``. Moreover, a script named ``run.sh`` has been set up to execute all these calculations simultaneously. Ensure you've added tools like ``tenes`` to your PATH, then initiate the calculations with:

::

sh run.sh

The computation should complete in about a minute. To visualize the results, scripts have been prepared to plot energy, heat capacity, and magnetization (:math:`S_x`, :math:`S_z`): ``plot_e.plt``, ``plot_c.plt``, ``plot_mx.plt``, and ``plot_mz.plt``. Running the following:

::

gnuplot -persist plot_e.plt
gnuplot -persist plot_c.plt
gnuplot -persist plot_mx.plt
gnuplot -persist plot_mz.plt

will display plots for energy, heat capacity, and magnetizations (:math:`S_x` and :math:`S_z`). The resulting plots are illustrated in :numref:`fig_tutorial8_finitetemperature`. For comparison, results obtained using Quantum Monte Carlo calculations are also shown (using ``ALPS/looper``).

.. figure:: ../../img/tutorial_08_finitetemperature.*
:name: fig_tutorial8_finitetemperature
:width: 600px

Graphs for the finite temperature calculations of the Ising model: (a) energy, (b) heat capacity, (c) :math:`S_x`, and (d) :math:`S_z`. The vertical axis represents the physical quantity, and the horizontal axis denotes temperature.

0 comments on commit e2f21a1

Please sign in to comment.