ALPS MPS Codes
Reference documentation.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Attributes | List of all members
SuperBoseHubbardNone< Matrix > Class Template Reference

#include <super_models_none.hpp>

Inheritance diagram for SuperBoseHubbardNone< Matrix >:
model_impl< Matrix, TrivialGroup >

Public Types

typedef boost::shared_ptr
< mps_initializer< Matrix,
TrivialGroup > > 
initializer_ptr
 

Public Member Functions

 SuperBoseHubbardNone (const Lattice &lat, BaseParameters &model_)
 
void do_init (const Lattice &lat, BaseParameters &model_, double)
 
void do_init (const Lattice &lat, BaseParameters &model_, std::complex< double >)
 
void update (BaseParameters const &p)
 
Index< TrivialGroup > const & phys_dim (size_t type) const
 
tag_type identity_matrix_tag (size_t type) const
 
tag_type filling_matrix_tag (size_t type) const
 
TrivialGroup::charge total_quantum_numbers (BaseParameters &parms) const
 
measurements_type measurements () const
 
tag_type get_operator_tag (std::string const &name, size_t type) const
 
table_ptr operators_table () const
 
virtual op_t const & identity_matrix (size_t type) const
 
virtual op_t const & filling_matrix (size_t type) const
 
virtual terms_type const & hamiltonian_terms () const
 
virtual op_t const & get_operator (std::string const &name, size_t type) const
 
virtual initializer_ptr initializer (Lattice const &lat, BaseParameters &parms) const
 

Protected Attributes

terms_type terms_
 

Detailed Description

template<class Matrix>
class SuperBoseHubbardNone< Matrix >

Definition at line 294 of file super_models_none.hpp.

Member Typedef Documentation

typedef boost::shared_ptr<mps_initializer<Matrix, TrivialGroup > > model_impl< Matrix, TrivialGroup >::initializer_ptr
inherited

Definition at line 49 of file model.h.

Constructor & Destructor Documentation

template<class Matrix >
SuperBoseHubbardNone< Matrix >::SuperBoseHubbardNone ( const Lattice lat,
BaseParameters model_ 
)
inline

Definition at line 312 of file super_models_none.hpp.

313  : model(model_)
314  , lattice(lat)
315  , tag_handler(new table_type())
316  {
317  do_init(lat,model,typename Matrix::value_type());
318  }
void do_init(const Lattice &lat, BaseParameters &model_, double)

Member Function Documentation

template<class Matrix >
void SuperBoseHubbardNone< Matrix >::do_init ( const Lattice lat,
BaseParameters model_,
double   
)
inline

Definition at line 320 of file super_models_none.hpp.

321  {
322  throw std::runtime_error("need complex value type");
323  }
template<class Matrix >
void SuperBoseHubbardNone< Matrix >::do_init ( const Lattice lat,
BaseParameters model_,
std::complex< double >   
)
inline

Definition at line 325 of file super_models_none.hpp.

