# What's the probability of measuring outcomes give measurement observable $M$ and state $\rho$ when $\mathrm{Tr}\!\:(\!\!\;M\rho)$ is a complex value?

I'm studying the measurement in quantum computation. It's known that the trace is related to the expectation value and the probability of getting certain outcomes. However, when the trace is a complex value, how is it related to the probability or the counting number of outcomes in real world?

$$\text{Tr}(AB)$$ is always real and non-negative if $$A,B$$ are positive semi-definite hermitian matrices.
To see this note that $$A = UDU^\dagger$$, for some unitary $$U$$ and diagonal matrix $$D$$ with $$d_{ii} \ge 0$$.
Then $$\text{Tr}(AB) = \text{Tr}(UDU^\dagger B) = \text{Tr}(DU^\dagger B U).$$
But $$B^\prime = U^\dagger B U$$ is also positive semi-definite and hermitian, therefore it has non-negative numbers on diagonal $$b^\prime_{ii} \ge 0$$. Now $$\text{Tr}(DB^\prime) = \sum_i d_{ii}b^\prime_{ii} \ge 0$$.