示例#1
0
 def test_energy_calc_heis_Z2_not_reduced(self):
     from cyclopeps.tools.peps_tools import PEPS
     from cyclopeps.ops.heis import return_op
     from cyclopeps.algs.tebd import run_tebd
     mpiprint(
         0, '\n' + '=' * 50 +
         '\nPeps Full Update Z2 (not reduced) Heisenberg test\n' + '-' * 50)
     # Create PEPS
     Nx = 4
     Ny = 4
     d = 2
     D = 2
     Zn = 2
     backend = 'numpy'
     chi = 50
     # Get mpo
     ham = return_op(Nx, Ny, sym='Z2', backend=backend)
     # Run TEBD
     Ef, _ = run_tebd(Nx,
                      Ny,
                      d,
                      ham,
                      D=D,
                      Zn=Zn,
                      chi=chi,
                      backend=backend,
                      n_step=1,
                      su_step_size=[0.5, 0.1],
                      su_conv_tol=1e-5,
                      reduced=False,
                      su_n_step=1)
     print('Final  E = {}'.format(Ef))
     mpiprint(0, 'Passed\n' + '=' * 50)
示例#2
0
 def test_energy_calc_heis(self):
     from cyclopeps.tools.peps_tools import PEPS
     from cyclopeps.ops.heis import return_op
     from cyclopeps.algs.tebd import run_tebd
     mpiprint(
         0, '\n' + '=' * 50 + '\nPeps Full Update Heisenberg test\n' +
         '-' * 50)
     # Create PEPS
     Nx = 4
     Ny = 4
     d = 2
     D = 3
     Zn = None
     backend = 'numpy'
     chi = 50
     # Get mpo
     ham = return_op(Nx, Ny, sym=None, backend=backend)
     # Run TEBD
     Ef, _ = run_tebd(Nx,
                      Ny,
                      d,
                      ham,
                      D=D,
                      Zn=Zn,
                      chi=chi,
                      backend=backend,
                      n_step=100,
                      su_step_size=0.1,
                      su_conv_tol=1e-5,
                      su_n_step=1)
     print('Final  E = {}'.format(Ef))
     mpiprint(0, 'Passed\n' + '=' * 50)
示例#3
0
 def test_heis_z2(self):
     from cyclopeps.tools.peps_tools import PEPS
     from cyclopeps.ops.heis import return_op
     from cyclopeps.algs.simple_update import run_tebd,tebd_step
     mpiprint(0,'\n'+'='*50+'\nSU Z2 Heisenberg test\n'+'-'*50)
     # Create PEPS
     Nx = 5
     Ny = 5
     d = 2
     D = 4
     chi = 10
     Zn = 2
     backend = 'numpy'
     # Get operator
     ham = return_op(Nx,Ny,sym="Z2",backend=backend)
     # Run TEBD
     Ef,_ = run_tebd(Nx,
                     Ny,
                     d,
                     ham,
                     D=D,
                     chi=chi,
                     Zn=Zn,
                     backend=backend,
                     step_size=[0.5,0.1,0.05,0.01],
                     n_step=1)
     print('Final  E = {}'.format(Ef))
     mpiprint(0,'Passed\n'+'='*50)
示例#4
0
if Zn == 0:
    Zn = None
backend = argv[6]
d = 2

if backend == 'ctf':
    import ctf
    wrld = ctf.comm()

# TEBD Parameters
step_sizes = [0.1]
n_step = [5]

# Get Hamiltonian
if Zn is None:
    ham = return_op(Nx, Ny, sym=None, backend=backend)
else:
    ham = return_op(Nx, Ny, sym='Z2', backend=backend)

# Create PEPS
peps = PEPS(Nx,
            Ny,
            d,
            D,
            chi,
            Zn=Zn,
            chi_norm=10,
            chi_op=10,
            backend=backend,
            normalize=False)