Implements a single Monte Carlo wave-function trajectory. More...
#include <MCWF_Trajectory.h>
Public Types | |
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 > | |
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... | |
Getters | |
const StateVector & | getPsi () const |
const mcwf::Logger & | getLogger () 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::iarchive & | readState (cpputils::iarchive &iar) |
Read in the EvolvedIO from a cpputils::iarchive. More... | |
cpputils::oarchive & | writeState (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::iarchive & | readState (cpputils::iarchive &iar) |
read from an archive | |
cpputils::oarchive & | writeState (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” | |
Protected Member Functions | |
std::ostream & | display_v (std::ostream &, int) const override |
Forwards to structure::Averaged::display. | |
std::ostream & | displayKey_v (std::ostream &, size_t &) const override |
Forwards to structure::Averaged::displayKey. | |
cpputils::iarchive & | readStateMore_v (cpputils::iarchive &iar) override |
Forwards to QuantumTrajectory::readStateMore_v (that involves setting t0 ) + serializes mcwf::Logger state. | |
cpputils::oarchive & | writeStateMore_v (cpputils::oarchive &oar) const override |
Forwards to Base::writeStateMore_v + serializes mcwf::Logger state. | |
std::ostream & | logOnEnd_v (std::ostream &os) const override |
calls mcwf::Logger::onEnd | |
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::iarchive & | readStateMore_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::oarchive & | writeStateMore_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 | |
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 Attributes inherited from trajectory::AdaptiveIO< quantumdata::Types< RANK >::StateVectorLow > | |
SerializationMetadata | meta_ |
Related Functions inherited from trajectory::Trajectory | |
void | run (Trajectory &trajectory, double time, double deltaT, unsigned sdf, const std::string &ofn, const std::string &initialFileName, int precision, bool displayInfo, bool firstStateDisplay, double autoStopEpsilon, unsigned autoStopRepetition, const std::string &parsedCommandLine) |
Running in deltaT mode (displays in equal time intervals) for a certain time. More... | |
void | run (Trajectory &, long nDt, double deltaT, unsigned sdf, const std::string &ofn, const std::string &initialFileName, int precision, bool displayInfo, bool firstStateDisplay, double autoStopEpsilon, unsigned autoStopRepetition, const std::string &parsedCommandLine) |
Same as above but runs for a certain number of time intervals deltaT. More... | |
void | run (Trajectory &, const ParsRun &p) |
Dispatcher. More... | |
Implements a single Monte Carlo wave-function trajectory.
In the framework, a single Monte Carlo wave-function step at time (at which point, if the system inherits from structure::Exact, the Schrödinger- and interaction pictures coincide) is implemented as a sequence of the following stages:
RANK | arity of the Hilbert space |
Definition at line 60 of file MCWF_Trajectory.h.
quantumtrajectory::MCWF_Trajectory< RANK >::MCWF_Trajectory | ( | StateVector & | psi, |
const SYS & | sys, | ||
const mcwf::Pars & | p, | ||
const StateVectorLow & | scaleAbs = StateVectorLow() |
||
) |
Templated constructor with the same idea as Master::Master.
SYS | the physical system – can be any type convertible to structure::QuantumSystem::Ptr via cpputils::sharedPointerize |
psi | the state vector to be evolved |
sys | object representing the quantum system |
p | parameters of the evolution |
scaleAbs | has the same role as scaleAbs in Master::Master |
void quantumtrajectory::MCWF_Trajectory< RANK >::derivs | ( | double | , |
const StateVectorLow & | , | ||
StateVectorLow & | |||
) | const |
The actual function calculating the time derivative for ODE evolution.
Implemented via structure::Hamiltonian::addContribution