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
quantumtrajectory::TimeAveragingMCWF_Trajectory< RANK > Class Template Reference

Derived from MCWF_Trajectory, this class in addition performs time averaging of the columns during trajectory display. More...

#include <TimeAveragingMCWF_Trajectory.h>

+ Inheritance diagram for quantumtrajectory::TimeAveragingMCWF_Trajectory< RANK >:
+ Collaboration diagram for quantumtrajectory::TimeAveragingMCWF_Trajectory< RANK >:

Public Types

typedef Base::StateVector StateVector
 
typedef Base::StateVectorLow StateVectorLow
 
typedef Base::Averaged Averaged
 
typedef Averaged::Averages Averages
 
- Public Types inherited from quantumtrajectory::MCWF_Trajectory< RANK >
typedef structure::Exact< RANK > Exact
 
typedef structure::Hamiltonian< RANK > Hamiltonian
 
typedef structure::Liouvillean< RANK > Liouvillean
 
typedef structure::Averaged< RANK > Averaged
 
typedef quantumdata::StateVector< RANK > StateVector
 
typedef StateVector::StateVectorLow StateVectorLow
 
- Public Types inherited from trajectory::Adaptive< quantumdata::Types< RANK >::StateVectorLow >
typedef evolved::Evolved< quantumdata::Types< RANK >::StateVectorLow > Evolved
 

Public Member Functions

template<typename SYS >
 TimeAveragingMCWF_Trajectory (StateVector &psi, const SYS &sys, const mcwf::Pars &p, double relaxationTime, const StateVectorLow &scaleAbs=StateVectorLow())
 The signature is identical to MCWF_Trajectory::MCWF_Trajectory, but the relaxation time must be supplied as well. More...
 
const Averages getAverages () const
 
- Public Member Functions inherited from quantumtrajectory::MCWF_Trajectory< RANK >
template<typename SYS >
 MCWF_Trajectory (StateVector &psi, const SYS &sys, const mcwf::Pars &p, const StateVectorLow &scaleAbs=StateVectorLow())
 Templated constructor with the same idea as Master::Master. More...
 
void derivs (double, const StateVectorLow &, StateVectorLow &) const
 The actual function calculating the time derivative for ODE evolution. More...
 
const StateVectorgetPsi () const
 
const mcwf::LoggergetLogger () const
 
- Public Member Functions inherited from trajectory::Adaptive< quantumdata::Types< RANK >::StateVectorLow >
void step (double deltaT)
 corresponding to Evolved::step, it takes a single adaptive step More...
 
- Public Member Functions inherited from trajectory::AdaptiveIO< quantumdata::Types< RANK >::StateVectorLow >
 AdaptiveIO (Ptr)
 
cpputils::iarchivereadState (cpputils::iarchive &iar)
 Read in the EvolvedIO from a cpputils::iarchive. More...
 
cpputils::oarchivewriteState (cpputils::oarchive &oar) const
 Write the EvolvedIO to a cpputils::oarchive.
 
double getTime () const
 Returns the time of the underlying EvolvedIO.
 
- Public Member Functions inherited from trajectory::Trajectory
void evolve (double deltaT)
 Propagation for a time interval of exactly deltaT.
 
std::ostream & display (std::ostream &, int precision) const
 Displays a limited set of relevant physical and numerical information about the actual state of Trajectory at the actual time instant. More...
 
std::ostream & displayParameters (std::ostream &os) const
 print header
 
std::ostream & logOnEnd (std::ostream &os) const
 print a log at the end summarizing overall (e.g. time-averaged) physical and numerical data during the run
 
double getTime () const
 actual time instant
 
double getDtDid () const
 last perfomed timestep
 
cpputils::iarchivereadState (cpputils::iarchive &iar)
 read from an archive
 
cpputils::oarchivewriteState (cpputils::oarchive &oar) const
 write to an archive
 
- Public Member Functions inherited from trajectory::Averageable< const quantumdata::StateVector< RANK > & >
const const quantumdata::StateVector< RANK > & toBeAveraged () const
 returns the set of quantities condensed in a variable of type T that are “to be averaged”
 

Additional Inherited Members

- Protected Types inherited from quantumtrajectory::QuantumTrajectory< RANK, trajectory::Stochastic< quantumdata::Types< RANK >::StateVectorLow, const quantumdata::StateVector< RANK > & > >
typedef structure::QuantumSystemWrapper< RANK, true > QuantumSystemWrapper
 
- Protected Types inherited from trajectory::Adaptive< quantumdata::Types< RANK >::StateVectorLow >
typedef Evolved::ConstPtr ConstPtr
 
typedef Evolved::Ptr Ptr
 
- Protected Member Functions inherited from quantumtrajectory::MCWF_Trajectory< RANK >
std::ostream & displayKey_v (std::ostream &, size_t &) const override
 Forwards to structure::Averaged::displayKey.
 
- Protected Member Functions inherited from quantumtrajectory::QuantumTrajectory< RANK, trajectory::Stochastic< quantumdata::Types< RANK >::StateVectorLow, const quantumdata::StateVector< RANK > & > >
 QuantumTrajectory (typename structure::QuantumSystem< RANK >::Ptr qs, bool isNoisy, ArgumentPack &&...argumentPack)
 Constructor forwarding to BASE and QuantumSystemWrapper.
 
