While working on circuit construction for Hamiltonian simulation using this answer as reference, I'm unable to see how the following equation is true:
$$ e^{i \sigma_z \otimes \sigma_z t} = \text{CNOT}(I \otimes e^{i \sigma_zt})\text{CNOT} $$
I tried doing the following to the right side:
$$ \begin{align} \text{CNOT}(I \otimes e^{i \sigma_zt})\text{CNOT} &= \text{CNOT}\big[ \cos(t) I\otimes I + i \sin(t) I \otimes \sigma_z \big]\big[|0\rangle \langle 0 | \otimes I + |1\rangle \langle 1 | \otimes \sigma_x \big] \\ &=\text{CNOT}\big[ \cos(t)|0\rangle\langle0|\otimes I+\cos(t)|1\rangle\langle1| \otimes \sigma_x + i\sin(t)|0\rangle\langle0|\otimes\sigma_z+ i\sin(t)|1\rangle\langle1|\otimes\sigma_z\sigma_x \big] \\ &= \cos(t)|0\rangle\langle0|\otimes I + \cos(t)|1\rangle\langle1|\otimes I + i\sin(t)|0\rangle\langle0|\otimes\sigma_z+i\sin(t)|1\rangle\langle1|\otimes\sigma_x\sigma_z\sigma_x \\ &= \cos(t) I+i \sin(t)\big[|0\rangle\langle0|\otimes\sigma_z-|1\rangle\langle1|\otimes\sigma_z\big] \qquad (\text{since }\sigma_x\sigma_z\sigma_x=-\sigma_z) \end{align} $$
And we already know that the left hand side is:
$$ e^{i \sigma_z \otimes \sigma_z t}=\cos(t) I + i \sin(t) \sigma_z \otimes \sigma_z $$
So the only thing I'm missing is showing that $|0\rangle\langle0|\otimes\sigma_z-|1\rangle\langle1|\otimes\sigma_z = \sigma_z\otimes\sigma_z$. Using NumPy I was able to see that effectively both are equal to $\text{diag}\{1, -1, -1, 1\}$.
However, I was wondering if anyone knows a nicer way of showing these two are equal without actually calculating their matrix?