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?