I was just trying to understand the meaning of rank of a density matrix. I came across the following post, which says that the rank of density matrix is the number of non-zero eigenvalues. And for a pure state is always one. However, I fail to understand that for a two-level system, the general state is given by
$$\rho = \begin{pmatrix} 1-p & x\\ x^* & p \end{pmatrix}. $$
Which represents a pure state and has two eigenvalues ( not one ). So does it mean that this matrix has rank two?
Edit: The state $|\psi> = \alpha |0> + \beta |1>$ is a pure state, with the density matrix
$$\rho_{\psi} = \begin{pmatrix} |\alpha|^2 & \alpha \beta^*\\ \alpha^* \beta & |\beta|^2 \end{pmatrix}. $$
with $|\alpha|^2 + |\beta|^2 = 1$. This case is similar to $\rho$?