326  {
327  // retrieve model parameters
328  int Nmax = model["Nmax"];
329  double t = model["t"];
330  double U = model["U"];
331  double mu = model["mu"];
332  double omega = model["omega"];
333  double V = model["V"];
334  double Lambda = model["Lambda"];
335  double Delta = model["Delta"];
336  double Gamma1a = model["Gamma1a"];
337  double Gamma1b = model["Gamma1b"];
338  double Gamma2 = model["Gamma2"];
339  double nbar = model["nbar"];
340 
342  const size_t N = Nmax+1;
343  const size_t N2 = N*N;
344  const std::complex<double> I(0,1);
345 
346  phys_psi.insert(std::make_pair(C, N));
347 
348  phys.insert(std::make_pair(C, N2));
349  ident.insert_block(Matrix::identity_matrix(N2), C, C);
350 
351  // construct basic on-site operators
352  mcount.resize(N,N); minteraction.resize(N,N); mcreate.resize(N,N); mdestroy.resize(N,N);
353  for( int n = 1; n <= Nmax; ++n )
354  {
355  mcount(n,n) = n;
356  if ((n*n-n) != 0)
357  minteraction(n,n) = n*n-n;
358 
359  mcreate(n,n-1) = std::sqrt(value_type(n)); // input n-1, output n
360  mdestroy(n-1,n) = std::sqrt(value_type(n)); // input n, output n-1
361  }
362  Matrix mcreate2 (N,N); gemm(mcreate ,mcreate ,mcreate2 );
363  Matrix mdestroy2(N,N); gemm(mdestroy,mdestroy,mdestroy2);
364 
365  // construct on-site superoperators
366  Matrix screate = adjoint_hamiltonian(mcreate);
367  Matrix sdestroy = adjoint_hamiltonian(mdestroy);
368  Matrix sdrive = adjoint_hamiltonian(mcreate+mdestroy);
369  Matrix spump = adjoint_hamiltonian(mcreate2+mdestroy2);
370  Matrix scount = adjoint_hamiltonian(mcount);
371  Matrix sinteraction = adjoint_hamiltonian(minteraction);
372 
373  Matrix ldestroy = super_lindblad(mdestroy );
374  Matrix lcreate = super_lindblad(mcreate );
375  Matrix ldestroy2 = super_lindblad(mdestroy2);
376 
377  // cast superoperators to op_t
378  create .insert_block(transpose(screate ), C,C);
379  destroy .insert_block(transpose(sdestroy ), C,C);
380  drive .insert_block(transpose(sdrive ), C,C);
381  pump .insert_block(transpose(spump ), C,C);
382  count .insert_block(transpose(scount ), C,C);
383  interaction.insert_block(transpose(sinteraction), C,C);
384 
385  lindDestroy .insert_block(transpose(ldestroy ), C,C);
386  lindCreate .insert_block(transpose(lcreate ), C,C);
387  lindDestroy2.insert_block(transpose(ldestroy2 ), C,C);
388 
389  leftDestroy.insert_block(transpose(super_left(mdestroy)), C,C);
390  rightCreate.insert_block(transpose(super_right(mcreate)), C,C);
391 
392  std::vector< std::pair<op_t,op_t> > hopops = decompose_bond_super<op_t>(adjoint_hamiltonian(kron(mcreate, mdestroy)),phys);
393  std::vector< std::pair<op_t,op_t> > Vops = decompose_bond_super<op_t>(adjoint_hamiltonian(kron(mcount, mcount)),phys);
394 
395 
396 #define REGISTER(op, kind) op ## _tag = tag_handler->register_op(op, kind);
398  REGISTER(create, tag_detail::bosonic)
399  REGISTER(destroy, tag_detail::bosonic)
400  REGISTER(drive, tag_detail::bosonic)
401  REGISTER(pump, tag_detail::bosonic)
402  REGISTER(count, tag_detail::bosonic)
403  REGISTER(interaction, tag_detail::bosonic)
404  REGISTER(lindDestroy, tag_detail::bosonic)
405  REGISTER(lindCreate, tag_detail::bosonic)
406  REGISTER(lindDestroy2,tag_detail::bosonic)
407  REGISTER(leftDestroy, tag_detail::bosonic)
408  REGISTER(rightCreate, tag_detail::bosonic)
409 
410  std::vector< std::pair<tag_type,tag_type> > hopops_tag(hopops.size());
411  for (size_t i=0; i<hopops.size(); ++i)
412  hopops_tag[i] = std::make_pair( tag_handler->register_op(hopops[i].first, tag_detail::bosonic),
413  tag_handler->register_op(hopops[i].second, tag_detail::bosonic) );
414  std::vector< std::pair<tag_type,tag_type> > Vops_tag(Vops.size());
415  for (size_t i=0; i<Vops.size(); ++i)
416  Vops_tag[i] = std::make_pair( tag_handler->register_op(Vops[i].first, tag_detail::bosonic),
417  tag_handler->register_op(Vops[i].second, tag_detail::bosonic) );
418 
419 
420 #undef REGISTER
421 
422  // insert superoperators for each site
423  for( int p=0; p < lat.size(); ++p )
424  {
425  // interaction H_U = U/2 n_i (n_i - 1)
426  if( U != 0 )
427  {
428  term_descriptor term;
429  term.coeff = 0.5*U;
430  term.push_back( boost::make_tuple(p, interaction_tag) );
431  this->terms_.push_back(term);
432  }
433 
434  // site-dependent chemical potential H_mu = -mu n_i
435  // harmonic trap H_omega = (omega x_i)^2/2 n_i
436  double x = p - 0.5*lat.size();
437  double mup = -mu + 0.5*omega*omega*x*x;
438  if( mup != 0 )
439  {
440  term_descriptor term;
441  term.coeff = mup;
442  term.push_back( boost::make_tuple(p, count_tag) );
443  this->terms_.push_back(term);
444  }
445 
446  // drive H_Lambda = Lambda (b_i^\dag + b_i)
447  if( Lambda != 0 )
448  {
449  term_descriptor term;
450  term.coeff = Lambda;
451  term.push_back( boost::make_tuple(p, drive_tag) );
452  this->terms_.push_back(term);
453  }
454 
455  // pump H_Delta = Delta (b_i^\dag^2 + b_i^2)
456  if( Delta != 0 )
457  {
458  term_descriptor term;
459  term.coeff = Delta;
460  term.push_back( boost::make_tuple(p, pump_tag) );
461  this->terms_.push_back(term);
462  }
463 
464  // one-boson dissipation L_{1a} = Gamma_{1a} (1+\bar{n}) lind b_i
465  // = Gamma_{1a} (1+\bar{n}) (2 b_i rho b_i^\dag - b_i^\dag b_i rho - rho b_i^\dag b_i)
466  if( Gamma1a != 0 )
467  {
468  term_descriptor term;
469  term.coeff = I*Gamma1a*(1+nbar);
470  term.push_back( boost::make_tuple(p, lindDestroy_tag) );
471  this->terms_.push_back(term);
472  }
473 
474  // one-boson dissipation at finite temperature (thermal population \bar{n})
475  // L_{1a} = Gamma_{1a} \bar{n} lind b_i^\dag
476  // = Gamma_{1a} \bar{n} (2 b_i^\dag rho b_i - b_i b_i^\dag rho - rho b_i b_i^\dag)
477  if( Gamma1a*nbar != 0 )
478  {
479  term_descriptor term;
480  term.coeff = I*Gamma1a*nbar;
481  term.push_back( boost::make_tuple(p, lindCreate_tag) );
482  this->terms_.push_back(term);
483  }
484 
485  // two-boson dissipation L_2 = Gamma_2/2 lind b_i^2
486  // = Gamma_2/2 (2 b_i^2 rho b_i^\dag^2 - b_i^\dag^2 b_i^2 rho - rho b_i^\dag^2 b_i^2)
487  if( Gamma2 != 0 )
488  {
489  term_descriptor term;
490  term.coeff = I*0.5*Gamma2;
491  term.push_back( boost::make_tuple(p, lindDestroy2_tag) );
492  this->terms_.push_back(term);
493  }
494 
495  // bond terms
496  std::vector<int> neighs = lat.forward(p);
497  for( int n = 0; n < neighs.size(); ++n )
498  {
499  // hopping H_J = -J (b_i^\dag b_{i+1} + b_i b_{i+1}^\dag)
500  for( unsigned i = 0; i < hopops_tag.size(); ++i )
501  {
502  {
503  term_descriptor term;
504  term.coeff = -t;
505  term.push_back( boost::make_tuple(p, hopops_tag[i].first) );
506  term.push_back( boost::make_tuple(neighs[n], hopops_tag[i].second) );
507  this->terms_.push_back(term);
508  }
509  {
510  term_descriptor term;
511  term.coeff = -t;
512  term.push_back( boost::make_tuple(p, hopops_tag[i].second) );
513  term.push_back( boost::make_tuple(neighs[n], hopops_tag[i].first) );
514  this->terms_.push_back(term);
515  }
516  }
517 
518  // nearest-neighbor interaction H_V = V n_i n_{i+1}
519  if( V != 0 )
520  {
521  for( unsigned i = 0; i < Vops_tag.size(); ++i )
522  {
523  {
524  term_descriptor term;
525  term.coeff = V;
526  term.push_back( boost::make_tuple(p, Vops_tag[i].first) );
527  term.push_back( boost::make_tuple(neighs[n],Vops_tag[i].second) );
528  this->terms_.push_back(term);
529  }
530  {
531  term_descriptor term;
532  term.coeff = V;
533  term.push_back( boost::make_tuple(p, Vops_tag[i].second) );
534  term.push_back( boost::make_tuple(neighs[n],Vops_tag[i].first) );
535  this->terms_.push_back(term);
536  }
537  }
538  }
539 
540  // one-boson dissipation L_{1b} = -Gamma_{1b}/2 (
541  // 2 b_{i+1} rho b_i^\dag - b_i^\dag b_{i+1} rho - rho b_i^\dag b_{i+1}
542  // + 2 b_i rho b_{i+1}^\dag - b_i b_{i+1}^\dag rho - rho b_i b_{i+1}^\dag )
543  // = Gamma_{1b}/2 (
544  // (ad b^\dag)_i (b rho)_{i+1} + (b rho)_i (ad b^\dag)_{i+1}
545  // - (ad b)_i (rho b^\dag)_{i+1} - (rho b^\dag)_i (ad b)_{i+1} )
546  if( Gamma1b != 0 )
547  {
548  term_descriptor term;
549  term.coeff = I*Gamma1b/2.;
550  term.push_back( boost::make_tuple(p, create_tag) );
551  term.push_back( boost::make_tuple(neighs[n], leftDestroy_tag) );
552  this->terms_.push_back(term);
553  }
554  if( Gamma1b != 0 )
555  {
556  term_descriptor term;
557  term.coeff = I*Gamma1b/2.;
558  term.push_back( boost::make_tuple(p, leftDestroy_tag) );
559  term.push_back( boost::make_tuple(neighs[n], create_tag) );
560  this->terms_.push_back(term);
561  }
562  if( Gamma1b != 0 )
563  {
564  term_descriptor term;
565  term.coeff = -I*Gamma1b/2.;
566  term.push_back( boost::make_tuple(p, destroy_tag) );
567  term.push_back( boost::make_tuple(neighs[n], rightCreate_tag) );
568  this->terms_.push_back(term);
569  }
570  if( Gamma1b != 0 )
571  {
572  term_descriptor term;
573  term.coeff = -I*Gamma1b/2.;
574  term.push_back( boost::make_tuple(p, rightCreate_tag) );
575  term.push_back( boost::make_tuple(neighs[n], destroy_tag) );
576  this->terms_.push_back(term);
577  }
578  }
579  }
580 
581  }
Matrix adjoint_hamiltonian(const Matrix &h)
block_matrix< Matrix, SymmGroup > identity_matrix(Index< SymmGroup > const &size)
size_type insert_block(Matrix const &, charge, charge)
Matrix super_left(const Matrix &l)
block_matrix< Matrix, SymmGroup > sqrt(block_matrix< Matrix, SymmGroup > m)
Matrix super_lindblad(const Matrix &l)
static const charge IdentityCharge
Definition: none.h:44
#define REGISTER(op, kind)
Matrix super_right(const Matrix &l)
std::vector< pos_t > forward(pos_t site) const
Definition: lattice.h:100
std::size_t insert(std::pair< charge, std::size_t > const &x)
void gemm(block_matrix< Matrix1, SymmGroup > const &A, block_matrix< Matrix2, SymmGroup > const &B, block_matrix< Matrix3, SymmGroup > &C)
block_matrix< typename maquis::traits::transpose_view< Matrix >::type, SymmGroup > transpose(block_matrix< Matrix, SymmGroup > const &m)
unsigned tag_type
Definition: tag_detail.h:36
pos_t size() const
Definition: lattice.h:115
virtual op_t const& model_impl< Matrix, TrivialGroup >::filling_matrix ( size_t  type) const
inlinevirtualinherited

