Physics Stack Exchange is a question and answer site for active researchers, academics and students of physics. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can anyone explain the process required to make a Hadamard gate that acts on 1st, 2nd and 3rd qbits?

For Hgates acting on the first qubit i realise the matrix is $H=\begin{pmatrix} 1&1\\1&-1\end{pmatrix}$, but I am unsure how to formulate such a gate. As to acting on the second qubit I have read this web page 1 but I am not really sure if it is correct, because it is just a 4x4 matrix without any zeroes. I found this $\begin{pmatrix} 1 & 1 \\-1 & 1 \end{pmatrix} $ on another website which will obviously have zeroes when it is multiplied by $I$. Simply can anyone explain how Hadarmd gates can be formulated and built to n qubits?

share|cite|improve this question
The web page talks about a Hadamard transform and not a Hadamard gate. To perform a Hadamard transform to an $n$-qubit state, you apply a Hadamard gate to each qubit individually. So the website is correct, but it doesn't directly apply to your question. – Peter Shor Mar 11 '13 at 10:14

For two qubits, the answer is as follows. I don't feel like writing out $8\times 8$ matrices, so I'm not doing the 3-qubit case.

The Hadamard gate acting on the second qubit is $I \otimes H$:

$$ \frac{1}{\sqrt{2}} \left( \begin{array}{rrrr} 1&1&0&0\\ 1&-1&0&0\\ 0&0&1&1\\ 0&0&1&-1 \end{array} \right). $$

The Hadamard gate acting on the first qubit is $H \otimes I$:

$$ \frac{1}{\sqrt{2}} \left( \begin{array}{rrrr} 1&0&1&0\\ 0&1&0&1\\ 1&0&-1&0\\ 0&1&0&-1 \end{array} \right). $$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.