Given a stochastic matrix $Q$ that converts probability distributions $p$ to other probability distributions, $q = Qp$, how do I adapt this to work for diagonal matrices?
To be more specific, I have probability vectors $p$ of size $N\times 1$ and the stochastic matrix of $Q$ of size $M\times N$ acts on it to produce an output probability vector $q$ of size $M\times 1$. Now, I am given instead the input probability vector as an $N\times N$ diagonal matrix and I would like my output to be the $M\times M$ diagonal matrix corresponding to $q$.
I do not want to convert the $N\times N$ diagonal matrix into a vector and simply apply the original stochastic matrix and then transform the output $M\times 1$ vector into a $M\times M$ diagonal matrix.
Is there a direct way to transform $Q$ to achieve this?
EDIT: As pointed out by Eric, it is impossible if I insist that the transformed $Q$ acts in the same way as $Q$. But assuming I will be doing $\hat{Q}\hat{p}\hat{Q}^T$, (where $\hat{p} = diag(p)$) what is the correct way of getting $\hat{Q}$ from $Q$?