# How to express Hadamard gate as a generic trigonometric functions of theta? [duplicate]

Hadamard gate is expressed as $$H=R_x(\pi)*R_y(2\theta)$$ where $$\theta$$ is $$\pi/4$$. $$H=\begin{bmatrix} 0 & 1\\ 1 & 0 \end{bmatrix} \begin{bmatrix} \cos \theta & -\sin \theta\\ \sin \theta & \cos \theta \end{bmatrix}=\begin{bmatrix} \sin \theta & \cos \theta\\ \cos \theta & -\sin \theta \end{bmatrix}=\frac{1}{\sqrt{2}}\begin{bmatrix} 1 & 1\\ 1 & -1 \end{bmatrix}$$

But in some literature, I found Hadamard Gate is expressed as $$H=\begin{bmatrix} \cos \theta & -\sin \theta\\ \sin \theta & \cos \theta \end{bmatrix}$$. Here this generic expression of Hadamard Gate is used to deal with weak measurement reversal.

Can anyone explain this form of Hadamard Gate used? Numerous other works have been done by different authors with this Hadamard Gate expression. It seems they got confused with rotation matrix to be same as a generic Hadamard Gate.

• No sir, it was a good learning though. Commented Jun 11, 2023 at 14:38

In the first case, the gate operates by the mapping $$H|1\rangle = \cos\theta|0\rangle - \sin\theta|1\rangle$$. The second by $$H|1\rangle = -\sin\theta|0\rangle + \cos\theta|1\rangle$$.
If you visualize both $$H$$s as rotations in a vector space, it is the same kind of rotation, just in a different direction.
• Just to add: This is true unless this definition is used for controlled version of Hadamard gate. In such case, a phase is opossite to "classical definition of Hadamard" once the controlled gate acts on qubit in state $|1\rangle$, Commented Jun 11, 2023 at 18:19