\[H = \sum_i t_0 Z_i + t_1 X_i X_{i+1} + t_2 Z_i X_{i+1} Z_{i+2}, \quad t_0,t_1,t_2 \in\mathbb{R}.\]
As the usual iDMRG algorithm uses two sites and gives back two different MPS tensors for the two different sites, so I tried to use the Single Site DMRG Engine to only optimize one site at a time, but I still get two different MPS tensors for the two different sites. I use the following code:
Code: Select all
# Implementing the model from the Hamiltonian above
class GenCluster(MultiCouplingModel):
def __init__(self, model_params):
# Read out/set default parameters
name = "Generalized Cluster Models"
L = get_parameter(model_params, 'L', 2, name)
t0 = get_parameter(model_params, 't0', 1., name, True)
t1 = get_parameter(model_params, 't1', 0., name, True)
t2 = get_parameter(model_params, 't2', 0., name, True)
bc_MPS = get_parameter(model_params, 'bc_MPS', 'infinite', name)
unused_parameters(model_params, name) # checks for mistyped parameters
# sites
site = SpinHalfSite(conserve=None)
# lattice
bc = 'periodic'
lat = Chain(L, site, bc=bc, bc_MPS=bc_MPS)
# initialize CouplingModel
MultiCouplingModel.__init__(self, lat)
# add terms of the Hamiltonian
self.add_onsite(t0/2, 0, 'Sigmaz')
self.add_coupling(-t1/2, 0, 'Sigmax', 0, 'Sigmax', 1)
self.add_multi_coupling(-t2/2, 0, 'Sigmax', [(0, 'Sigmaz', 1), (0, 'Sigmax', 2)])
# initialize H_MPO
MPOModel.__init__(self, lat, self.calc_H_MPO())
Code: Select all
N = 2 # The length of the chain
param = {"t0": 0., "t1": 0., "t2": 0., "L": N, "bc_MPS": "infinite"} # Set infinite system
g_list = np.linspace(-1.,1.,11) # Set parameters
for g in g_list:
# Set parameters for the model
param["t0"] = 2*(1-g)**2
param["t1"] = 4*(1-g**2)
param["t2"] = 2*(1+g)**2
# Implement the model from above with the parameters t0, t1, and t2
model = GenCluster(param)
sites = model.lat.mps_sites()
# The initial state is a randomly time evolved state:
product_state = (["up", "down"] * (model.lat.N_sites))[:model.lat.N_sites]
psi = MPS.from_product_state(model.lat.mps_sites(), product_state, bc=model.lat.bc_MPS)
TEBD_params = {'N_steps':10, 'trunc_params':{'chi_max':4},'verbose':0}
eng = tebd.RandomUnitaryEvolution(psi, TEBD_params)
eng.run()
psi.canonical_form()
# The parameters for DMRG
dmrg_params = {"trunc_params": {"chi_max": 4, "chi_min": 2, "svd_min": 1.e-10},
"min_sweeps":100, "max_sweeps":200, "mixer": True, "combine":False, 'decay':2,
'amplitude':10e-1, 'disable_after':60, 'update_env':0}
# Use the Single Site DMRG Engine
eng = dmrg.SingleSiteDMRGEngine(psi, model, dmrg_params)
e, psi = eng.run()
print(psi.get_B(0))
print(psi.get_B(1))
print
statements to print out the same tensors, but they are different.Why is the resulting MPS not translationally invariant and how can I get an MPS that is translationally invariant, i.e. the same on both sites? Thanks in advance