Skip to content

Commit

Permalink
Merge pull request #82 from issp-center-dev/reorder_samples
Browse files Browse the repository at this point in the history
  • Loading branch information
yomichi authored Nov 16, 2023
2 parents 465d2c1 + 61dfee0 commit 6da3f65
Show file tree
Hide file tree
Showing 82 changed files with 37 additions and 85 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ The Hamiltonian is
\end{aligned}
Please note that the model is defined using spin operators of size 1/2, not Pauli operators.
The input and script files used in this tutorial can be found in ``sample/07_timeevolution``.
The input and script files used in this tutorial can be found in ``sample/02_time_evolution``.

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
.. literalinclude:: ../../../../sample/02_time_evolution/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
.. literalinclude:: ../../../../sample/02_time_evolution/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"``.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ The Hamiltonian is
\end{aligned}
Please note that the model is defined using spin operators of size 1/2, not Pauli operators.
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`):
The input and script files used in this tutorial are located in the ``sample/03_finite_temperature`` directory. Below is a sample input file (``simple_ft_strong.toml``):

.. literalinclude:: ../../../../sample/08_finitetemperature/simple_ft_strong.toml
.. literalinclude:: ../../../../sample/03_finite_temperature/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``).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ triangular lattice. The Hamiltonian looks like this:
H = J \sum_{\langle i,j \rangle}\sum_{\alpha}^{x,y,z} {S}_i^{\alpha} {S}_j^{\alpha} - h \sum_i S_i^z\end{aligned}
Here, :math:`\langle i, j \rangle` represents the pair of nearest neighbor sites, and :math:`h` represents the magnitude of the external magnetic field applied in the :math:`z` direction.
Let's calculate the ground state of this model and find :math:`\langle S_z \rangle\equiv \frac{1}{N_u}\sum_i^{N_u} \langle S_i^z \rangle`, where :math:`N_u` is the total number of sites in the unit cell, as a function of the magnetic field :math:`h`. To do this, the toml file ``basic.toml`` and the python script ``tutorial_magnetization.py`` are prepared in the ``sample/05_magnetization`` directory.
Let's calculate the ground state of this model and find :math:`\langle S_z \rangle\equiv \frac{1}{N_u}\sum_i^{N_u} \langle S_i^z \rangle`, where :math:`N_u` is the total number of sites in the unit cell, as a function of the magnetic field :math:`h`. To do this, the toml file ``basic.toml`` and the python script ``tutorial_magnetization.py`` are prepared in the ``sample/04_magnetization`` directory.
The ``basic.toml`` file contains model settings and parameters.

.. literalinclude:: ../../../../sample/05_magnetization/basic.toml
.. literalinclude:: ../../../../sample/04_magnetization/basic.toml

The ``lattice`` section specifies a triangular lattice with the unit cell
size of :math:`3\times 3`. Here, in order to make the calculation
Expand All @@ -26,7 +26,7 @@ simplicity, :math:`J=1`. Using this basic setting file,
tutorial_magnetization.py calculates the magnetization when the magnetic
field is swept.

.. literalinclude:: ../../../../sample/05_magnetization/tutorial_magnetization.py
.. literalinclude:: ../../../../sample/04_magnetization/tutorial_magnetization.py

In this script, the magnetic field :math:`h` is changed in steps of
:math:`0.25` from :math:`0` to :math:`5`, and the ground state energy
Expand Down Expand Up @@ -82,7 +82,7 @@ necessary to increase the bond dimension.

Ground state energy (left figure) and magnetization (right figure) of the Heisenberg model on the triangular lattice.

Next, let's perform the calculation for a model on a square lattice. Use the toml file ``basic_square.toml`` and the python script ``tutorial_magnetization_square.py`` in the ``sample/05_magnetization`` directory.
Next, let's perform the calculation for a model on a square lattice. Use the toml file ``basic_square.toml`` and the python script ``tutorial_magnetization_square.py`` in the ``sample/04_magnetization`` directory.
The content of ``basic_square.toml`` is the same as ``basic.toml`` except that the ``lattice`` section has been changed as follows.

::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ One is a superfluid order which is characterized by the offdiagonal order parame
The other one is a solid-like order which exists at a 1/3 filling, where one of three sites is filled in a :math:`\sqrt{3}\times\sqrt{3}` ordering with wave vector :math:`\boldsymbol{Q}=(4\pi/3,0)` (see the inset of :numref:`fig_tutorial6_hardcore_boson`).
This long-range order is characterized by the structure factor :math:`S(\boldsymbol{Q}) = \sum_{ij}^{N_\text{sites}} \langle n_i n_j \rangle \exp[-i\boldsymbol{Q}\cdot(r_i-r_j)] /N_\text{sites}`.

To perform calculation for this system, the user can use toml files named ``basic.toml``, ``nn_obs.toml`` and a python script file ``run.py`` in the direction ``sample/06_hardcore_boson_triangular``.
To perform calculation for this system, the user can use toml files named ``basic.toml``, ``nn_obs.toml`` and a python script file ``run.py`` in the direction ``sample/05_hardcore_boson_triangular``.
Here, ``basic.toml`` specifies the model and its parameters.
This file is almost the same as the triangular Heisenberg model described in the previous section and differs from it only in the section ``model`` in the last part, where the line ``type = "boson"`` specifies the hardcore boson model and ``t = 0.1``, ``V = 1`` determines the strength of the hopping and nearest-neighbor interaction.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,9 @@ and the site Hamiltonian :math:`\mathcal{H}_i` can be written as
\end{pmatrix}
\end{split}
When :math:`J = 0, h = 1`, for example, an input file of ``tenes_std``, ``std.toml`` (``sample/std-01_model/std.toml``), is as follows
When :math:`J = 0, h = 1`, for example, an input file of ``tenes_std``, ``std.toml`` (``sample/06_std_model/std.toml``), is as follows

.. literalinclude:: ../../../../sample/std-01_model/std.toml
.. literalinclude:: ../../../../sample/06_std_model/std.toml

We can calculate this model and obtain results as ::
Expand Down
12 changes: 6 additions & 6 deletions docs/sphinx/en/tutorial/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Tutorial
.. toctree::
:maxdepth: 2

simple_tutorial-1
simple_tutorial-7
simple_tutorial-8
simple_tutorial-5
simple_tutorial-6
standard_tutorial-1
01_transverse_field_ising.rst
02_time_evolution.rst
03_finite_temperature.rst
04_magnetization.rst
05_hardcore_boson_triangular.rst
06_std_model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
です。
大きさ1/2のスピン演算子を用いて定義しており、パウリ演算子を直接用いたモデルと係数が異なることに注意してください。
このチュートリアルで使用する入力ファイルおよびスクリプトファイルは ``sample/07_timeevolution`` に格納されています。
このチュートリアルで使用する入力ファイルおよびスクリプトファイルは ``sample/02_time_evolution`` に格納されています。

最初に初期状態として、基底状態の計算を行います (``simple.toml`` ファイル)。ここでは、

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

とします(``Jz = -1.0`` なので、 基底状態は強磁性状態になります)。
初期状態として基底状態を使用するため、 ``tensor_save = "save_tensor"`` として、基底状態のテンソルを保存しておきます。
Expand All @@ -27,7 +27,7 @@
実時間発展は ``mode`` を ``time`` にすることで行うことができます。
以下、入力ファイル例です( ``simple_te_strong.toml`` ファイル)。

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

ここでは、横磁場を ``hx = 2.0`` 、実時間発展の刻み幅を ``tau = 0.01`` として時間発展させています。
また、初期状態として先ほどの基底状態を用いるため、 ``tensor_load = "save_tensor"`` として、基底状態のテンソルを読み込みます。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
です。
大きさ1/2のスピン演算子を用いて定義しており、パウリ演算子を直接用いたモデルと係数が異なることに注意してください。

このチュートリアルで使用する入力ファイルおよびスクリプトファイルは ``sample/08_finitetemperature`` に格納されています。
このチュートリアルで使用する入力ファイルおよびスクリプトファイルは ``sample/03_finite_temperature`` に格納されています。
以下が入力ファイルの例です (``simple_ft_strong.toml`` ファイル)。ここでは、

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

とします。
実時間発展は ``parameter.general`` セクションの ``mode`` を ``finite`` にすることで行うことができます。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
ここで\ :math:`\langle i, j\rangle`\ は隣接サイトの組を表し、\ :math:`h`\ \ :math:`z`\ 方向にかけられた外部磁場の大きさを表します。
この模型の基底状態を計算し、ユニットセルの平均磁化 \ :math:`\langle S_z \rangle\equiv \frac{1}{N_u}\sum_i^{N_u} \langle S_i^z \rangle`\ を磁場\ :math:`h`\ の関数として求めてみましょう ( :math:`N_u` はユニットセル内のサイト数)。

この計算を行うには、 ``sample/05_magnetization`` のディレクトリ内にある toml ファイル ``basic.toml`` と、pythonスクリプト ``tutorial_magnetization.py`` を利用します。 ``basic.toml`` ファイルには、模型の設定やパラメータなどが記述されています。
この計算を行うには、 ``sample/04_magnetization`` のディレクトリ内にある toml ファイル ``basic.toml`` と、pythonスクリプト ``tutorial_magnetization.py`` を利用します。 ``basic.toml`` ファイルには、模型の設定やパラメータなどが記述されています。

.. literalinclude:: ../../../../sample/05_magnetization/basic.toml
.. literalinclude:: ../../../../sample/04_magnetization/basic.toml

``lattice`` セクションで三角格子を指定しており、ユニットセルの大きさは\ :math:`3\times 3`\ を指定しています。
ここでは計算を軽くするために、 ``simple update`` だけを行っており、虚時間の刻み幅\ :math:`\tau`\ \ :math:`\tau = 0.01`\ としています。また簡単のため、\ :math:`J=1`\ としています。この基本設定ファイルを用いて、 ``tutorial_magnetization.py`` では磁場を掃引したときの磁化を計算します。

.. literalinclude:: ../../../../sample/05_magnetization/tutorial_magnetization.py
.. literalinclude:: ../../../../sample/04_magnetization/tutorial_magnetization.py

このスクリプトでは、磁場\ :math:`h`\ を0から5まで0.25刻みで変化させ、基底状態のエネルギーと\ :math:`\langle S_z \rangle`\ を計算して、 ``energy.dat`` および ``magnetization.dat`` に出力します。 ``simple update`` の時間ステップ数を\ :math:`100`, :math:`200`, :math:`500`, :math:`1000`, :math:`2000`\ と変化させたときの様子を見るために、各磁場でステップ数を変えた計算も行っています。
計算量を減らすために、少ないステップ数で得られた波動関数の情報を ``tensor_save`` に保存し、それをより多いステップ数の計算の初期状態としてとっています。例えば、最初に時間ステップ数を100とした計算を行って結果を出力したあと、ステップ数100の計算終了時の波動関数からさらにステップ数100の計算を行って、結果的にステップ数200の計算結果を得ます。
Expand Down Expand Up @@ -61,7 +61,7 @@

三角格子量子ハイゼンベルク模型のエネルギー(左図)と磁化過程(右図)

では正方格子でも同じことをやってみましょう。 ``sample/05_magnetization`` のディレクトリ中にある toml ファイル ``basic_square.toml`` と、pythonスクリプト ``tutorial_magnetization_square.py`` を利用します。
では正方格子でも同じことをやってみましょう。 ``sample/04_magnetization`` のディレクトリ中にある toml ファイル ``basic_square.toml`` と、pythonスクリプト ``tutorial_magnetization_square.py`` を利用します。
``basic_square.toml`` は、 ``lattice`` セクションが以下のように変更されているほかは ``basic.toml`` と同じ内容です。
::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
もうひとつは固体秩序です。 1/3フィリングでは、 :numref:`fig_tutorial6_hardcore_boson` の挿入図に示すような\ :math:`\sqrt{3}\times\sqrt{3}`\ 超格子構造をもつ固体相が出現します。
これは波数\ :math:`\boldsymbol{Q}=(4\pi/3,0)`\の構造因子\ :math:`S(\boldsymbol{Q}) = \sum_{ij}^{N_\text{sites}} \langle n_i n_j \rangle \exp[-i\boldsymbol{Q}\cdot(r_i - r_j)] / N_\text{site}`\ を計算することで特徴づけることができます。

この模型の計算を行うには、 ``sample/06_hardcore_boson_triangular`` ディレクトリ中にある toml ファイル ``basic.toml``, ``nn_obs.toml`` と、Pythonスクリプト ``run.py`` を利用します。 ``basic.toml`` ファイルには模型の設定やパラメータなどが記述されています。このファイルの記述は、前節の三角格子ハイゼンベルク模型とほぼ同じであるため、内容は割愛します。唯一の変更点は最後の ``model`` セクションだけです。ここで、 ``type = "boson"`` によってハードコアボゾン模型を指定しており、 ``t = 0.1``, ``V = 1`` によってホッピングおよび隣接サイト間相互作用の大きさを指定しています。
この模型の計算を行うには、 ``sample/05_hardcore_boson_triangular`` ディレクトリ中にある toml ファイル ``basic.toml``, ``nn_obs.toml`` と、Pythonスクリプト ``run.py`` を利用します。 ``basic.toml`` ファイルには模型の設定やパラメータなどが記述されています。このファイルの記述は、前節の三角格子ハイゼンベルク模型とほぼ同じであるため、内容は割愛します。唯一の変更点は最後の ``model`` セクションだけです。ここで、 ``type = "boson"`` によってハードコアボゾン模型を指定しており、 ``t = 0.1``, ``V = 1`` によってホッピングおよび隣接サイト間相互作用の大きさを指定しています。

構造因子 :math:`S(\boldsymbol{Q})` を計算するためには、(ユニットセル中の)全サイト対における密度密度相関 :math:`\langle n_i n_j \rangle` を計算する必要があります。
この演算子は ``tenes_simple`` では定義されないため、別途定義する必要があります。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,9 @@ TeNeSはハミルトニアンをボンドハミルトニアン (2サイトハミ
です。
たとえば、極端な例として :math:`J = 0, h = 1` を考えてみると、
入力ファイル (``sample/std-01_model/std.toml``) は次のとおりです。
入力ファイル (``sample/06_std_model/std.toml``) は次のとおりです。

.. literalinclude:: ../../../../sample/std-01_model/std.toml
.. literalinclude:: ../../../../sample/06_std_model/std.toml

これを用いて計算すると

Expand Down
13 changes: 7 additions & 6 deletions docs/sphinx/ja/tutorial/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
.. toctree::
:maxdepth: 2

simple_tutorial-1
simple_tutorial-7
simple_tutorial-8
simple_tutorial-5
simple_tutorial-6
standard_tutorial-1

01_transverse_field_ising
02_time_evolution
03_finite_temperature
04_magnetization
05_hardcore_boson_triangular
06_std_model
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
24 changes: 0 additions & 24 deletions sample/03_S1_AFH_square/simple.toml

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
25 changes: 0 additions & 25 deletions sample/04_Kitaev_honeycomb/simple.toml

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 6da3f65

Please sign in to comment.