# Simplification of a generic quantum state

We are given a generic 2-qubit density matrix

$$\rho=\frac{1}{4}\left[I_4+\Sigma_i a_i \sigma_i \otimes I_2 + \Sigma_i b_i I_2 \otimes \sigma_i + \Sigma_{i,j} c_{ij} \sigma_i \otimes \sigma_j\right]$$

And we want to check if $$\rho$$ can be unitarily (using a local or global unitary) converted to simpler form

$$\rho'=\frac{1}{4}\left[I_4+\lambda_1 \sigma_z \otimes I_2 + \lambda_2 I_2 \otimes \sigma_z + \lambda_3 \sigma_z \otimes \sigma_z\right].$$

How can we check whether such unitaries exist or not?

Such a unitary exists for every two-qubit density matrix. By the spectral theorem, for every density matrix $$\rho$$ there exists a unitary matrix such that $$U\rho U^\dagger$$ is a real diagonal matrix. Moreover, the matrices $$I_4$$, $$\sigma_z\otimes I_2$$, $$I_2\otimes\sigma_z$$ and $$\sigma_z\otimes\sigma_z$$ are a basis of the real vector space of diagonal $$4\times 4$$ matrices with real entries. Consequently, every real diagonal matrix can be written as a linear combination of $$I_4$$, $$\sigma_z\otimes I_2$$, $$I_2\otimes\sigma_z$$ and $$\sigma_z\otimes\sigma_z$$.
In fact, the basis is orthogonal with respect to Hilbert-Schmidt inner product, so $$\lambda_i$$ may be easily computed using the inner product.