MPS.apply_local_op returns none

Discussing the best way to implement feature X
Post Reply
DhruvT
Posts: 5
Joined: 04 Mar 2024, 15:32

MPS.apply_local_op returns none

Post by DhruvT »

I am studying a problem where I have a three site unit cell consisting of two fermion sites and one bosonic site. I am interested in calculating the eigenvalues of the generalised transfer matrix to check whether the obtained ground state (using iDMRG) is symmetric under a given symmetry and to eventually see if the symmetry fractionalizes. The symmetry that I am interested in is unitary symmetry corresponding to total charge.
The obtained ground state contains the following information:

Python: Select all

print(psi_groundstate)
##MPS, L=6, bc='infinite'.
##chi: [64, 46, 46, 64, 46, 46]
##sites: SpinHalfFermionSite('N', 'Sz', 0.000000) BosonSite(6, 'N', 0.000000) SpinHalfFermionSite('N', 'Sz', 0.000000) SpinHalfFermionSite('N', 'Sz', 0.000000) BosonSite(6, 'N', 0.000000) SpinHalfFermionSite('N', 'Sz', 0.000000)
##forms: (0.0, 1.0) (1.0, 0.0) (0.0, 1.0) (0.0, 1.0) (0.0, 1.0) (0.0, 1.0)
##Length of the iMPS = 6
Using this groundstate, I was able to obtain the corresponding exponentiated operators

Python: Select all

eta = 0.01
N_fera = psi_groundstate.sites[0].Ntot
E_nfera = npc.expm(1.j * eta * N_fera)
print(N_fera)

###<npc.Array shape=(4, 4) labels=['p', 'p*']
###charge=ChargeInfo([1], ['N_{fa} + 2N_{b} + N_{fb}'])
 ##+1    | -1    
##0 [[0] |0 [[0] 
##1  [1] |1  [1] 
##3  [2]]|3  [2]]
##4      |4      
##[[0. 0. 0. 0.]
## [0. 1. 0. 0.]
## [0. 0. 1. 0.]
## [0. 0. 0. 2.]]
##>

print(E_nfera)

##<npc.Array shape=(4, 4) labels=['p', 'p*']
##charge=ChargeInfo([1], ['N_{fa} + 2N_{b} + N_{fb}'])
 ##+1    | -1    
##0 [[0] |0 [[0] 
##1  [1] |1  [1] 
##3  [2]]|3  [2]]
##4      |4      
##[[ 1.        +0.j          0.        +0.j          0.        +0.j
##   0.        +0.j        ]
## [ 0.        +0.j          0.99995   +0.00999983j -0.        +0.j
##   0.        +0.j        ]
## [ 0.        +0.j         -0.        +0.j          0.99995   +0.00999983j
##   0.        +0.j        ]
 ##[ 0.        +0.j          0.        +0.j          0.        +0.j
 ##  0.99980001+0.01999867j]]
##>

Similarly, I obtained the corresponding exponentiated operator for the boson site. Now I would like to apply these exponentiated operator to the iMPS corresponding to the ground state so that the transformed ground state (psi_transformed = U* psi_groundstate, U represents the unitary operator) can be used in the generalised transfer matrix to obtain fractionalization features of this symmetry. I tried doing this in the following way:

Python: Select all

## First I just checked by applying the operator on one of the sites, say a fermionic site

psi_transformed = psi_groundstate.apply_local_(0,E_nfera,unitary=True,renormalize=True,understood_infinite=True)
print(psi_transformed)

## None

psi_transformed2 = psi_groundstate.apply_local_term([('Ntot',0),('N',1),('Ntot',2),('Ntot',3),('N',4),('Ntot',5)],canonicalize=False)
print(psi_transformed2)

## None


Why does it return None in the first case? Is there a simpler way to apply the actual exponential operators like applying the pre-defined charge operators in the second case? If I input the exponential operators in the second case, the code returns a since it expects a string and not an npc_array.

I will be really grateful with any help.
Post Reply