# Is $\rho = \sum_{j} p_j|n_j\rangle\langle n_j|$ a valid construction for any mixed state?

I have a mixed state $$\rho$$ and its hamiltonian $$H$$. Firstly, I find the eigenvalues $$\{p_j\}$$ of $$\rho$$, and orthonormal basis of $$H$$. I write $$\rho$$ in terms of $$H$$'s eigenstates and $$\rho$$'s eigenvalues as:

$$\rho = \sum_{j} p_j|n_j\rangle\langle n_j| \hspace{2em} (1)$$

My question is: is equation (1) a valid construction for any mixed states? Any help would be appreciated, thank you in advance.

• What do you mean by a mixed state and its Hamiltonian"? Generically, a Hamiltonian and the state it acts upon are initially not associated, and there's no reason to think that $\rho$ should be diagonal in the basis of $H$. Commented Apr 24 at 6:38
• Yes, indeed, but that's an important aspect of your question. Commented Apr 24 at 8:13

The question is, how do you perform the diagonalisation routine? A typical way to achieve this is to have a set of unitaries $$\{U_i\}$$ for which the $$|n_j\rangle$$ are eigenstates with $$\pm 1$$ eigenvalues. If, for example, there's a pair $$j,k$$ of them with opposite eigenvalues for $$U_i$$, then choosing to apply $$U_i$$ 50:50 at random cancels the off-diagonal term $$|n_j\rangle\!\langle n_k|$$. Setting aside any question of finding a modestly sized set of $$\{U_i\}$$ and implementing them, whatever your protocol, you're going to need some randomness in there. A typical way of thinking about this is to have an extra qubit. Whether you prepare it in a $$|+\rangle$$ state or a maximally mixed state doesn't matter, but you then do a controlled-$$U_i$$ off that qubit.
• I have a question like this: can the operation of converting from pure state to density matrix $|\psi\rangle -> |\psi\rangle \langle \psi|$ be understood as a quantum operation? Currently, I have to measure the state $|\psi\rangle = \sum_{j} \sqrt{p_j}|n_j\rangle$ to attain a probability vector so that I can calculate equation 1. My opinion is that when I do a measurement, it will stop being quantum (the final state can't exist on quantum computers). Is that right? Whereas in double systems, you have partial trace operations which are basically quantum observables. Commented Apr 24 at 13:03
• There is no operation that converts $|\psi\rangle\rightarrow|\psi\rangle\langle\psi|$. They are the same thing just written using different formalisms. Commented Apr 25 at 6:16