--

# Y vs RY(pi)

In “Mathematics is Overrated” I give a specific example of how bra-ket notation and linear algebra fail to develop a complete intuition for how the ubiquitous Hadamard gate is implemented. I stand by that. However, I just fielded a question about Y vs RY(pi), and the matrices of these gates are probably the quickest way to highlight the difference between them.

First, let me paraphrase the question.

## Different Statevectors

If you start at |0> and apply a Y gate, the resultant statevector is:

`[ 0+0j, 0+1j ]`

And if you start at |0> and apply RY(pi), the resultant statevector is:

`[ 0+0j, 1+0j ]`

We are obviously trying to rotate pi radians around the Y axis. The Y gate and the RY(pi) gate both do that. Intuition says, therefore, that the statevectors should be the same. And yet they’re not.

Could there by a bug in the Python framework? Absolutely. Unfortunately, multiple frameworks show this same result, and it’s highly unlikely they’re all broken. Therefore, there must be some difference in how these two gates are implemented.