4 #ifndef CPPQEDELEMENTS_FREES_MULTILEVEL__H_INCLUDED
5 #define CPPQEDELEMENTS_FREES_MULTILEVEL__H_INCLUDED
7 #include "MultiLevel_Fwd.h"
9 #include "ParsMultiLevel.h"
11 #include "AveragingUtils.tcc"
19 #include <boost/fusion/mpl/size.hpp>
21 #include <boost/shared_ptr.hpp>
28 const std::string keyTitle=
"MultiLevel";
35 struct LevelsMF : mpl::identity<blitz::TinyVector<dcomp,NL> > {};
39 struct RealLevelsMF : mpl::identity<blitz::TinyVector<double,NL> > {};
58 Exact(
const Levels& zIs) : FreeExact<false>(NL), zIs_(zIs) {}
60 const Levels& get_zIs()
const {
return zIs_;}
63 void updateU(
double)
const;
65 bool applicableInMaster_v()
const;
84 Storage(
const T& value) : value_(value) {}
86 const T&
get()
const {
return value_;}
87 void set(
const T& value) {value_=value;}
99 Storage(
double value) : value_(value) {}
101 double get()
const {
return value_;}
102 void set(
double value) {value_=value;}
113 std::ostream& operator<<(std::ostream& os, const Storage<T>& s)
121 std::istream&
operator>>(std::istream& is, Storage<T>& s)
130 template<
int I,
int J>
136 Pump(
const dcomp& value) : Base(value) {}
142 template<
int NL,
typename VP>
148 static const int NPT=mpl::size<VP>::value;
150 typedef typename Exact<NL>::Levels Levels;
152 HamiltonianIP(
const Levels& zSchs,
const Levels& zIs,
const VP& etas)
153 :
Exact<NL>(zIs), zSchs_(zSchs), etas_(etas) {}
166 template<
int NL,
typename VP>
171 static const int NPT=mpl::size<VP>::value;
175 HamiltonianSch(
const Levels& zSchs,
const VP& etas) : zSchs_(zSchs), etas_(etas) {}
177 const Levels& get_zSchs()
const {
return zSchs_;}
198 template<
int I,
int J>
204 Decay(
double value) : Base(value) {}
210 template<
int NL,
typename VL>
215 static const int NLT=mpl::size<VL>::value;
224 typedef typename Base::KeyLabels KeyLabels;
226 Liouvillean(
const VL& gammas) : Base(Liouvillean::fillJS(),Liouvillean::fillJRS(),keyTitle,fillKeyLabels()), gammas_(gammas) {}
228 const JumpStrategies fillJS ()
const;
229 const JumpRateStrategies fillJRS()
const;
231 static const KeyLabels fillKeyLabels();
275 typedef boost::shared_ptr<const MultiLevelBase>
Ptr;
282 getParsStream()<<
"# "<<multilevel::keyTitle<<std::endl;
298 template<
int NL,
typename VP,
typename VL,
typename AveragingType>
307 typedef typename multilevel:: LevelsMF<NL>::type Levels;
314 typedef typename Base::Ptr
Ptr;
316 template<
typename... AveragingConstructorParameters>
325 #define RETURN_type typename MultiLevelBase<NL>::Ptr
328 template<
typename AveragingType,
int NL,
typename VP,
typename VL,
typename... AveragingConstructorParameters>
335 const VP& etas,
const VL& gammas,
336 AveragingConstructorParameters&&... a)
338 return boost::make_shared<PumpedLossyMultiLevelSch<NL,VP,VL,AveragingType> >(deltas,etas,gammas,a...);
342 template<
typename AveragingType,
int NL,
typename VP,
typename VL,
typename... AveragingConstructorParameters>
345 makePumpedLossySch(
const multilevel::ParsPumpedLossy<NL,VP,VL>& p, AveragingConstructorParameters&&... a)
347 return makePumpedLossySch<AveragingType>(p.deltas,p.etas,p.gammas,a...);
351 template<
int NL,
typename VP,
typename VL>
354 makePumpedLossySch(
const blitz::TinyVector<double,NL>& deltas,
const VP& etas,
const VL& gammas,
const std::string& keyTitle=
"PumpedLossyMultiLevelSch",
bool offDiagonals=
false)
356 return makePumpedLossySch<ReducedDensityOperator<1> >(deltas,etas,gammas,keyTitle,NL,offDiagonals);
360 template<
int NL,
typename VP,
typename VL>
363 makePumpedLossySch(
const multilevel::ParsPumpedLossy<NL,VP,VL>& p,
const std::string& keyTitle=
"PumpedLossyMultiLevelSch",
bool offDiagonals=
false)
365 return makePumpedLossySch<ReducedDensityOperator<1> >(p,keyTitle,NL,offDiagonals);
374 #endif // CPPQEDELEMENTS_FREES_MULTILEVEL__H_INCLUDED
Contains helpers for the MultiLevel bundle.
RETURN_type makePumpedLossySch(const blitz::TinyVector< double, NL > &deltas, const VP &etas, const VL &gammas, AveragingConstructorParameters &&...a)
Maker function for PumpedLossyMultiLevelSch.
boost::shared_ptr< const QuantumSystem > Ptr
quantumdata::Types< 1 >::StateVectorLow StateVectorLow
std::list< CF > ComplexFreqs
blitz::TinyVector< JumpStrategy, NLINDBLADS > JumpStrategies
blitz::TinyVector< JumpRateStrategy, NLINDBLADS > JumpRateStrategies
std::istream & operator>>(std::istream &, Method &)
std::list< RF > RealFreqs
Class representing an elementary pump term (an here) with a compile-time pair and a runtime complex...
Implements a free multi-level system with driving and loss.
Class representing an elementary decay term (a here) with a compile-time pair and a runtime real va...
std::ostringstream & getParsStream()
std::complex< double > dcomp