$\
ewcommand{\ket}[1]{\left|#1\right>}\
ewcommand{\bra}[1]{\left<#1\right|}$
Looks like a typo while copying from $X$ and $Y$ pauli matrices.
It should be $$\ket{0}\bra{0} - \ket{1}\bra{1}$$
$\
ewcommand{\ket}[1]{\left|#1\right>}\
ewcommand{\bra}[1]{\left<#1\right|}$
Looks like a typo while copying from $X$ and $Y$ pauli matrices.
It should be $$\ket{0}\bra{0} - \ket{1}\bra{1}$$