Decomposition of Hermitian matrix Given a $4 \times 4$ hermitian matrix, how do I decompose the Hermitian matrix into a linear combination of unitaries?
 A: Hermitian matrices are unitarily diagonalizable. That is, if $X$ is a Hermitian $4\times4$ complex matrix, then a full set of nonzero eigenvectors can be rescaled extended to an orthonormal basis for $\mathbb{C}^4$, which in turn form the columns of a unitary matrix $U$, and then $X=UDU^{-1}$ where $D$ is the diagonal matrix of (real) eigenvalues (ordered to correspond to the columns of $X$).
Thus, it suffices to write $D$ as a linear column of unitary matrices. In fact, we can find a basis for the real diagonal matrices consisting of diagonal orthogonal matrices.
Note this matrix has nonzero determinant and thus its columns are linearly independent:
$$ V=
\begin{pmatrix}
1 & -1 & -1 & -1 \\
1 & -1 & 1 & 1 \\
1 & 1 & -1 & 1 \\
1 & 1 & 1 & -1
\end{pmatrix} $$
Thus, turning each column of $V$ into a diagonal matrix yields the desired basis $\{D_1,D_2,D_3,D_4\}$. If we convert $D$ itself into a vector, we can use $V$ as a change-of-basis matrix to find the components $a_i$ within the decomposition $D=a_1D_1+a_2D_2+a_3D_3+a_4D_4$ by solving $d=Va$ for $a$ (where $d$ is $D$ vectorized and $a$ is the vector of coefficients $a_i$).
