C++QEDCore  v2 Milestone 10
a framework for simulating open quantum dynamics – core
quantumtrajectory::EnsembleMCWF< RANK, V > Class Template Reference

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>

+ Inheritance diagram for quantumtrajectory::EnsembleMCWF< RANK, V >:
+ Collaboration diagram for quantumtrajectory::EnsembleMCWF< RANK, V >:

Public Types

typedef Base::StateVectorLow StateVectorLow
 
typedef Base::Ensemble Ensemble
 
typedef Base::StateVector StateVector
 
typedef DO_Display::DensityOperator DensityOperator
 
- Public Types inherited from quantumtrajectory::ensemble::Base< RANK >
typedef Single::StateVector StateVector
 
typedef Single::StateVectorLow StateVectorLow
 
typedef structure::QuantumSystem< RANK >::Ptr QuantumSystemPtr
 
- Public Types inherited from trajectory::Ensemble< quantumdata::DensityOperator< RANK > &, const quantumdata::StateVector< RANK > & >
typedef Averageable< const quantumdata::StateVector< RANK > & > Elem
 
typedef boost::ptr_vector< ElemImpl
 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...
 
- Public Member Functions inherited from trajectory::Ensemble< quantumdata::DensityOperator< RANK > &, const quantumdata::StateVector< RANK > & >
const ToBeAveragedType averageInRange (size_t begin, size_t n) const
 Averages only in a range begin..begin+n-1 More...
 
- Public Member Functions inherited from trajectory::Averageable< quantumdata::DensityOperator< RANK > & >
const quantumdata::DensityOperator< RANK > & toBeAveraged () const
 returns the set of quantities condensed in a variable of type T that are “to be averaged”
 
- 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
 

Additional Inherited Members

- Protected Types inherited from quantumtrajectory::ensemble::Base< RANK >
typedef trajectory::Ensemble< quantumdata::DensityOperator< RANK > &, const quantumdata::StateVector< RANK > & > Ensemble
 
- Protected Types inherited from trajectory::Ensemble< quantumdata::DensityOperator< RANK > &, const quantumdata::StateVector< RANK > & >
typedef std::auto_ptr< ImplPtr
 
- Protected Member Functions inherited from quantumtrajectory::ensemble::Base< RANK >
 Base (const StateVector &psi, QuantumSystemPtr sys, const Pars &p, const StateVectorLow &=StateVectorLow())
 Straightforward constructor. More...
 
const QuantumSystemPtr getQS () const
 
- Protected Member Functions inherited from trajectory::Ensemble< quantumdata::DensityOperator< RANK > &, const quantumdata::StateVector< RANK > & >
 Ensemble (Ptr trajs, bool displayProgress)
 Generic constructor. More...
 
const ImplgetTrajectories () const
 Getter.
 
virtual cpputils::iarchivereadState_v (cpputils::iarchive &ios) final
 
virtual cpputils::oarchivewriteState_v (cpputils::oarchive &ios) const final
 

Detailed Description

template<int RANK, typename V>
class quantumtrajectory::EnsembleMCWF< RANK, V >

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

\[\rho_{\text{ensemble}}(t)=\frac1{\text{\scriptsize number of trajectories}}\sum_{i\in\{\text{set of trajectories}\}}\ket{\Psi_i(t)}\bra{\Psi_i(t)}.\]

Note
This is done via the quantumdata::StateVector::addTo function, so that always at most one single full density operator needs to be stored in memory. This makes that this class can be used for systems of larger dimensionality than Master, whose underlying ODE driver needs to store several (typically 6–7) density-operator instants.

The set of state vectors and the element MCWF trajectories are owned by the class.

Note
The class obviously does not inherit from trajectory::Adaptive (a single adaptive timestep would in general result in different stepsizes for the element trajectories), so that it can be used only in deltaT-mode.
Template Parameters
RANKarity of the Hilbert space
Vhas 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
Todo:
An additional constructor could be added to initialize the ensemble by a full density operator, which could be appropriately sampled.

Definition at line 109 of file EnsembleMCWF.h.

Constructor & Destructor Documentation

template<int RANK, typename V >
template<typename SYS >
quantumtrajectory::EnsembleMCWF< RANK, V >::EnsembleMCWF ( const StateVector psi,
const SYS &  sys,
const mcwf::Pars p,
bool  negativity,
const StateVectorLow &  scaleAbs = StateVectorLow() 
)
inline

Templated constructor with the same idea as Master::Master.

Template Parameters
SYSthe physical system – can be any type convertible to structure::QuantumSystem::Ptr via cpputils::sharedPointerize
Parameters
psithe (pure-state) initial condition used to initialize all the element MCWF trajectories
sysobject representing the quantum system to be simulated
pparameters of the simulation (contains the number of trajectories)
negativitygoverns whether entanglement should be calculated, cf. display_densityoperator::_, quantumdata::negPT
scaleAbshas the same role as scaleAbs in evolved::Maker::operator()

Definition at line 127 of file EnsembleMCWF.h.


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