Esempio n. 1
0
    else:
        g1 = gates.exp_sigmax(tau*h)
        g1pre = [(0, g1), (1, g1)]
        g1post = []
    g2 = gates.exp_sigmaz_sigmaz(tau)
    g2 = [(0, 0, g2), (0, 1, g2), (1, 0, g2), (1, 1, g2)]
    return g1pre, g2, g1post

a = peps.load(basepath_varpeps + statefile)[0][0]
a = [a, a]
lut = util.build_lattice_lookup_table([[1,0],[1,0]], [4,4])

env_contractor = tebd.CTMRGEnvContractor(lut, chi, test_fct, 1e-12, 1e-15, ctmrg_verbose=True)
simulation_name = "D={:d}_chi={:d}_h={:f}_tau={:.6f}{:s}".format(D, chi, h, tau, "_trotter2" if trotter_second_order else "")
backup_interval = 100
tebd.itebd_v2(a, lut, 0, tau, maxiterations*tau, get_gates, env_contractor, basepath, simulation_name, backup_interval)


"""
if trotter_second_order:
    g1 = gates.exp_sigmax(0.5*tau*h)
else:
    g1 = gates.exp_sigmax(tau*h)
g1 = [(0, g1), (1, g1)]
g2 = gates.exp_sigmaz_sigmaz(tau)
g2 = [(0, 0, g2), (0, 1, g2), (1, 0, g2), (1, 1, g2)]

#a, nns = peps.load(basepath_varpeps + statefile)
#lut = util.build_lattice_lookup_table(nns, [4,4])
a = peps.load(basepath_varpeps + statefile)[0][0]
a = [a, a]