const QuantumSystemWrapper getQSW () const
 
cpputils::iarchivereadStateMore_v (cpputils::iarchive &iar) override
 Forwards to BASE, but also sets t0.
 
double getT0 () const
 The time instant of the beginning of the current time step. More...
 
void setT0 (double t0) const
 The time instant of the beginning of the current time step. More...
 
void setT0 () const
 The time instant of the beginning of the current time step. Sets to the current time.
 
void checkDimension (const CONSTRUCT &construct) const
 Check the dimensions of the stored quantum system against construct More...
 
- Protected Member Functions inherited from trajectory::Stochastic< quantumdata::Types< RANK >::StateVectorLow, const quantumdata::StateVector< RANK > & >
std::ostream & displayParameters_v (std::ostream &) const override
 
 Stochastic (quantumdata::Types< RANK >::StateVectorLow &, typename Evolved::Derivs, double dtInit, double epsRel, double epsAbs, const quantumdata::Types< RANK >::StateVectorLow &scaleAbs, const evolved::Maker< quantumdata::Types< RANK >::StateVectorLow > &, unsigned long seed, bool noise, const randomized::Maker &)
 Straightforward constructor combining the construction of Adaptive and randomized::Randomized.
 
 Stochastic (quantumdata::Types< RANK >::StateVectorLow &, typename Evolved::Derivs, double dtInit, const quantumdata::Types< RANK >::StateVectorLow &scaleAbs, const ParsStochastic &, const evolved::Maker< quantumdata::Types< RANK >::StateVectorLow > &, const randomized::Maker &)
 
const RandomizedPtr getRandomized () const
 
bool isNoisy () const
 
cpputils::oarchivewriteStateMore_v (cpputils::oarchive &oar) const override
 hook into Trajectory::writeState
 
- Protected Member Functions inherited from trajectory::Adaptive< quantumdata::Types< RANK >::StateVectorLow >
 Adaptive (quantumdata::Types< RANK >::StateVectorLow &, typename Evolved::Derivs, double, double, double, const quantumdata::Types< RANK >::StateVectorLow &, const evolved::Maker< quantumdata::Types< RANK >::StateVectorLow > &)
 Constructor taking the same parameters as needed to operate evolved::Maker.
 
 Adaptive (quantumdata::Types< RANK >::StateVectorLow &, typename Evolved::Derivs, double, const ParsEvolved &, const quantumdata::Types< RANK >::StateVectorLow &, const evolved::Maker< quantumdata::Types< RANK >::StateVectorLow > &)
 
const std::string trajectoryID () const
 redirected to a pure virtual, this is needed for serialization of trajectory metadata
 
std::ostream & displayParameters_v (std::ostream &) const override
 
const ConstPtr getEvolved () const
 
const Ptr getEvolved ()
 
double getDtTry () const
 
- Protected Member Functions inherited from trajectory::AdaptiveIO< quantumdata::Types< RANK >::StateVectorLow >
const Ptr getEvolvedIO () const
 note: not the same const-correctness as in Adaptive
 
- Protected Attributes inherited from trajectory::AdaptiveIO< quantumdata::Types< RANK >::StateVectorLow >
SerializationMetadata meta_
 

Detailed Description

template<int RANK>
class quantumtrajectory::TimeAveragingMCWF_Trajectory< RANK >

Derived from MCWF_Trajectory, this class in addition performs time averaging of the columns during trajectory display.

The time averages and the amount of averaging are part of the trajectory state, so that time averaging can be correctly resumed over trajectory-state i/o. Averaging starts after a specified relaxation time.

Note
Time averaging does not use stepsize-weighting, as experience has shown that this leads to worse convergence (similarly to trajectory::Ensemble).
Todo:
Stepsize-weighting could eventually be enabled as an option by a switch
An important note concerning sampling
Let us identify the two opposed regimes of our adaptive MCWF evolution:
  1. weak noise: when the contribution of jumps is small compared to the coherent development, the timestep-control is ODE-dominated, we will hardly ever experience dpLimit-overshoots
  2. strong noise: in the opposite regime, the timestep-control is dpLimit-dominated, the timestep will be approximately dpLimit/(total jump rate)

Let us consider a harmonic-oscillator mode, where the jump rate is a monotonic function of the photon number. In the 2. case, there will hence be perfect correlation between the photon number and the stepsize, which will lead to erroneous sampling in dc-mode, when the samples with the smaller stepsize are represented with the larger weight in the display.

Hence, in this case one must be careful to use deltaT mode.

See also
The different versions of trajectory::run
Todo:
If need be, the class could be modified to accept also a ProjectingMCWF_Trajectory as a base

Definition at line 38 of file TimeAveragingMCWF_Trajectory.h.

Constructor & Destructor Documentation

template<int RANK>
template<typename SYS >
quantumtrajectory::TimeAveragingMCWF_Trajectory< RANK >::TimeAveragingMCWF_Trajectory ( StateVector psi,
const SYS &  sys,
const mcwf::Pars p,
double  relaxationTime,
const StateVectorLow &  scaleAbs = StateVectorLow() 
)
inline

The signature is identical to MCWF_Trajectory::MCWF_Trajectory, but the relaxation time must be supplied as well.

Parameters
relaxationTimerelaxation time after which the time averaging starts

Definition at line 53 of file TimeAveragingMCWF_Trajectory.h.


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