27 #include <alps/utility/copyright.hpp>
44 #include <boost/program_options.hpp>
51 template <
class Matrix,
class SymmGroup>
52 void run (std::string
const& chkp1, std::string
const& chkp2)
58 std::cout <<
"<mps1 | mps2> = " <<
overlap(mps1, mps2) << std::endl;
61 int main(
int argc,
char ** argv)
65 <<
" Density Matrix Renormalization Group algorithm\n"
66 <<
" available from http://alps.comp-phys.org/\n"
67 <<
" copyright (c) 2013 Institute for Theoretical Physics, ETH Zurich\n"
68 <<
" copyright (c) 2010-2011 by Bela Bauer\n"
69 <<
" copyright (c) 2011-2013 by Michele Dolfi\n"
70 <<
" for details see the publication: \n"
71 <<
" M. Dolfi et al, in preparation\n"
73 alps::print_copyright(std::cout);
76 std::string chkp1, chkp2;
78 namespace po = boost::program_options;
79 po::options_description desc(
"Allowed options");
81 (
"help,h",
"produce help message")
82 (
"version",
"print program version")
83 (
"complex",
"use complex numbers")
84 (
"mps1", po::value<std::string>(&chkp1)->required(),
"path to chkp of mps1")
85 (
"mps2", po::value<std::string>(&chkp2)->required(),
"path to chkp of mps2");
86 po::positional_options_description p;
91 po::store(po::command_line_parser(argc, argv).options(desc).positional(p).
run(), vm);
93 if (vm.count(
"help")) {
94 std::cout << desc << std::endl;
97 if (vm.count(
"version")) {
98 std::cout << alps::version_string() << std::endl;
106 if (vm.count(
"complex")) run<cmatrix, grp>(chkp1, chkp2);
107 else run<matrix, grp>(chkp1, chkp2);
109 }
catch (std::exception & e) {
110 std::cerr <<
"Exception thrown:" << std::endl;
111 std::cerr << e.what() << std::endl;
void load(alps::hdf5::archive &ar, std::string const &path, TrivialGroup::charge &value, std::vector< std::size_t > chunk=std::vector< std::size_t >(), std::vector< std::size_t > offset=std::vector< std::size_t >())
void run(std::string const &chkp1, std::string const &chkp2)
declaration of the MPS class (vector of MPSTensor)
alps::numeric::matrix< double > matrix
NU1 grp
build with NU1 symmetry
utility functions for the MPO
include one of the Index class definitions
MPS< Matrix, SymmGroup >::scalar_type overlap(MPS< Matrix, SymmGroup > const &mps1, MPS< Matrix, SymmGroup > const &mps2)
definition of MPO class (vector of MPOTensor)
#define DMRG_VERSION_STRING
functions to operate on MPS and MPO (compute expectation values, etc.)
int main(int argc, char **argv)
alps::numeric::matrix< std::complex< double > > cmatrix
functions to contract tensor network states