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\}?$

  • $\begingroup$ 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$ $\endgroup$
    – KAJ226
    Dec 2, 2020 at 5:10
  • 1
    $\begingroup$ Do you know what $\alpha$ is, or is it unknown? $\endgroup$
    – DaftWullie
    Dec 2, 2020 at 7:52
  • $\begingroup$ I do know it. Seems like I understand it now. $\endgroup$
    – Veerano
    Dec 2, 2020 at 21:05
  • $\begingroup$ Is that repeat of $\alpha$ intentional? $\endgroup$
    – AHusain
    Dec 11, 2020 at 10:20

1 Answer 1


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$).


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.