Definition at line 69 of file model.h.

69 { return operators_table()->get_op( filling_matrix_tag(type) ); }
virtual table_ptr operators_table() const =0
virtual tag_type filling_matrix_tag(size_t type) const =0
template<class Matrix >
tag_type SuperBoseHubbardNone< Matrix >::filling_matrix_tag ( size_t  type) const
inlinevirtual

Implements model_impl< Matrix, TrivialGroup >.

Definition at line 598 of file super_models_none.hpp.

599  {
600  return identity_matrix_tag(type);
601  }
tag_type identity_matrix_tag(size_t type) const
virtual op_t const& model_impl< Matrix, TrivialGroup >::get_operator ( std::string const &  name,
size_t  type 
) const
inlinevirtualinherited

Definition at line 77 of file model.h.

77 { return operators_table()->get_op( get_operator_tag(name, type) ); }
virtual tag_type get_operator_tag(std::string const &name, size_t type) const =0
virtual table_ptr operators_table() const =0
template<class Matrix >
tag_type SuperBoseHubbardNone< Matrix >::get_operator_tag ( std::string const &  name,
size_t  type 
) const
inlinevirtual

Implements model_impl< Matrix, TrivialGroup >.

Definition at line 668 of file super_models_none.hpp.

669  {
670  throw std::runtime_error("Operator not defined for this model.");
671  return 0;
672  }
virtual terms_type const& model_impl< Matrix, TrivialGroup >::hamiltonian_terms ( ) const
inlinevirtualinherited

Definition at line 74 of file model.h.

74 { return terms_; }
virtual op_t const& model_impl< Matrix, TrivialGroup >::identity_matrix ( size_t  type) const
inlinevirtualinherited

Definition at line 67 of file model.h.

67 { return operators_table()->get_op( identity_matrix_tag(type) ); }
virtual table_ptr operators_table() const =0
virtual tag_type identity_matrix_tag(size_t type) const =0
template<class Matrix >
tag_type SuperBoseHubbardNone< Matrix >::identity_matrix_tag ( size_t  type) const
inlinevirtual

Implements model_impl< Matrix, TrivialGroup >.

Definition at line 594 of file super_models_none.hpp.

595  {
596  return ident_tag;
597  }
virtual initializer_ptr model_impl< Matrix, TrivialGroup >::initializer ( Lattice const &  lat,
BaseParameters parms 
) const
virtualinherited
template<class Matrix >
measurements_type SuperBoseHubbardNone< Matrix >::measurements ( ) const
inlinevirtual

Implements model_impl< Matrix, TrivialGroup >.

Definition at line 607 of file super_models_none.hpp.

608  {
610 
611  op_t ident_psi = identity_matrix<Matrix>(phys_psi);
612  op_t count_psi, create_psi, destroy_psi;
613  count_psi.insert_block(mcount, C, C);
614  create_psi.insert_block(transpose(mcreate), C, C);
615  destroy_psi.insert_block(transpose(mdestroy), C, C);
616 
617  typedef std::vector<block_matrix<Matrix, TrivialGroup> > op_vec;
618  typedef std::vector<std::pair<op_vec, bool> > bond_element;
619 
620  measurements_type meas;
621 
622  if (model["MEASURE[Density]"]) {
623  meas.push_back( new measurements::average<Matrix, TrivialGroup>("Density", lattice,
624  op_vec(1,ident_psi), op_vec(1,ident_psi),
625  op_vec(1,count_psi)) );
626  meas[meas.size()-1].set_super_meas(phys_psi);
627  }
628 
629  if (model["MEASURE[Local density]"]) {
630  meas.push_back( new measurements::local<Matrix, TrivialGroup>("Local density", lattice,
631  op_vec(1,ident_psi), op_vec(1,ident_psi),
632  op_vec(1,count_psi)) );
633  meas[meas.size()-1].set_super_meas(phys_psi);
634  }
635 
636  if (model["MEASURE[Local density^2]"]) {
637  op_t count2_psi;
638  gemm(count_psi, count_psi, count2_psi);
639  meas.push_back( new measurements::local<Matrix, TrivialGroup>("Local density^2", lattice,
640  op_vec(1,ident_psi), op_vec(1,ident_psi),
641  op_vec(1,count2_psi)) );
642  meas[meas.size()-1].set_super_meas(phys_psi);
643  }
644 
645  if (model["MEASURE[Onebody density matrix]"]) {
646  bond_element ops;
647  ops.push_back( std::make_pair(op_vec(1,create_psi), false) );
648  ops.push_back( std::make_pair(op_vec(1,destroy_psi), false) );
649  meas.push_back( new measurements::correlations<Matrix, TrivialGroup>("Onebody density matrix", lattice,
650  op_vec(1,ident_psi), op_vec(1,ident_psi),
651  ops, true, false) );
652  meas[meas.size()-1].set_super_meas(phys_psi);
653  }
654 
655  if (model["MEASURE[Density correlation]"]) {
656  bond_element ops;
657  ops.push_back( std::make_pair(op_vec(1,count_psi), false) );
658  ops.push_back( std::make_pair(op_vec(1,count_psi), false) );
659  meas.push_back( new measurements::correlations<Matrix, TrivialGroup>("Density correlation", lattice,
660  op_vec(1,ident_psi), op_vec(1,ident_psi),
661  ops, true, false) );
662  meas[meas.size()-1].set_super_meas(phys_psi);
663  }
664 
665  return meas;
666  }
size_type insert_block(Matrix const &, charge, charge)
static const charge IdentityCharge
Definition: none.h:44
void gemm(block_matrix< Matrix1, SymmGroup > const &A, block_matrix< Matrix2, SymmGroup > const &B, block_matrix< Matrix3, SymmGroup > &C)
block_matrix< typename maquis::traits::transpose_view< Matrix >::type, SymmGroup > transpose(block_matrix< Matrix, SymmGroup > const &m)
template<class Matrix >
table_ptr SuperBoseHubbardNone< Matrix >::operators_table ( ) const
inlinevirtual

