NESSi  v1.0.2
The NonEquilibrium Systems Simulation Library

◆ density_matrix()

template<typename T >
template<class Matrix >
void cntr::herm_matrix< T >::density_matrix ( int  tstp,
Matrix &  M 
) const

Returns the density matrix at given time step.

Purpose

Returns the matrix-valued density matrix at given time step tstp. Setting tstp = -1 returns the equilibrium density matrix \( \rho = -C^\mathrm{M}(\beta) \), while tstp >= 0 returns \( \rho(t) = i \eta C^<(t,t) \). Works for square-matrices only.

Parameters
tstp

The time step at which the density matrix is returned.

M

The density matrix at time step tstp.

Definition at line 1018 of file cntr_herm_matrix_impl.hpp.

References cntr::get_les(), and cntr::get_mat().

1018  {
1019  assert(M.rows() == size1_ && M.cols() == size2_);
1020  assert(tstp >= -1 && tstp <= nt_);
1021  if (tstp == -1) {
1022  get_mat(ntau_, M);
1023  M *= (-1.0);
1024  } else {
1025  get_les(tstp, tstp, M);
1026  M *= std::complex<T>(0.0, 1.0 * sig_);
1027  }
1028 }
+ Here is the call graph for this function: