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"];
342 const size_t N = Nmax+1;
343 const size_t N2 = N*N;
344 const std::complex<double> I(0,1);
346 phys_psi.
insert(std::make_pair(C, N));
348 phys.
insert(std::make_pair(C, N2));
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 )
357 minteraction(n,n) = n*n-n;
359 mcreate(n,n-1) =
std::sqrt(value_type(n));
360 mdestroy(n-1,n) =
std::sqrt(value_type(n));
362 Matrix mcreate2 (N,N);
gemm(mcreate ,mcreate ,mcreate2 );
363 Matrix mdestroy2(N,N);
gemm(mdestroy,mdestroy,mdestroy2);
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);
396 #define REGISTER(op, kind) op ## _tag = tag_handler->register_op(op, kind);
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) );
423 for(
int p=0; p < lat.
size(); ++p )
430 term.push_back( boost::make_tuple(p, interaction_tag) );
431 this->
terms_.push_back(term);
436 double x = p - 0.5*lat.
size();
437 double mup = -mu + 0.5*omega*omega*x*x;
442 term.push_back( boost::make_tuple(p, count_tag) );
443 this->
terms_.push_back(term);
451 term.push_back( boost::make_tuple(p, drive_tag) );
452 this->
terms_.push_back(term);
460 term.push_back( boost::make_tuple(p, pump_tag) );
461 this->
terms_.push_back(term);
469 term.
coeff = I*Gamma1a*(1+nbar);
470 term.push_back( boost::make_tuple(p, lindDestroy_tag) );
471 this->
terms_.push_back(term);
477 if( Gamma1a*nbar != 0 )
480 term.
coeff = I*Gamma1a*nbar;
481 term.push_back( boost::make_tuple(p, lindCreate_tag) );
482 this->
terms_.push_back(term);
490 term.
coeff = I*0.5*Gamma2;
491 term.push_back( boost::make_tuple(p, lindDestroy2_tag) );
492 this->
terms_.push_back(term);
496 std::vector<int> neighs = lat.
forward(p);
497 for(
int n = 0; n < neighs.size(); ++n )
500 for(
unsigned i = 0; i < hopops_tag.size(); ++i )
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);
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);
521 for(
unsigned i = 0; i < Vops_tag.size(); ++i )
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);
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);
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);
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);
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);
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);
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
#define REGISTER(op, kind)
Matrix super_right(const Matrix &l)
std::vector< pos_t > forward(pos_t site) const
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)