I've been working through the great introduction to quantum computing on Quantum Country. One exercise there is to find a possible quantum gate matrix that is not the $X,I$ or $H$ matrix.

I thought of $B = \frac{1}{\sqrt2}\begin{bmatrix}i & 1\\1 & i\end{bmatrix}$. However, I cannot find any article / paper mentioning this quantum gate.

From what I understood, all quantum gates must be $2\times2$, unitary matrices. I have even checked whether $B$ is indeed unitary, and yes, it is.

Why does this gate $B$ not have any useful applications? Or is it just not a valid gate?

  • 1
    $\begingroup$ It's a fine question that deserves an answer longer than a comment, but not all quantum gates need to be $2\times 2$ - similarly, not all classical gates need to be two-input (think of an AOI - and/or/invert - gate). The Toffoli gate is $3\times 3$. They do have to be reversible, as in unitary, however. $\endgroup$ Commented May 20, 2019 at 1:38
  • 2
    $\begingroup$ @MarkS As a point of note with respect to the Toffoli gate, that's a three-qubit operation, such that its unitary representation is a $2^3 \times 2^3$ operator. $\endgroup$ Commented May 20, 2019 at 3:51
  • 1
    $\begingroup$ I must say that it's a weird exercise. There are infinitely many possible single qubit quantum gates that are not $X$, $I$, or $H$. We don't even need to delve into two-qubit or three-qubit operations. $\endgroup$ Commented May 20, 2019 at 7:59
  • $\begingroup$ @ChrisGranade thanks! Sorry for the blunder. $\endgroup$ Commented May 20, 2019 at 12:25

1 Answer 1


That's not the right way to look at it. In quantum mechanics, time evolutions are considered to be unitary and any unitary evolution can be written as a sequence of unitary operators $U_1, U_2, U_3,\ldots$ acting on a quantum state $|\Psi\rangle$. Any single-qubit unitary operation is a $2\times 2$ matrix of the form:

$$U=\begin{pmatrix}a&b\\-e^{i\phi}b^*&e^{i\phi} a^*\end{pmatrix}, |a|^2+|b|^2=1.$$

In your case, $a=\frac{i}{\sqrt{2}}$, $b=\frac{1}{\sqrt{2}}$ and $\phi=\pi$. Now, $B$ isn't one of the "popular" quantum gates like the Pauli or the Hadamard, but that doesn't mean it can't be a valid evolution operator! The Hadamard and the Pauli are generally chosen because they have some neat properties; for instance, the Pauli matrices form a basis for all $2\times 2$ Hermitian matrices. For more, read the Wikipedia pages on Hadamard matrix and Pauli matrices. Moreover, note that some gates can be easier to engineer than others; I had written an answer about this before. Also see: Why do we use the standard gate set that we do?.

So for drawing quantum circuits we generally try to choose a universal gate set that's also relatively easy to physically implement. Now any unitary evolution can be replicated with an $\epsilon>0$ precision, with a sufficient number of elementary quantum gates which form a universal set. Niel de Beaudrap also wrote a nice answer on this topic. Perhaps, as an exercise, you can try to write the $B$ gate in terms of the elementary quantum gates listed here?

If you notice carefully, $\sqrt{\operatorname{NOT}}=\frac{1-i}{\sqrt{2}}B$. That is, $B$ differs from the $\sqrt{\operatorname{NOT}}$ (or $\sqrt{X}$) by a simple phase factor! Thus, $\sqrt{\operatorname{NOT}}$ and $B$ are essentially the same gate cf. Norbert Schuch's answer. For a physical implementation of $\sqrt{\operatorname{NOT}}$ check Jones, Hansen & Mosca (1998).

I suggest playing around with it a bit on Quirk. The Bloch sphere intuition should help:


You see, both $\sqrt{X}$ and $B$ rotate a qubit state around $\hat{x}$ by $90^{\mathrm{o}}$, albeit with different phase factors.

  • 1
    $\begingroup$ Another way to notice that $B = e^{i\phi} \sqrt X$ is by noticing that $B^2=iX$. Same thing, just a different way of writing it that I found easier to spot $\endgroup$
    – Mithrandir24601
    Commented May 20, 2019 at 12:38
  • 1
    $\begingroup$ @Mithrandir24601 you made a typo $B^2=iX$ not $iX^2$. $\endgroup$
    – AHusain
    Commented May 20, 2019 at 19:39
  • $\begingroup$ Whoops... I've fixed that now... $\endgroup$
    – Mithrandir24601
    Commented May 20, 2019 at 21:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.