Derived from trajectory::Ensemble <
quantumdata::DensityOperator <RANK>& , const
quantumdata::StateVector <RANK>& >
, it implements an ensemble of MCWF trajectories started from a pure-state initial condition.
More...
#include <EnsembleMCWF.h>
Public Types | |
typedef Base::StateVectorLow | StateVectorLow |
typedef Base::Ensemble | Ensemble |
typedef Base::StateVector | StateVector |
typedef DO_Display::DensityOperator | DensityOperator |
![]() | |
typedef Single::StateVector | StateVector |
typedef Single::StateVectorLow | StateVectorLow |
typedef structure::QuantumSystem< RANK >::Ptr | QuantumSystemPtr |
![]() | |
typedef Averageable< const quantumdata::StateVector< RANK > & > | Elem |
typedef boost::ptr_vector< Elem > | Impl |
The storage of the element trajectories is through a pointer-vector More... | |
typedef quantumdata::DensityOperator< RANK > & | ToBeAveragedType |
Public Member Functions | |
template<typename SYS > | |
EnsembleMCWF (const StateVector &psi, const SYS &sys, const mcwf::Pars &p, bool negativity, const StateVectorLow &scaleAbs=StateVectorLow()) | |
Templated constructor with the same idea as Master::Master. More... | |
![]() | |
const ToBeAveragedType | averageInRange (size_t begin, size_t n) const |
Averages only in a range begin..begin+n-1 More... | |
![]() | |
const quantumdata::DensityOperator< RANK > & | toBeAveraged () const |
returns the set of quantities condensed in a variable of type T that are “to be averaged” | |
![]() | |
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 | |
Additional Inherited Members | |
![]() | |
typedef trajectory::Ensemble< quantumdata::DensityOperator< RANK > &, const quantumdata::StateVector< RANK > & > | Ensemble |
![]() | |
typedef std::auto_ptr< Impl > | Ptr |
![]() | |
Base (const StateVector &psi, QuantumSystemPtr sys, const Pars &p, const StateVectorLow &=StateVectorLow()) | |
Straightforward constructor. More... | |
const QuantumSystemPtr | getQS () const |
![]() | |
Ensemble (Ptr trajs, bool displayProgress) | |
Generic constructor. More... | |
const Impl & | getTrajectories () const |
Getter. | |
virtual cpputils::iarchive & | readState_v (cpputils::iarchive &ios) final |
virtual cpputils::oarchive & | writeState_v (cpputils::oarchive &ios) const final |
![]() | |
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... | |
Derived from trajectory::Ensemble <
quantumdata::DensityOperator <RANK>& , const
quantumdata::StateVector <RANK>& >
, it implements an ensemble of MCWF trajectories started from a pure-state initial condition.
The class overrides trajectory::Trajectory::display in such a way that at the time instant of display, the ensemble-averaged density operator of the system gets assembled from the stochastic state vectors of the element MCWF trajectories as
The set of state vectors and the element MCWF trajectories are owned by the class.
RANK | arity of the Hilbert space |
V | has the same function as the template parameter V in display_densityoperator::_, which class is used here for deriving quantum averages to display from the assembled density operator |
Definition at line 109 of file EnsembleMCWF.h.
|
inline |
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 (pure-state) initial condition used to initialize all the element MCWF trajectories |
sys | object representing the quantum system to be simulated |
p | parameters of the simulation (contains the number of trajectories) |
negativity | governs whether entanglement should be calculated, cf. display_densityoperator::_, quantumdata::negPT |
scaleAbs | has the same role as scaleAbs in evolved::Maker::operator() |
Definition at line 127 of file EnsembleMCWF.h.