1
$\begingroup$

I am newbie to quantum computing and having a bit confusion regarding the action of Hadamard gate on multiple qbits which are already in superposed state (I well understand how it works for qbits which are in |00..00> state) i.e. in the middle of the circuit.

For example in Grover's algorithim with three qbits |ψ2>=1√8(|000⟩+|001⟩+|010⟩+|011⟩+|100⟩−|101⟩−|110⟩+|111⟩) this state when given to Hadamard gates (on all three qibts) generates state |ψ3a⟩=12(|000⟩+|011⟩+|100⟩−|111⟩). Also when given |ψ3a⟩=12(-|000⟩+|011⟩+|100⟩−|111⟩), it generates |ψ3a⟩=12(-|101⟩-|110⟩). Now when I apply the truth table I might get the intended answers but is their any logical way or a generalized formula to infer the output without diving into applying Hadamard to each single ket and xoring them to get the results, as its not fun for larger number of qbits.

Thanks.

$\endgroup$
2
  • $\begingroup$ Hi and welcome to Quantum Computing SE. Please use MathJax for typesetting mathematical expressions. $\endgroup$ Jul 15 at 5:25
  • $\begingroup$ sure and thanks $\endgroup$
    – aneela
    Jul 15 at 9:50

1 Answer 1

2
$\begingroup$

There is a formula for the Hadamard transform on $N$ qubits. $$ H^{\otimes N}=\frac{1}{\sqrt{2^N}}\sum_{x,y\in\{0,1\}^N}(-1)^{x\cdot y}|y\rangle\langle x| $$ In this case, $$ x\cdot y=\sum_{i=1}^Nx_iy_i $$ is just like thinking of the binary strings as vectors and taking their inner product.

For the 3-qubit cases that you're describing, this just expands to an $8\times 8$ matrix. If you take it and apply it to any input state, it'll tell you the output state.

$\endgroup$
1
  • $\begingroup$ can u please explain this ket and bra (i.e. x and y) or refer to a helping material where I can find some solved examples? thanks $\endgroup$
    – aneela
    Jul 15 at 9:47

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.