# Continous and Discrete basis, Multiplication of Density Matrix and Hamiltonian.

Suppose I have a wave function $\psi(x)$ in position basis. I can make a density function by simply multiplying $\psi(x)$ and its conjugate $\psi^*(x)$. If I operate the density matrix $\rho(x,y)=\psi(x)\psi^*(y)$ with Hamiltonian $\hat{H}$ I will get, \begin{equation} \hat{H}\rho(x,y)=\hat{H}\psi(x)\psi^*(y)=\psi^*(y)\hat{H}\psi(x)+\psi(x)\hat{H}\psi^*(y) \end{equation} since the hamiltonian is a diferential operator. At the same time, If I take discrete basis representation, I will get $\langle n|\psi\rangle=V_{1}$ and $\langle\psi| n\rangle=V_{1}^{\dagger}$ which are the column vector and row vector respectively. Now if I operate the Hamitonian matrix $\hat{H}$ on the density matrix I will get, \begin{equation} \hat{H}\rho=H (V_{1} V_{1}^{\dagger})=(H V_{1}) V_{1}^{\dagger} \end{equation} That means, I need to apply the hamiltonian operator only once on a vector. Why it is not distributed like the differential operator.

\begin{equation} \hat{H}\rho= V_{1} H V_{1}^{\dagger}+(H V_{1}) V_{1}^{\dagger} \end{equation} Why this equation is not valid in the case of discrete basis ?

Your equation is not valid, since in finite dimensions, a Hamiltonian $H$ acts on a density matrix $\rho$ via the commutator: $$[H,\rho]=H\rho-\rho H$$ Using $\rho=|V\rangle\langle V|$ and superoperator formalism i.e. $\rm{vec}(\rho)=|V\rangle ^* \otimes |V\rangle$ you could argue that: $$\hat H \rm{vec}(\rho)=(1\otimes H-H^T\otimes 1)|V\rangle ^* \otimes |V\rangle= |V\rangle ^* \otimes H|V\rangle-H^T|V\rangle ^* \otimes |V\rangle,$$ which looks a little closer to your last equation...