27 #ifndef APP_DMRG_TEVOL_MPO_SIM_H
28 #define APP_DMRG_TEVOL_MPO_SIM_H
38 template <
class Matrix,
class SymmGroup>
51 maquis::cout <<
"Using MPO time evolution." << std::endl;
53 maquis::cout <<
"Found " << hamils.size() <<
" non overlapping Hamiltonians." << std::endl;
61 double dt = (*parms)[
"dt"];
62 typename Matrix::value_type I;
63 if (sweep < (*parms)[
"nsweeps_img"])
67 typename Matrix::value_type alpha = -I*dt;
69 Uterms.resize(hamils.size());
70 for (
int i=0; i<hamils.size(); ++i)
71 Uterms[i] =
make_exp_mpo(lattice, model, hamils[i], alpha);
76 iteration_results_.
clear();
77 for (
unsigned i=0; i < nsteps; ++i) evolve_time_step(sweep+i);
82 return iteration_results_;
86 void evolve_time_step(
unsigned sweep)
88 for (
int which = 0; which < Uterms.size(); ++which)
90 int maxiter = 6;
double tol = 1e-6;
92 for (
int k = 0; k < maxiter; ++k) {
93 std::pair<double,double> eps = evolution.sweep(sweep);
94 double rel_error = std::abs( (eps.first-eps.second) / eps.second );
99 *mps = evolution.get_current_mps();
112 std::vector<std::vector<term_t> > hamils;
113 std::vector<MPO<Matrix, SymmGroup> > Uterms;
std::vector< std::vector< term_descriptor< T > > > separate_hamil_terms(std::vector< term_descriptor< T > > const &hamil_terms)
iterative contraction of MPS * MPO tensor network
utilities for the preparation of time evolution operators
results_collector const & iteration_results() const
void prepare_te_terms(unsigned sweep)
mpo_evolver(DmrgParameters *parms_, MPS< Matrix, SymmGroup > *mps_, Lattice const &lattice_, Model< Matrix, SymmGroup > const &model_, int init_sweep=0)
void operator()(unsigned sweep, unsigned nsteps)
MPO< Matrix, SymmGroup > make_exp_mpo(Lattice const &lat, Model< Matrix, SymmGroup > const &model, std::vector< term_descriptor< typename Matrix::value_type > > const &hamil_terms, typename Matrix::value_type const &alpha=1)