Quantum Computing Asked by Zyad Yasser on February 5, 2021
I was trying to build the Toffoli gate using the following diagram (found in the qiskit textbook):
So, I set V := Rx(pi/2)
(as shown in the following diagram) (Note: that I am switching now to the little-endian format)
However, the unitary matrix equivalent to the previous was
$$
begin{pmatrix}
1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\
0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\
0 & 0 & 1 & 0 & 0 & 0 & 0 & 0\
0 & 0 & 0 & 1 & 0 & 0 & 0 & 0\
0 & 0 & 0 & 0 & 1 & 0 & 0 & 0\
0 & 0 & 0 & 0 & 0 & 1 & 0 & 0\
0 & 0 & 0 & 0 & 0 & 0 & 0 & -i\
0 & 0 & 0 & 0 & 0 & 0 & -i & 0\
end{pmatrix}
$$
That will lead to a relative phase of $(-i)$ in the states $lvert 110 rangle$ and $lvert 111 rangle$
What is the reason for that?
$R_x(pi/2)$ isn't a square root of the X gate. If you square it, you get $-iX$ instead of $X$. That's where the phase is coming from.
Answered by Craig Gidney on February 5, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP