ALPS MPS Codes
Reference documentation.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
generate_mpo::CorrMakerNN< Matrix, SymmGroup > Class Template Reference

#include <corr_maker.hpp>

Inheritance diagram for generate_mpo::CorrMakerNN< Matrix, SymmGroup >:
generate_mpo::CorrMakerBase< Matrix, SymmGroup >

Public Member Functions

 CorrMakerNN (Lattice const &lat_, const std::vector< op_t > &ident_, const std::vector< op_t > &fill_, std::vector< std::pair< std::vector< op_t >, bool > > const &ops, int ref=-1)
 
MPO< Matrix, SymmGroup > create_mpo ()
 
vector< vector< size_t > > const & numeric_labels ()
 
std::string description () const
 

Detailed Description

template<class Matrix, class SymmGroup>
class generate_mpo::CorrMakerNN< Matrix, SymmGroup >

Definition at line 232 of file corr_maker.hpp.

Constructor & Destructor Documentation

template<class Matrix , class SymmGroup >
generate_mpo::CorrMakerNN< Matrix, SymmGroup >::CorrMakerNN ( Lattice const &  lat_,
const std::vector< op_t > &  ident_,
const std::vector< op_t > &  fill_,
std::vector< std::pair< std::vector< op_t >, bool > > const &  ops,
int  ref = -1 
)
inline

Definition at line 240 of file corr_maker.hpp.

245  : lat(lat_)
246  , prempo(lat.size())
247  , tags(lat.size())
248  , used(lat.size())
249  , with_sign(lat.size()+2)
250  , identities(ident_.size())
251  , fillings(fill_.size())
252  , op_tags(ops.size())
253  {
254  assert(ops.size() % 2 == 0);
255 
256  /// register operators
257  for (int type=0; type<ident_.size(); ++type)
258  identities[type] = tag_handler.register_op(ident_[type], tag_detail::bosonic);
259  for (int type=0; type<fill_.size(); ++type)
260  fillings[type] = tag_handler.register_op(fill_[type], tag_detail::bosonic);
261 
262  for (size_t n=0; n<ops.size(); ++n) {
263  op_tags[n].first.resize(ops[n].first.size());
264  op_tags[n].second = ops[n].second;
265  std::vector<tag_type> & tops = op_tags[n].first;
266  for (int type=0; type<tops.size(); ++type)
267  tops[type] = tag_handler.register_op(ops[n].first[type], ops[n].second ? tag_detail::fermionic : tag_detail::bosonic);
268  }
269 
270  with_sign[0][0] = false;
271  recurse(0, 0, 0, vector<size_t>(), ref);
272  }
pos_t size() const
Definition: lattice.h:115

Member Function Documentation

template<class Matrix , class SymmGroup >
MPO<Matrix, SymmGroup> generate_mpo::CorrMakerNN< Matrix, SymmGroup >::create_mpo ( )
inlinevirtual

Implements generate_mpo::CorrMakerBase< Matrix, SymmGroup >.

Definition at line 274 of file corr_maker.hpp.

275  {
276  MPO<Matrix, SymmGroup> r(prempo.size());
277  for (size_t p = 1; p < prempo.size()-1; ++p)
278  r[p] = as_bulk(prempo[p]);
279  r[0] = as_left(prempo[0]);
280  r[prempo.size()-1] = as_right(*prempo.rbegin());
281 
282  return r;
283  }
Definition: mpo.h:36
template<class Matrix , class SymmGroup >
std::string generate_mpo::CorrMakerNN< Matrix, SymmGroup >::description ( ) const
inlinevirtual

Implements generate_mpo::CorrMakerBase< Matrix, SymmGroup >.

Definition at line 287 of file corr_maker.hpp.

288  {
289  std::ostringstream ss;
290  for (size_t p = 0; p < prempo.size(); ++p)
291  {
292  ss << "Site: " << p << std::endl;
293  for (typename vector<tag>::const_iterator it = tags[p].begin(); it != tags[p].end(); ++it)
294  ss << " " << get<0>(*it) << " " << get<1>(*it) << " " << get<2>(*it) << std::endl;
295  }
296  return ss.str();
297  }
template<class Matrix , class SymmGroup >
vector<vector<size_t> > const& generate_mpo::CorrMakerNN< Matrix, SymmGroup >::numeric_labels ( )
inlinevirtual

Implements generate_mpo::CorrMakerBase< Matrix, SymmGroup >.

Definition at line 285 of file corr_maker.hpp.

285 { return labels; }

The documentation for this class was generated from the following file: