From e2f21a1d7399702bfd960abdf9106170b43462b8 Mon Sep 17 00:00:00 2001 From: Kazuyoshi Yoshimi Date: Thu, 12 Oct 2023 05:06:03 +0900 Subject: [PATCH] update en manual (tutorial-7 and -8). --- docs/sphinx/en/tutorial/index.rst | 4 +- docs/sphinx/en/tutorial/simple_tutorial-7.rst | 44 +++++++++++++++++++ docs/sphinx/en/tutorial/simple_tutorial-8.rst | 31 +++++++++++++ 3 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 docs/sphinx/en/tutorial/simple_tutorial-7.rst create mode 100644 docs/sphinx/en/tutorial/simple_tutorial-8.rst diff --git a/docs/sphinx/en/tutorial/index.rst b/docs/sphinx/en/tutorial/index.rst index 0729e20f..11e4a01c 100644 --- a/docs/sphinx/en/tutorial/index.rst +++ b/docs/sphinx/en/tutorial/index.rst @@ -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 \ No newline at end of file diff --git a/docs/sphinx/en/tutorial/simple_tutorial-7.rst b/docs/sphinx/en/tutorial/simple_tutorial-7.rst new file mode 100644 index 00000000..a00ef51d --- /dev/null +++ b/docs/sphinx/en/tutorial/simple_tutorial-7.rst @@ -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. \ No newline at end of file diff --git a/docs/sphinx/en/tutorial/simple_tutorial-8.rst b/docs/sphinx/en/tutorial/simple_tutorial-8.rst new file mode 100644 index 00000000..2cefe0c2 --- /dev/null +++ b/docs/sphinx/en/tutorial/simple_tutorial-8.rst @@ -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. \ No newline at end of file