C++QEDCore  v2 Milestone 10
a framework for simulating open quantum dynamics – core
structure::QuantumSystemWrapper< RANK, IS_CONST > Class Template Reference

A wrapper for Exact, Hamiltonian, Liouvillean, and Averaged. More...

#include <Structure.h>

Public Types

Wrapped types
typedef QuantumSystem< RANK > QS
 
typedef Exact< RANK > Ex
 
typedef Hamiltonian< RANK > Ha
 
typedef Liouvillean< RANK > Li
 
typedef Averaged< RANK > Av
 
Pointers to wrapped types
typedef QS::Ptr QuantumSystemPtr
 
typedef Ex::Ptr ExactPtr
 
typedef Ha::Ptr HamiltonianPtr
 
typedef Li::Ptr LiouvilleanPtr
 
typedef Av::Ptr AveragedPtr
 
Necessary types from wrapped types for definition of member-function signatures
typedef Ex::StateVectorLow StateVectorLow
 
typedef Li::Rates Rates
 
typedef Li::LazyDensityOperator LazyDensityOperator
 
typedef Av::Averages Averages
 

Public Member Functions

std::ostream & displayCharacteristics (std::ostream &os) const
 Displays the dynamical characteristics of the system.
 
Constructors
 QuantumSystemWrapper (DynamicsBase::Ptr qs)
 Constructor from DynamicsBase.
 
 QuantumSystemWrapper (QuantumSystemPtr qs, bool isNoisy)
 Constructor from QuantumSystem.
 
Getters
const QuantumSystemPtr getQS () const
 
const ExactPtr getEx () const
 
const HamiltonianPtr getHa () const
 
const LiouvilleanPtr getLi () const
 
const AveragedPtr getAv () const
 
QuantumSystemPtr getQS ()
 
ExactPtr getEx ()
 
HamiltonianPtr getHa ()
 
LiouvilleanPtr getLi ()
 
AveragedPtr getAv ()
 
Dispatcher between Liouvillean and Averaged

We use overload instead of template specialization, which is only possible in namespace scope

const L_or_A_Ptr getLA (LA_Li_tagType) const
 
const L_or_A_Ptr getLA (LA_Av_tagType) const
 
Forwarded members from Exact
bool applicableInMaster () const
 
void actWithU (double t, StateVectorLow &psi, double t0) const
 
Forwarded member from Hamiltonian
void addContribution (double t, const StateVectorLow &psi, StateVectorLow &dpsidt, double t0) const
 
Forwarded member from Liouvillean
void actWithJ (double t, StateVectorLow &psi, size_t lindbladNo) const
 
Forwarded members from Averaged
void process (Averages &averages) const
 
std::ostream & display (double t, const LazyDensityOperator &matrix, std::ostream &os, int precision) const
 
Forwarded members from LiouvilleanAveragedCommon
template<LiouvilleanAveragedTag LA>
size_t nAvr () const
 
template<LiouvilleanAveragedTag LA>
std::ostream & displayKey (std::ostream &os, size_t &i) const
 
template<LiouvilleanAveragedTag LA>
const Averages average (double t, const LazyDensityOperator &matrix) const
 

Static Public Attributes

static const int N_RANK =RANK
 

Related Functions

(Note that these are not member functions.)

template<int RANK>
std::ostream & display (boost::shared_ptr< const Averaged< RANK > >, double, const quantumdata::LazyDensityOperator< RANK > &, std::ostream &, int)
 If the first argument is a valid pointer, it calles Averaged::average, Averaged::process, and Averaged::display in succession; otherwise a no-op. More...
 
template<int RANK>
const LiouvilleanAveragedCommon::DArray1D average (typename LiouvilleanAveragedCommonRanked< RANK >::Ptr, double, const quantumdata::LazyDensityOperator< RANK > &)
 If the first argument is a valid pointer, it calles LiouvilleanAveragedCommon Averaged::average; otherwise a no-op (returning an empty array) More...
 

Detailed Description

template<int RANK, bool IS_CONST>
class structure::QuantumSystemWrapper< RANK, IS_CONST >

A wrapper for Exact, Hamiltonian, Liouvillean, and Averaged.

It’s aim is to determine whether the passed DynamicsBase or QuantumSystem object derives also from Exact, Hamiltonian, Liouvillean, and Averaged

If the answer is

  • positive, it forwards the member functions of the given class with the given object dynamic-cast to the necessary type.
  • negative, it forwards the member functions of the given class as no-ops.
Template Parameters
RANKarity of the Hilbert space
IS_CONSTgoverns const-ness

Definition at line 134 of file Structure.h.

Friends And Related Function Documentation

template<int RANK>
const LiouvilleanAveragedCommon::DArray1D average ( typename LiouvilleanAveragedCommonRanked< RANK >::Ptr  ,
double  ,
const quantumdata::LazyDensityOperator< RANK > &   
)
related

If the first argument is a valid pointer, it calles LiouvilleanAveragedCommon Averaged::average; otherwise a no-op (returning an empty array)

Definition at line 289 of file Structure.h.

template<int RANK>
std::ostream & display ( boost::shared_ptr< const Averaged< RANK > >  ,
double  ,
const quantumdata::LazyDensityOperator< RANK > &  ,
std::ostream &  ,
int   
)
related

If the first argument is a valid pointer, it calles Averaged::average, Averaged::process, and Averaged::display in succession; otherwise a no-op.

Definition at line 273 of file Structure.h.


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