Measurement on mixed states I have a conflict between my lecture notes on quantum mechanics, where it is stated that the probability of measuring an eigenvalue $a_i$ on a mixed state with desnsity matrix $\rho$ is
$$
\operatorname{Tr}(P_i \rho P_i)\ ,
$$
where $P_i$ is the projector for the subspace corresponding to $a_i$.
However, all resources out there states that the probability should be $\operatorname{Tr}(\rho P_i)$, and even the professor gave as a solved exam as an example where the later formula was applied instead of the first one.
Which calculation for the probability is correct? Is it possible that both traces are the same because of $P_i$ being a projection operator?
 A: As mentioned by the OP both versions are the same. For an observable $A$ of the form
$$A = \sum\limits_k a_k \, P_k \quad , $$
with the projections $P_k^2 =P_k = P_k^\dagger$ on the eigenspace corresponding to the eigenvalue $a_k$, the probability to measure $a_k$ in the state $\rho$ is given by
$$p_\rho(a_k)=\mathrm{Tr}\left(P_k\,\rho\, P_k\right) = \mathrm{Tr}\left(P_k\,\rho\right) \quad ,$$
where we've used the cyclic property of the trace. One advantage I can see in explicitly writing both projectors is the fact that after the measurement, the state is given by
$$\rho \longrightarrow \rho^\prime=\frac{P_k\,\rho\,P_k^\dagger}{\mathrm{Tr}\left(P_k\,\rho\, P_k^\dagger\right)} \quad ,$$
and it is thus immediately clear that $\rho^\prime$ is properly normalized.
Further, the form of these equations suggests that this notion of a measurement (projective measurement) is a special case of a more general notion of measurement, cf. this and this.
These things are discussed in detail in e.g. Nielsen and Chuang. Quantum Computation and Information. 10th Anniversary Edition, section 2.2. and 2.4. See also this PSE post.
A: The latter is correct.
By the cyclic property of the trace.
$$Tr(\rho P_i) = Tr(P_i \Sigma_i | \psi_i \rangle \langle \psi_i|) $$
$$=  Tr(\Sigma_i \langle \psi_i  | P_i | \psi_i \rangle) $$
This equals the expectation value of operator $\langle P_i \rangle$ (the probability of measurement).
The Wikipedia article has a good explanation also https://en.wikipedia.org/wiki/Density_matrix#%3A%7E%3Atext%3DIn_quantum_mechanics%2C_a_density%2Cstate_of_a_physical_system.%26text%3DDensity_matrices_are_thus_crucial%2Cquantum_decoherence%2C_and_quantum_information.?wprov=sfla1
