Mismatch with ED results for SpinChainNNN2 Class

Discussing the best way to implement feature X
Post Reply
Anirban_Das
Posts: 1
Joined: 08 Sep 2022, 08:30

Mismatch with ED results for SpinChainNNN2 Class

Post by Anirban_Das »

Hello,

We (@Anirban_Das and @Sagnik Chaudhuri ) are new users of TenPy and trying to implement TEBD real-time evolution for various models encoded in the package. We have been able to follow the documentation, and successfully matched the ED and TEBD results using TFIChain class.

Now, we are trying to extend the TEBD real time evolution for finite system size for Hamiltonians which have NNN (Next-nearest-neighbor interaction) terms in it. We start from a fully polarized 'up' state in z-direction. We have used NNN2 class and followed the c_tebd.py and e_tdvp.py example scripts from the TenPy documents for our simulation.

We face the following issues:

(1) For the given model parameters [model_params = dict(
L=L,
Jz=-4.0,
Jy=0.0,
Jx=0.0,
Jzp=2.8,
Jyp=0.0,
Jxp=0.0,
hz=0.04,
hx=2.4,
hy = 0.0,
bc_MPS='finite',
conserve=None,
) ],


We find a perfect match for L = 4,8,12 with ED. However for L = 6,7,9,10 TEBD results are not matching with ED results. We have decreased 'dt' and increased bond dimension and still the results did not match. Please note that for L = 6,7,9,10 (as shown in the L = 10 plot attached herewith), the TEBD and ED results match with each other at extremely short times but then the results diverge from each other. Apart from magnetization evolution, this trend is observed for half chain entanglement entropy as well.

We are not sure, why this is happening. We have attached our code for your reference. We do not know if we are missing any necessary steps.

Can you help us with the following situation?

Thanking you,
Best regards,
Anirban and Sagnik

Code: Select all


#---------------------------------------------------#
import numpy as np                                  #
from tfi_exact import *                             #
from tenpy.networks.mps import MPS                  #
from tenpy.models.spins_nnn import SpinChainNNN2    #
from tenpy.models.model import NearestNeighborModel #
from tenpy.algorithms import tebd                   #
#---------------------------------------------------#

def tebd_dynamics(L):

    print("finite TEBD, real time evolution, NNN Chain")
     #--------------------------------------------------------------------------------
    def measure():
        #times.append(tebd_engine.evolved_time)                       
        #E2 = np.sum(psi.expectation_value(M.H_bond[1:]))            
        E2 = np.sum(M_nn.bond_energies(psi))                     
        Eft.append(E2)

        psi.group_split()                                   
        #----------------------------------------------------------------------------
        S_mid.append((psi.entanglement_entropy(bonds=[L // 2])[0])/L)    
        #----------------------------------------------------------------------------
                                             #Energy
        #-----------------------------------------------------------------------------
        mag_x = (2.0*np.sum(psi.expectation_value("Sx"))/L) #factor of 2 for Sx vs Sigmax
        mag_z = (2.0*np.sum(psi.expectation_value("Sz"))/L)
        MZtebd.append(mag_z)
        MXtebd.append(mag_x)
#-----------------------------------------------------------------------------


    model_params = dict(
        L=10,
        Jz=-4.0,
        Jy=0.0,
        Jx=0.0,
        Jzp=2.8,
        Jyp=0.0,
        Jxp=0.0,
        hz=0.04,
        hx=2.4,
        hy = 0.0,
        bc_MPS='finite',
        conserve=None,
    )                                                     #Model Parmeters


    M = SpinChainNNN2(model_params)
    product_state = ["up"] * M.lat.N_sites
    psi = MPS.from_product_state(M.lat.mps_sites(), product_state, bc=M.lat.bc_MPS)
    M.group_sites(n=2)  # ... and model
    psi.group_sites(n=2)  # ... For the first entry in the loop
    M_nn = NearestNeighborModel.from_MPOModel(M)         


    times = []
    S_mid = []
    Eft = []
    MZtebd = []
    MXtebd = []




    for i in range(600):
        measure()
        tebd_params = {'order':2,
        'start_time': (0.1*i),
        'dt': 0.01,
        'N_steps': 10,
        'trunc_params': {
            'chi_max': 1200,
            'svd_min': 1.e-15,
            'trunc_cut': None
        }
    }
        print(i)
        times.append(i*0.1)
        print('tebd_steps:',i)
        print('bond_dim:', psi.chi)
        psi.group_sites(n=2)  
        #-----------------------------------------------------------------------------------
        tebd_engine = tebd.TEBDEngine(psi, M_nn, tebd_params)           
        #-----------------------------------------------------------------------------------
        print(tebd_engine.evolved_time)
        tebd_engine.run()
    #---------------------------------------------------------------------------------
    print('*'*80)
    print('Time evolution has completed')
    print('*'*80)
    #----------------------------------------------------------------------------------
    return times, S_mid, Eft, MZtebd, MXtebd

tebd_Time,tebd_EE,tebd_E,tebd_MZ,tebd_MX = (tebd_dynamics(10))]
Attachments
NNN2_L12_t600_mxmz.png
NNN2_L12_t600_mxmz.png (58.43 KiB) Viewed 34533 times
NNN2_L10_t600_mxmz.png
NNN2_L10_t600_mxmz.png (87.63 KiB) Viewed 34533 times
NNN2_L8_t600_mxmz.png
NNN2_L8_t600_mxmz.png (93.56 KiB) Viewed 34533 times
Post Reply