issp-center-dev / TeNeS

Massively parallel tensor network solver
http://www.pasums.issp.u-tokyo.ac.jp/tenes/en
GNU General Public License v3.0
46 stars 11 forks source link

self.s VS self.zs #74

Open HamidArianZad opened 11 months ago

HamidArianZad commented 11 months ago

Hi,

I newly installed last version (v-1.3.3) of TeNeS. I can run samples code in sample folder of TeNeS. In previous version (v-1.2), I introduced my lattice in tenes_simple.py file and it was working fine with self.z. I just copied my lattice code from previous version to the tenes_simple of new version v-1.3.3 and I faced an error after running the code, revealing that self.z should not be integer. I found that you replaced self.z with self.zs in the lattice parts. For example for Kagome lattice introduced in the new version, you introduced self.sz as: self.zs = [[2, 2, 0], [4, 0, 0], [4, 2, 0]], while in previous version it was self.z = 4. Can you please specify what is the meaning of all elements of 2d array self.zs, in detail?

For the lattice model shown below:

trianglehexagon lattice

how the elements of self.zs = [[]] for above shown lattice should be selected? I selected them as: self.zs = [[2, 1, 0], [0, 0, 0], [0, 0, 0]], is that right?

Thanks!

yomichi commented 11 months ago

Both z (old) and zs (new) mean the number of bonds connected to a site. While z treats only the nearest neighbor bonds, zs does 2nd and 3rd neighbors too. The first component of zs is the distance (0: 1st, 1: 2nd, 2: 3rd neighbors), and the second component is direction. It is assumed that all sites have the same zs, but your lattice seems not (white sites have three red bonds but the others have one red and two blue bonds).

Since z and zs are used to convert the site terms (e.g., magnetic field) into bond Hamiltonians, if you do not need to include site terms you don't worry about zs. If not, please pass --use-site-hamiltonian option to tenes_simple. By using this, the site terms are treated as the site terms themselves.

At this time, the tool, tenes_simple, is not intended to be rewritten and used unless users understand the code well. (I understand that it is better to be able to modify it with ease.)

HamidArianZad commented 11 months ago

In my lattice, all sites consist of identical S=1/2 particles. The Hamiltonian of my model is as follows:

Hamiltonian

I aim to calculate the expectation value of <S_z> as a function of the magnetic field B_z. If I understand correctly, to achieve this, I need to use the --use-site-hamiltonian option in the tenes_simple.py code. Therefore, I have switched the bool variable from False to True, like so:

def tenes_simple(
    param: MutableMapping[str, Any], use_onesite_hamiltonian: bool = True
) -> Tuple[str, Lattice]:

After making this change, I re-ran the code, but the results did not change.

-------------------------------------------

I have another argument and I would be very thankful to you if kindly respond. Certainly your comments would be very useful to accomplish my project in which the main part of my investigations were done using TeNeS.

I always find an inconsistency between the results obtained from the exact diagonalization (as well as DMRG) and that of obtained from the TeNeS. In exact diagonalization (for 24 spins) and DMRG (for upto 96 spins) I considered full periodic boundary conditions (PBC).

On the other hand, the TeNeS converts a typical lattice to an infinite tensor network. Here, I considered a 4 by 4 lattice shown in below figure.

trianglehexagon lattice4by4

To my knowledge, the TeNeS calculates order parameters such as magnetization for an infinite lattice where the boundary conditions may not play important role. However, the below figure contradicts this expectation. TeNeS produced significantly different results for the upper-bound magnetic field of the one-half plateau and the saturation field compared to ED/DMRG.

Please see my results in below figure and let me know that from where this difference originates. Is this difference reasonable?

Mag_Martini_JH05_quasiPBC

-- In above figure, I plotted the ED/DMRG results of the magnetization of my lattice with step-like mode, while smooth-mode for TeNeS has been used.

As TeNeS considers the lattice as infinite regardless of the boundary conditions, one might expect that the results obtained from ED/DMRG and TeNeS would exhibit magnetization jumps and plateaus near the same critical magnetic field points. However, upon examining the above figure, it becomes evident that TeNeS produces notably different results for the upper-bound magnetic field of the one-half plateau and the saturation field when compared to ED/DMRG.

It is worth mentioning that TeNeS and ED/DMRG results do coincide in some parts of spin-liquid region, and in the lower-bound magnetic field for the one-half plateau.

-- I also attempted quasi-periodic boundary conditions (quasiPBC) along one of the directions {x, y} for ED/DMRG, but the difference between TeNeS and ED/DMRG results still persisted.

yomichi commented 11 months ago

1. In the main part of tenes_simple script, the function tenes_simple is called as

https://github.com/issp-center-dev/TeNeS/blob/f5c35c58b6aeebbcbdd8007d0dfb92412283c9d7/tool/tenes_simple.py#L1360

Thus, the change of the default value of the second argument use_onesite_hamiltonian of tenes_simple function does not affect the result.

2. General remarks:

@TsuyoshiOkubo Do you have any idea?