C++QEDCore  2.100.2 (v2 Milestone 10 Development branch)
a framework for simulating open quantum dynamics – core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Liouvillean.h
Go to the documentation of this file.
1 // Copyright András Vukics 2006–2014. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.txt)
2 // -*- C++ -*-
4 #ifndef CPPQEDCORE_STRUCTURE_LIOUVILLEAN_H_INCLUDED
5 #define CPPQEDCORE_STRUCTURE_LIOUVILLEAN_H_INCLUDED
6 
7 #include "LiouvilleanFwd.h"
8 
10 #include "TimeDependence.h"
11 
12 #include "LazyDensityOperator.h"
13 #include "StateVector.h"
14 
15 
16 namespace structure {
17 
19 
36 template<int RANK>
37 class Liouvillean : public quantumdata::Types<RANK,LiouvilleanAveragedCommonRanked<RANK> >
38 {
39 public:
40  static const int N_RANK=RANK;
41 
42  typedef boost::shared_ptr<const Liouvillean> Ptr;
43 
44 private:
46 
47 public:
49 
50  typedef typename Base:: StateVectorLow StateVectorLow;
51  typedef typename Base::DensityOperatorLow DensityOperatorLow;
52 
53  typedef typename Base::LazyDensityOperator LazyDensityOperator;
54 
55  typedef typename Base::DArray1D Rates;
56 
57  virtual ~Liouvillean() {}
58 
60 
61  const Rates rates(double t, const StateVector& psi) const {return Base::average(t,psi);}
62 
64  void actWithJ(double t,
65  StateVectorLow& psi,
66  size_t m
67  ) const {return actWithJ_v(t,psi,m);}
68 
69 private:
70  virtual void actWithJ_v(double, StateVectorLow&, size_t) const = 0;
71 
72 };
73 
74 
76 
81 template<int RANK, bool IS_TIME_DEPENDENT>
83 {
84 public:
85  typedef typename Liouvillean<RANK>::StateVectorLow StateVectorLow ;
86  typedef typename Liouvillean<RANK>::LazyDensityOperator LazyDensityOperator;
87  typedef typename Liouvillean<RANK>::Rates Rates ;
88 
90 
91 private:
92  virtual void actWithJ_v(double t, StateVectorLow& psi, size_t lindbladNo) const final {actWithJ_v(Time(t),psi,lindbladNo);}
93  virtual const Rates average_v(double t, const LazyDensityOperator& matrix) const final {return rates_v(Time(t),matrix);}
94 
95  virtual void actWithJ_v(Time, StateVectorLow&, size_t ) const = 0;
96  virtual const Rates rates_v(Time, const LazyDensityOperator&) const = 0;
97 
98 };
99 
100 
118 } // structure
119 
120 #endif // CPPQEDCORE_STRUCTURE_LIOUVILLEAN_H_INCLUDED
Metafunction dispatching two OneTime & NoTime according to the template parameter IS_TIME_DEPENDENT ...
Basically only a metafunction defining types for higher-level constructs of arity RANK ...
Definition: Types.h:23
quantumdata::LazyDensityOperator< 1 > LazyDensityOperator
unary LazyDensityOperator
Definition: Free.h:37
Defines class of the same name.
const Rates rates(double t, const StateVector &psi) const
Returns the set of jump rates where the Lindblads are in general time-dependent. ...
Definition: Liouvillean.h:61
void actWithJ(double t, StateVectorLow &psi, size_t m) const
Performs the quantum jump operation .
Definition: Liouvillean.h:64
State vector of arbitrary arity.
Definition: StateVector.h:58
Comprises modules for describing quantum systems.
Definition: Averaged.h:17
Defines class of the same name.
The interface every system having Liouvillean time-evolution must present towards the trajectory driv...
Definition: Liouvillean.h:37
Defines class of the same name.
Defines tools related to the description of different time-dependence levels.
Implements the general Liouvillean interface by dispatching the two possible time-dependence levels...
Definition: Liouvillean.h:82
Base::DArray1D Rates
The 1D real array for storing the jump rates.
Definition: Liouvillean.h:55