I understand how to write the Hadamard operator on one qubit in braket notation using $$\newcommand\bra[1]{\left\langle#1\right|}\newcommand\ket[1]{\left|#1\right\rangle} H=\sum_{i,j} \bra{w_{j}}H\ket{v_{i}} \ket{w_{j}} \bra{v_{i}}$$ where $$H_{ij}= \sum_{i,j} \bra{w_{j}}H\ket{v_{i}} $$

From my understanding, $\ket{w_{i}}=\ket{v_{i}}=\ket{0}$ and $\ket{w_{j}}=\ket{v_{j}}=\ket{1}$

But I don't understand how to translate the matrix into braket notation when we range over $i$ and $j$ in ${0,1,2,3}$. Does the new basis become $\ket{00}, \ket{01}, \ket{10}, \ket{11}$?


1 Answer 1


Hadamard in Dirac notation is $$ H=\frac{1}{\sqrt{2}}(|0\rangle\langle 0|+|0\rangle\langle 1|+|1\rangle\langle 0|-|1\rangle\langle 1|). $$ For two qubits, you take the tensor product $H\otimes H$. You get $$ \frac12\left(|00\rangle\langle 00|+|00\rangle\langle 01|+|00\rangle\langle 10|+|00\rangle\langle 11| +|01\rangle\langle 00|-|01\rangle\langle 01|+|01\rangle\langle 10|-|01\rangle\langle 11| +|10\rangle\langle 00|+|10\rangle\langle 01|-|10\rangle\langle 10|-|10\rangle\langle 11| +|11\rangle\langle 00|-|11\rangle\langle 01|-|11\rangle\langle 10|+|11\rangle\langle 11|\right) $$ (essentially, you're looking for combinations $|1\rangle\langle 1|$ to put a negative sign on). If I were to write this as a formula, I'd have $$ H=\frac{1}{\sqrt{2}}\sum_{x,y\in\{0,1\}}(-1)^{x\cdot y}|x\rangle\langle y| $$ and $$ H\otimes H=\frac{1}{2}\sum_{x_1,x_2,y_1,y_2\in\{0,1\}}(-1)^{x_1\cdot y_1}(-1)^{x_2\cdot y_2}|x_1x_2\rangle\langle y_1y_2|. $$


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.