Go to the source code of this file.
|
template<class Matrix , class SymmGroup > |
void | load (std::string const &dirname, MPS< Matrix, SymmGroup > &mps) |
|
template<class Matrix , class SymmGroup > |
void | save (std::string const &dirname, MPS< Matrix, SymmGroup > const &mps) |
|
template<class Matrix , class SymmGroup > |
void | check_equal_mps (MPS< Matrix, SymmGroup > const &mps1, MPS< Matrix, SymmGroup > const &mps2) |
|
template<class Matrix , class SymmGroup >
void check_equal_mps |
( |
MPS< Matrix, SymmGroup > const & |
mps1, |
|
|
MPS< Matrix, SymmGroup > const & |
mps2 |
|
) |
| |
Definition at line 348 of file mps.hpp.
352 throw std::runtime_error(
"Length doesn't match.");
354 for (
int i=0; i<mps1.
length(); ++i)
356 mps1[i].check_equal(mps2[i]);
357 }
catch (std::exception & e) {
358 maquis::cerr <<
"Problem on site " << i <<
":" << e.what() << std::endl;
template<class Matrix , class SymmGroup >
void load |
( |
std::string const & |
dirname, |
|
|
MPS< Matrix, SymmGroup > & |
mps |
|
) |
| |
Definition at line 315 of file mps.hpp.
319 while (boost::filesystem::exists( dirname +
"/mps" + boost::lexical_cast<std::string>(++L) +
".h5" ));
323 size_t loop_max = tmp.length();
325 std::string fname = dirname+
"/mps"+boost::lexical_cast<std::string>((size_t)k)+
".h5";
327 ar[
"/tensor"] >> tmp[k];
void swap(MPSTensor< Matrix, SymmGroup > &x, MPSTensor< Matrix, SymmGroup > &y)
#define semi_parallel_for(constraint,...)
template<class Matrix , class SymmGroup >
void save |
( |
std::string const & |
dirname, |
|
|
MPS< Matrix, SymmGroup > const & |
mps |
|
) |
| |
Definition at line 333 of file mps.hpp.
335 size_t loop_max = mps.
length();
337 const std::string fname = dirname+
"/mps"+boost::lexical_cast<std::string>((size_t)k)+
".h5.new";
339 ar[
"/tensor"] << mps[k];
342 const std::string fname = dirname+
"/mps"+boost::lexical_cast<std::string>((size_t)k)+
".h5";
343 boost::filesystem::rename(fname+
".new", fname);
#define parallel_for(constraint,...)