Consider the $X$ gate. Mathematically, we have $X=i e^{-i\frac{\pi}{2} X}$
But as global phase of unitaries don't matter because they will simply act a global phase to the wavefunction, we can consider implementing $X$ by $e^{-i\frac{\pi}{2} X}$, allright.
Now, consider a CNOT. Formally, we have:
$$CNOT=|0\rangle \langle 0| \otimes \mathbb{I} + |1\rangle \langle 1| \otimes X $$
If at this point I say "well, a $X$ gate or a $\pi$ rotation around $x$ is the same, up to global phase", I could say:
$$CNOT=|0\rangle \langle 0| \otimes \mathbb{I} + |1\rangle \langle 1| \otimes e^{-i\frac{\pi}{2} X} $$
But the two expressions of the CNOT do not differ from a global phase.
My question is the following.
Let's assume we want to implement an algorithm. Is it that we have at the beginning to define once for all how we implement an $X$ gate, and be consistant all along.
For example, if as soon as there is an $X$ in the algorithm and that I replace it by $e^{-i\frac{\pi}{2} X}$, then I will be fine.
But, if sometime I replace it by $ie^{-i\frac{\pi}{2} X}$ and sometime by $e^{-i\frac{\pi}{2} X}$ then I will have problems.
So here, indeed my two definitions of CNOT do not implement the same unitary, but if they were inside of an algorithm and that I had chosen a fixed convention for $X$, then I will be safe ?
Other question (more important for my purpose).
Let's assume I can only do single qubit rotations on which I might have a quantum control on it (I can do controlled rotation in the end).
How is it possible from this to implement a CNOT operation ? Indeed this example shows that a CNOT is not a controlled $\pi$-pulse around $x$. How could I add the $i$ that is missing in practice then ? Because from respect to the target qubit this $i$ is a global phase. This confuses me.