dmrg.run() claims quartic Hamiltonian is zero

How do I use this algorithm? What does that parameter do?
Post Reply
cricket
Posts: 1
Joined: 02 Jun 2021, 20:15

dmrg.run() claims quartic Hamiltonian is zero

Post by cricket »

I am trying to find the ground state properties of a quartic fermionic model:

Code: Select all

class DipoleLadder(CouplingModel, MPOModel):
    def __init__(self, L, t, delta):
        fermion_site = FermionSite(conserve='N')
        lattice = Chain(L, fermion_site, bc='open', bc_MPS='finite')
        
        CouplingModel.__init__(self, lattice)
        tArray = np.array([(t if i%2==0 else 0) for i in range(L-3)])
        deltaArray = np.array([(delta if i%2==0 else 0) for i in range(L-3)]) 
        self.add_multi_coupling(tArray, [('Cd',0,0),('C',1,0),('Cd',3,0),('C',2,0)], plus_hc=True)
        self.add_multi_coupling(deltaArray, [('Cd',0,0),('C',1,0),('Cd',2,0),('C',3,0)], plus_hc=True)
                
        H_MPO = self.calc_H_MPO()
        MPOModel.__init__(self, lattice, H_MPO)


I think the Hamiltonian is being constructed correctly since print(DipoleLadder(8, 1, 2).all_coupling_terms().to_TermList()) returns:

2.00000 * C JW_0 Cd_1 C JW_2 Cd_3 +
-1.00000 * C JW_0 Cd_1 Cd JW_2 C_3 +
-1.00000 * Cd JW_0 C_1 C JW_2 Cd_3 +
2.00000 * Cd JW_0 C_1 Cd JW_2 C_3 +
2.00000 * C JW_2 Cd_3 C JW_4 Cd_5 +
-1.00000 * C JW_2 Cd_3 Cd JW_4 C_5 +
-1.00000 * Cd JW_2 C_3 C JW_4 Cd_5 +
2.00000 * Cd JW_2 C_3 Cd JW_4 C_5 +
2.00000 * C JW_4 Cd_5 C JW_6 Cd_7 +
-1.00000 * C JW_4 Cd_5 Cd JW_6 C_7 +
-1.00000 * Cd JW_4 C_5 C JW_6 Cd_7 +
2.00000 * Cd JW_4 C_5 Cd JW_6 C_7

which is what I'd expect to get. However, if I run:

Code: Select all

dsc = DipoleLadder(8, 1, 2)
p_state=[["full"],['empty']] 
psi = MPS.from_lat_product_state(dsc.lat,p_state)

dmrg_params = {
    'mixer': None,  # setting this to True helps to escape local minima
    'max_E_err': 1.e-10,
    'trunc_params': {
        'chi_max': 100,
        'svd_min': 1.e-10,
    },
    'verbose': True,
    'combine': True
}
eng = dmrg.TwoSiteDMRGEngine(psi, dsc, dmrg_params)
E, psi = eng.run()
I get the error "H is zero in the given block, nothing to diagonalize." My guess is that this has something to do with me misunderstanding the JW strings and leading to cancellation of all the terms somehow. But I have no idea how to fix it. Any help would be appreciated.
User avatar
Johannes
Site Admin
Posts: 413
Joined: 21 Jul 2018, 12:52
Location: TU Munich

Re: dmrg.run() claims quartic Hamiltonian is zero

Post by Johannes »

It's a problem of the inital state and charge conservation, not the jordan wigner strings.

TwoSiteDMRG updates two sites in the subspace created by projecting H to the current psi (i.e. your initial state) on other sites; this projection will render H zero because each term in H has at least two C/Cd operators outside of the two sites you update, and taking the overlap with the same initial product state will then be zero.

Try starting from a non-product initial state (e.g. by randomizing the state), and/or using the mixer.
pasa
Posts: 23
Joined: 09 Mar 2020, 12:45

Re: dmrg.run() claims quartic Hamiltonian is zero

Post by pasa »

Hello everyone!

I have a follow up question regarding this.

Consider we want to run DMRG after fixing the symmetries. Hence, generating a "random" initial state within that symmetry sector might not be easy to do. As an alternative, I was considering that an easy way to avoid this would be to first evolve the product state in real-time using TEBD for some (short) time, and then use that as an initial state for DMRG. However, even then I still obtain that the Hamiltonian is zero within the block. I guess the problem is still that H is acting on more than two sites. Would the problem be solve if I group sites? I am not sure what I am missing.

Thanks.
User avatar
Johannes
Site Admin
Posts: 413
Joined: 21 Jul 2018, 12:52
Location: TU Munich

Re: dmrg.run() claims quartic Hamiltonian is zero

Post by Johannes »

Hi @pasa,
from our last discussions, I understood that you had symmetries that can only be broken by 3-site terms, right? In that case even a TEBD-style RandomUnitaryEvolution will be trivial if you fix those symmetries. So yes, to get away from the product states, you need to group sites, run the RandomUnitaryEvolution for a few steps (with low chi_max), and then ungroup sites before your actual DMRG run.
Post Reply