Code: Select all
get_rho_segment([0], 1)
Does anyone know how to bipartition an infinite MPS into 2 semi-infinite chains so that I can compute the Resta polarization?
Thank you in advance for the help
![Smile :)](./images/smilies/icon_e_smile.gif)
Code: Select all
get_rho_segment([0], 1)
0.123
and 1.123
are equivalent: we need to subtract (somewhat) arbitrary integer numbers of charges to get a finite value.examples/chern_insulators/chiral_pi_flux.py
make a similar "experiment" of flux pumping and following the value of the average charge, you can probably base your code on that example.chiral_pi_flux_charge_pump.pdf
, the equivalent of Fig. 4 in the paper you quote, and chiral_pi_flux_ent_spec_flow.pdf
, the equivalent of Fig. 8.P
from the paper is simply what's returned by average_charge.charge_sector=None
, but then the charge conservation should have no effect on the eigenvalues of the transfer matrix.Code: Select all
from tenpy.models.model import NearestNeighborModel, CouplingMPOModel
from tenpy.models.lattice import Site, Chain
from tenpy.networks.site import FermionSite, GroupedSite
class SSHIntModel(CouplingMPOModel):
def init_sites(self, model_params):
fs = FermionSite(conserve = 'N')
gs = GroupedSite([fs, fs], labels = ['A', 'B'], charges = 'drop')
gs.add_op('Sz', gs.NA - gs.NB, False)
return gs
def init_lattice(self, model_params):
bc_MPS = model_params.get('bc_MPS', 'infinite')
bc = 'periodic' if bc_MPS == 'infinite' else 'open'
nsys = model_params.get('nsys') if bc_MPS == 'finite' else 2
self.L = nsys
fs = self.init_sites(model_params)
lat = Chain(nsys, fs, bc=bc, bc_MPS=bc_MPS)
return lat
def init_terms(self, model_params):
J = model_params.get('J', 0.)
d = model_params.get('d', 1.)
tau = model_params.get('tau', 1.)
V = model_params.get('V', 0.)
dlt = model_params.get('dlt', 0.)
#### Staggered Onsite Potential ####
if dlt != 0.:
self.add_onsite(dlt, 0, 'Sz')
#### intracell hopping terms ####
self.add_onsite(-J, 0, 'CdA CB')
self.add_onsite(J, 0, 'CA CdB')
#### intercell hopping terms ####
hop_plus = (d + tau)/2.
self.add_coupling(-hop_plus, 0, 'CdB', 0, 'CA', [1])
self.add_coupling(-hop_plus, 0, 'CdA', 0, 'CB', [-1])
hop_minus = (d - tau)/2.
self.add_coupling(-hop_minus, 0, 'CdA', 0, 'CB', [1])
self.add_coupling(-hop_minus, 0, 'CdB', 0, 'CA', [-1])
#### interaction terms ####
if V != 0:
self.add_coupling(V, 0, 'NA', 0, 'NB', [1])
self.add_coupling(V, 0, 'NB', 0, 'NA', [1])
def get_sshint_model(model_params):
M = SSHIntModel(model_params)
return NearestNeighborModel.from_MPOModel(M)
"Adiabatically" implies that the time evolution is slow enough to always stay in the ground state of the system.arxiv 1810.07043, Sec. III a wrote: We define \(\theta = 2\pi t/T\), assume adiabaticity and work in the instantaneous eigenbasis of \(H(\theta)\). Hence, the charge transport becomes independent of the time scale \(T\).
get_sshint_model
funciton obsolete:
Code: Select all
class SSHIntModel(CouplingMPOModel, NearestNeighborModel):
...
charges='same'
for the GroupedSite.Code: Select all
from tenpy.networks.mps import MPS
from tenpy.algorithms import dmrg, tebd
# SSHIntModel defined above, with charges='same'
M = SSHIntModel({'bc_MPS': 'infinite', 'tau': 1., 'nsys': 4})
pstate = ['empty_A full_B'] * M.lat.N_sites
psi = MPS.from_product_state(M.lat.mps_sites(), pstate, bc=M.lat.bc_MPS)
print("before dmrg:", psi.average_charge())
dmrg.run(psi, M, {})
print("after dmrg:", psi.average_charge())
eng = tebd.Engine(psi, M, {'dt': 0.001, 'N_steps':1, 'order': 2})
for i in range(5):
eng.run()
print("t =", eng.evolved_time, "average charge =", psi.average_charge())
charge_sector=0
, which is the default and assumes that the dominant eigenvalue is in charge sector 0.charge_sector=None
(which is the default if you use psi.overlap(other_psi)
, it checks *all* possible charge sectors.charge_sector=0
probably works after the fix, I think you should check for large eingenvalues in the other charge sectors as well; I'd expect that if you do a flux pump such that psi.average_charge()
changes by one, the charge sector of the dominant eigenvector of the mixed transfer matrix will also change.