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
Exact.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_EXACT_H_INCLUDED
5 #define CPPQEDCORE_STRUCTURE_EXACT_H_INCLUDED
6 
7 #include "ExactFwd.h"
8 
9 #include "TimeDependence.h"
10 #include "Types.h"
11 
12 #include <boost/shared_ptr.hpp>
13 
14 namespace structure {
15 
16 
19 {
20 public:
21  typedef boost::shared_ptr<const ExactCommon> Ptr;
22 
23  virtual ~ExactCommon() {}
24 
26 
29  bool applicableInMaster() const {return applicableInMaster_v();}
30 
31 private:
32  virtual bool applicableInMaster_v() const = 0;
33 
34 };
35 
36 
38 
56 template<int RANK>
57 class Exact : public ExactCommon, private quantumdata::Types<RANK>
58 {
59 public:
60  typedef boost::shared_ptr<const Exact> Ptr;
61 
62  typedef typename quantumdata::Types<RANK>::StateVectorLow StateVectorLow;
63 
64  virtual ~Exact() {}
65 
67  void actWithU(double t,
68  StateVectorLow& psi,
69  double t0
70  ) const {return actWithU_v(t,psi,t0);}
71 
72 private:
73  virtual void actWithU_v(double, StateVectorLow&, double) const = 0;
74 
75 };
76 
77 
79 
84 template<int RANK, bool IS_TWO_TIME>
86 {
87 public:
88  typedef typename Exact<RANK>::StateVectorLow StateVectorLow;
89 
91 
92 private:
93  virtual void actWithU_v(double t, StateVectorLow& psi, double t0) const final {actWithU_v(Time(t,t0),psi);}
94 
95  virtual void actWithU_v(Time, StateVectorLow& psi) const = 0;
96 
97 };
98 
99 
100 } // structure
101 
102 #endif // CPPQEDCORE_STRUCTURE_EXACT_H_INCLUDED
The interface every system that needs transformation between two quantum mechanical pictures must pre...
Definition: Exact.h:57
Defines class of the same name.
Basically only a metafunction defining types for higher-level constructs of arity RANK ...
Definition: Types.h:23
Implements the general Exact interface by dispatching the two possible time-dependence levels...
Definition: Exact.h:85
bool applicableInMaster() const
Describes whether the system fulfills the requirement to be used in Master-equation evolution...
Definition: Exact.h:29
Comprises modules for describing quantum systems.
Definition: Averaged.h:17
Metafunction dispatching two TwoTime & OneTime according to the template parameter IS_TWO_TIME ...
void actWithU(double t, StateVectorLow &psi, double t0) const
Describes the operation which transforms from interaction picture to the normal picture: ...
Definition: Exact.h:67
Defines tools related to the description of different time-dependence levels.
The template-parameter-independent base of Exact.
Definition: Exact.h:18