Implements model_impl< Matrix, TrivialGroup >.

Definition at line 674 of file super_models_none.hpp.

675  {
676  return tag_handler;
677  }
template<class Matrix >
Index<TrivialGroup> const& SuperBoseHubbardNone< Matrix >::phys_dim ( size_t  type) const
inlinevirtual

Implements model_impl< Matrix, TrivialGroup >.

Definition at line 590 of file super_models_none.hpp.

591  {
592  return phys;
593  }
template<class Matrix >
TrivialGroup::charge SuperBoseHubbardNone< Matrix >::total_quantum_numbers ( BaseParameters parms) const
inlinevirtual

Implements model_impl< Matrix, TrivialGroup >.

Definition at line 602 of file super_models_none.hpp.

603  {
605  }
static const charge IdentityCharge
Definition: none.h:44
template<class Matrix >
void SuperBoseHubbardNone< Matrix >::update ( BaseParameters const &  p)
inlinevirtual

Implements model_impl< Matrix, TrivialGroup >.

Definition at line 583 of file super_models_none.hpp.

584  {
585  // TODO: update this->terms_ with the new parameters
586  throw std::runtime_error("update() not yet implemented for this model.");
587  return;
588  }

Member Data Documentation

terms_type model_impl< Matrix, TrivialGroup >::terms_
protectedinherited

Definition at line 85 of file model.h.


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