Gate Y returns wrong phase in IBM's circuit composer

2

One can check that, with IBM's circuit composer, $Y$ gate acted on $|0\rangle$ or on $|1\rangle$ returns the same phase of $\pi/2$. Is this a bug?

enter image description here

enter image description here

Emil Prodan

Posted 2020-04-02T14:07:30.340

Reputation: 78

I meant IBM's circuit composer – Emil Prodan – 2020-04-02T14:38:48.207

Answers

1

enter image description here

This is the color scheme for the phase factors supplied by IBM Q. It seems that it is not just the Y gate but any phase larger than pi is incorrectly color coded.

Emil Prodan

Posted 2020-04-02T14:07:30.340

Reputation: 78

0

Gate $Y$ is described by matrix

$$ Y= \begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix}. $$

When it acts on qubit in state $|0\rangle$, it returns state $\begin{pmatrix}0 \\i \end{pmatrix}$, i.e. a phase is $\pi/2$. When you do so on IBM Q a state

[ 0+0j, 0+1j ]

is returned as you can see in Visualization => State vector menu in IBM Q composer.

For qubit in state $|1\rangle$, the gate returns state $\begin{pmatrix}-i \\0 \end{pmatrix}$, i.e. the phase is $-\pi/2$. In IBM Q visualization you can see

[ 0-1j, 0+0j ]

This means that $Y$ gate is implemented correctly on IBM Q.

Note, do not be confused by color in bar graph, see state vector description below the graph.

Martin Vesely

Posted 2020-04-02T14:07:30.340

Reputation: 7 763

The phase -pi/2 is 3pi/2 and the color bar should be green, according to the color gauge supplied by IBM Q – Emil Prodan – 2020-04-02T21:42:00.720

@EmilProdan: Maybe, there is a bug in graph visualization, however, when you look at state vector below graph, Y gate work as expected. – Martin Vesely – 2020-04-02T21:43:50.733

1well, that is not very convenient when you present in front of a classroom – Emil Prodan – 2020-04-02T21:45:15.973

I see, try IBM Q help, there is a section Bugs and Requirements. – Martin Vesely – 2020-04-02T21:51:03.603

1Thanks, that could be the right place. It seems that the visualization neglects entirely the minus sign on the imaginary part but not on the real part. For example, 5 T's should produce a phase 5pi/4, but again the color is wrong. 4 T's are fine. – Emil Prodan – 2020-04-02T22:05:40.057