Ejemplo n.º 1
0
                loaded = False
                # Get peps loaded
                try:
                    fnamel = prepend + 'Nx{}_Ny{}_sx{}_sy{}_D{}_chi{}_run_left'.format(
                        N, N, sxind, 0, D[dind], chi[dind])
                    pepsl = PEPS(N,
                                 N,
                                 d,
                                 D[dind],
                                 chi[dind],
                                 norm_tol=0.5,
                                 norm_bs_upper=3.,
                                 norm_bs_lower=0.,
                                 normalize=False)
                    pepsl.load_tensors(pepsdir + fnamel)
                    loaded = True
                except Exception as e:
                    #print('Failed to get PEPS left loaded: {}'.format(e))
                    pepsl = None
                try:
                    fnamer = prepend + 'Nx{}_Ny{}_sx{}_sy{}_D{}_chi{}_run_right'.format(
                        N, N, sxind, 0, D[dind], chi[dind])
                    peps = PEPS(N,
                                N,
                                d,
                                D[dind],
                                chi[dind],
                                norm_tol=0.5,
                                norm_bs_upper=3.,
                                norm_bs_lower=0.,
Ejemplo n.º 2
0
from cyclopeps.ops.asep import return_op
from cyclopeps.algs.tebd import run_tebd
from cyclopeps.algs.tebd import run_tebd
from sys import argv
import numpy as np

# Get input values
fname = argv[1]
Nx = int(argv[2])
Ny = int(argv[3])
start = 3

# ---------------------------------------------------------
# Create an initial peps
peps = PEPS(Nx=Nx, Ny=Ny, fname=fname + '_restart', fdir='./', normalize=False)
peps.load_tensors(fname)

# TEBD Parameters
step_sizes = [
    0.5, 0.1, 0.01, 0.1, 0.01, 0.1, 0.01, 0.1, 0.01, 0.1, 0.01, 0.1, 0.01, 0.1,
    0.01, 0.1, 0.01, 0.1, 0.01, 0.1, 0.01, 0.1, 0.01, 0.1, 0.01, 0.1, 0.01,
    0.1, 0.01, 0.1, 0.01, 0.1, 0.01, 0.1, 0.01, 0.1, 0.01, 0.1, 0.01, 0.1,
    0.01, 0.1, 0.01, 0.1, 0.01, 0.1, 0.01, 0.1, 0.01, 0.1, 0.01, 0.1, 0.01,
    0.1, 0.01, 0.1, 0.01
]
D = [
    1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5,
    5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9,
    9, 10, 10, 10, 10, 10, 10
]
chi = [
Ejemplo n.º 3
0
             norm_bs_upper=3.,
             norm_bs_lower=0.)

# Loop over all optimizaton parameters
for ind in range(len(D)):
    # Update PEPS Parameters
    pepsl.D = D[ind]
    pepsl.chi = chi[ind]
    pepsl.fname = prepend + "Nx{}_Ny{}_sx{}_sy{}_D{}_chi{}_run_left".format(
        Nx, Ny, sxind, syind, D[ind], chi[ind])

    # --------------------------------------------------------------------
    # Calculate left eigenstate
    for i in range(5):
        try:
            Efl, pepsl = run_tebd(Nx,
                                  Ny,
                                  d,
                                  opsl,
                                  peps=pepsl,
                                  D=D[ind],
                                  chi=chi[ind],
                                  n_step=n_step[ind],
                                  step_size=dt[ind],
                                  conv_tol=conv[ind])
            break
        except Exception as e:
            print('Failed Left TEBD:\n{}'.format(e))
            print('Restarting ({}/{} restarts)'.format(i, 5))
            pepsl.load_tensors(pepsl.fdir + pepsl.fname)
Ejemplo n.º 4
0
            norm_bs_lower=0.,
            normalize=False)
pepsl = PEPS(Nx,
             Ny,
             d,
             D[0],
             chi[0],
             fname=fnamel,
             fdir=savedir,
             norm_tol=0.5,
             norm_bs_upper=3.,
             norm_bs_lower=0.,
             normalize=False)
# Load previous PEPS tensors
print('Loading Tensors')
peps.load_tensors(load_fnamer)
pepsl.load_tensors(load_fnamel)

# Loop over all optimizaton parameters
for ind in range(startind, len(D)):
    # Update PEPS Parameters
    peps.D = D[ind]
    peps.chi = chi[ind]
    peps.fname = "Nx{}_Ny{}_sx{}_sy{}_D{}_chi{}_run_right".format(
        Nx, Ny, sxind, syind, D[ind], chi[ind])
    pepsl.fname = "Nx{}_Ny{}_sx{}_sy{}_D{}_chi{}_run_left".format(
        Nx, Ny, sxind, syind, D[ind], chi[ind])

    # --------------------------------------------------------------------
    # Calculate right eigenstate
    if not left: