10#include "utils/vec_clone.hpp"
13#include <initializer_list>
20 #include "backend/Scalar.hpp"
25 class DMRG_impl :
public intrusive_ptr_base<DMRG_impl> {
32 std::vector<MPS> ortho_mps;
40 std::vector<UniTensor> LR;
41 std::vector<std::vector<UniTensor>> hLRs;
57 boost::intrusive_ptr<DMRG_impl> _impl;
58 DMRG(
MPO mpo,
MPS mps, std::vector<MPS> ortho_mps = {},
const double &weight = 30)
59 : _impl(
new DMRG_impl()) {
63 this->_impl->mpo = mpo;
64 this->_impl->mps = mps;
67 this->_impl->ortho_mps = ortho_mps;
68 this->_impl->weight = weight;
71 DMRG(
const DMRG &rhs) { _impl = rhs._impl; }
87 return this->_impl->sweep(verbose, maxit, krydim);
93 return this->_impl->sweepv2(verbose, maxit, krydim);
Scalar sweepv2(const bool &verbose=false, const cytnx_int64 &maxit=4000, const cytnx_int64 &krydim=4)
Definition DMRG.hpp:91
DMRG & initialize()
Definition DMRG.hpp:79
DMRG & operator=(const DMRG &rhs)
Definition DMRG.hpp:74
Scalar sweep(const bool &verbose=false, const cytnx_int64 &maxit=4000, const cytnx_int64 &krydim=4)
Definition DMRG.hpp:85
Helper function to print vector with ODT:
Definition Accessor.hpp:12
int64_t cytnx_int64
Definition Type.hpp:58