# How to change the sign of a phase: sending $\alpha|0\rangle+e^{i\alpha}\beta|1\rangle$ to $\alpha|0\rangle+e^{-i\alpha}\beta|1\rangle$?

Say I have a qubit in the state (ignoring normalization) $$|\phi\rangle = \alpha|0\rangle + e^{i\alpha}\beta|1\rangle.$$ How can I invert the sign of its phase, thus making it $$\alpha|0\rangle + e^{-i\alpha}\beta|1\rangle$$ using only the basic gates $$\{X,Y,Z,H,S\}?$$

• If you have the gate $T$ gate then $\{H, T\}$ can approximate an arbitrary single qubit unitary operation to an arbitrary accuracy. Note that you don't need $X,Y,Z$ since $Z= S^2$ and $X = HZH$ and $Y = HSZHS^\dagger$ Dec 2, 2020 at 5:10
• Do you know what $\alpha$ is, or is it unknown? Dec 2, 2020 at 7:52
• I do know it. Seems like I understand it now. Dec 2, 2020 at 21:05
• Is that repeat of $\alpha$ intentional? Dec 11, 2020 at 10:20

This very much depends on whether you know the phase $$\alpha$$ (which I assume is not intended to be the same as the amplitude $$\alpha$$!).
If you do not know the phase $$\alpha$$, then the operation that you're asking about is the transpose. This is well known to be physically impossible (it's typically the first example given if you read about completely positive maps).
If you know $$\alpha$$, then the gate you need to implement is $$\left(\begin{array}{cc} 1 & 0 \\ 0 & e^{-2i\alpha} \end{array}\right).$$ If you have a universal set of gates available, this is no problem. If you only have the Clifford gates available, as you seem to be suggesting, you can only make this work if $$\alpha=\pm\pi/4,\pm\pi/2$$, corresponding to the operations $$S$$ and $$Z$$ respectively I've left out some $$\pi$$ factors as you can consider them as signs incorporated into the $$\beta$$).