C++QEDCore  v2 Milestone 10
a framework for simulating open quantum dynamics – core
structure::Hamiltonian< RANK > Class Template Referenceabstract

The interface every system having (possibly non-Hermitian) Hamiltonian time-evolution must present towards the trajectory drivers. More...

#include <Hamiltonian.h>

+ Inheritance diagram for structure::Hamiltonian< RANK >:
+ Collaboration diagram for structure::Hamiltonian< RANK >:

Public Types

typedef boost::shared_ptr< const HamiltonianPtr
 
typedef quantumdata::Types< RANK >::StateVectorLow StateVectorLow
 

Public Member Functions

void addContribution (double t, const StateVectorLow &psi, StateVectorLow &dpsidt, double t0) const
 Adds the Hamiltonian contribution $\frac{H(t)}i\ket\Psi$ of the given (sub)system to dpsidt More...
 

Detailed Description

template<int RANK>
class structure::Hamiltonian< RANK >

The interface every system having (possibly non-Hermitian) Hamiltonian time-evolution must present towards the trajectory drivers.

Template Parameters
RANKarity of the Hilbert space
Todo:
Hamiltonian should be able not only to add its contribution to a state vector, but simply return its contribution. In Hamiltonian::addContribution, somehow signal to the function whether it has to add or replace, because replacement could be also useful in some contexts.

Definition at line 27 of file Hamiltonian.h.

Member Function Documentation

template<int RANK>
void structure::Hamiltonian< RANK >::addContribution ( double  t,
const StateVectorLow &  psi,
StateVectorLow &  dpsidt,
double  t0 
) const
inline

Adds the Hamiltonian contribution $\frac{H(t)}i\ket\Psi$ of the given (sub)system to dpsidt

The assumption is that the time when the Schrödinger picture and interaction picture (if any) coincide is t0. There are two important points to note:

  1. The contribution has to be added to dpsidt instead of dpsidt being replaced. This is because when the given system is embedded in a larger system, other (sub)systems may also contribute.
  2. The function has to calculate the effect of $\frac{H(t)}i$ and not merely $H$, since it is the former which determines the derivative of the state vector.

This latter is so often missed, that we emphasize it again (although we know that it will still be missed from time to time):

Warning
When implementing the Hamiltonian, not $H$ itself but $\frac Hi$ has to supplied!
Todo:
3rd argument should be passed by rvalue reference — move constructor for blitz::Array needed for this?
Parameters
[in]tthe time instant $t$ for TWO_TIME dependence
[in]psithe state vector $\ket\Psi$
[in,out]dpsidtthe state vector to be contributed to by $\frac{H(t)}i\ket\Psi$
[in]t0the time instant $t_0$ for TWO_TIME dependence

Definition at line 47 of file Hamiltonian.h.


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