2
$\begingroup$

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

$\endgroup$
  • $\begingroup$ I meant IBM's circuit composer $\endgroup$ – Emil Prodan Apr 2 at 14:38
1
$\begingroup$

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.

| improve this answer | |
$\endgroup$
0
$\begingroup$

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.

| improve this answer | |
$\endgroup$
  • $\begingroup$ The phase -pi/2 is 3pi/2 and the color bar should be green, according to the color gauge supplied by IBM Q $\endgroup$ – Emil Prodan Apr 2 at 21:42
  • $\begingroup$ @EmilProdan: Maybe, there is a bug in graph visualization, however, when you look at state vector below graph, Y gate work as expected. $\endgroup$ – Martin Vesely Apr 2 at 21:43
  • 1
    $\begingroup$ well, that is not very convenient when you present in front of a classroom $\endgroup$ – Emil Prodan Apr 2 at 21:45
  • $\begingroup$ I see, try IBM Q help, there is a section Bugs and Requirements. $\endgroup$ – Martin Vesely Apr 2 at 21:51
  • 1
    $\begingroup$ Thanks, 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. $\endgroup$ – Emil Prodan Apr 2 at 22:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.