8.3 Multi-qubit gates
A quantum gate operation that operates on one qubit has a 2 by 2 unitary square matrix in a given basis. For two qubits, the matrix is 4 by 4. For ten, it is 210 by 210, which is 1024 by 1024. I show by example how to work with common lower dimensional gates and allow you to extrapolate to larger ones.
8.3.1 The quantum H⊗n gate
We start by looking at what it means to apply a Hadamard H to each qubit in a 2-qubit system. The H gate, or Hadamard gate, has the matrix
|ψ⟩1 = a1 |0⟩1 + b1 |1⟩1 and |ψ⟩2 = a2 |0⟩2 + b2 |1⟩2 .
Applying H to each qubit means to compute
(H |ψ⟩1) ⊗ (H |ψ⟩2)
which is the same as
(H ⊗ H) (|ψ⟩1 ⊗ |ψ⟩2) = H⊗2 ( a1 a2 |00⟩ + a1 b2 |01⟩ + b1 a2 |10⟩...