# Definitions of $D_y$ gate in Hamiltonian simulation: are they the same?

I'm reading a Hamiltonian simulation example proposed in this paper. From their notation, the operator $$D_y$$ (sometimes it's called $$H_y$$) serves the function to diagonalize the Pauli matrix $$\sigma_y(Y)$$ (the corresponding circuit is illustrated below): $$D_y\ (or\ H_y)=HSX=\frac{1}{\sqrt{2}}\begin{bmatrix} i & 1\\ -i & 1 \end{bmatrix} \quad\quad\quad [A]$$

However, unlike $$D_x$$, which is the Hadamard gate, I found $$D_y$$ is sometimes written in different ways, like in this answer by @Craig Gidney:

$$D_y\ (or\ H_{YZ}) = \frac{Y+Z}{\sqrt{2}} = \frac{1}{\sqrt{2}}\begin{bmatrix} 1 & -i\\ i & -1 \end{bmatrix} \quad\quad\quad [B]$$

and in this answer by @Davit Khachatryan:

$$D_y\ (or \ 'Y'_{not\ pauli\ here}) = U_2(0,\pi/2) =\frac{1}{\sqrt{2}}\begin{bmatrix} 1 & -i\\ 1 & i \end{bmatrix} \quad\quad\quad [C]$$

Thus I'm wondering are those different versions of $$D_y$$ the same thing? Are they essentially all belong to $$U_2$$ gate?

Also, when should we use two $$U_3$$ gates outside of the CNOT gates to perform the time-evolution simulation (like in this case, the answer from @KAJ226)?

Thanks!!!

B is technically different, but serves the same purpose. Note that if $$UYU^\dagger=Z$$, then $$R_zUYU^\dagger R_z^\dagger=R_zZR_z^\dagger=ZR_zR_z^\dagger=Z$$ so if the only effect you're interested in is the diagonalisation of $$Y$$, there is a freedom of an arbitrary $$Z$$ rotation $$R_z=e^{i\theta Z/2}$$ in the definition of your unitary.
In the end, we have the relations $$D^C=-iD^A=S^\dagger D^B.$$
• Thanks for the answer! Are all of the definitions serve the same purpose to diagonalize $Y$? Could you explain a bit more about how the definition of B is different from that of A? Thanks:) – ZR- Nov 16 '20 at 14:47
• It's just a different matrix that achieves the same result of diagonalising $Y$. Which should you pick? whichever you can implement more easily. – DaftWullie Nov 16 '20 at 14:58