patternMinor
Does entangling 100 qubits require a 2^100 X 2^100 Hadamard gate?
Viewed 0 times
100hadamarddoesrequirequbitsgateentangling
Problem
Suppose I have 100 qubits that I want to entangle and put into superposition. To do so I construct a Hadamard gate to do this. By definition, the Hadamard is going to be a 2^100 X 2^100 matrix - which is huge.
How does one go about actually performing this operation? The size of the Hadamard matrix is exponential relative to the number of qubits (ie 2^100 X 2^100). Is there a way to perform this operation without actually making this huge matrix? Or can we only work with a 'small' number of qubits at once?
Follow up question: does using 100 4x4 Hadamard gates (one for each qubit) do the same thing as using a single 2^100 x 2^100 Hadamard gate? If so, how do these qubits become entangled?
How does one go about actually performing this operation? The size of the Hadamard matrix is exponential relative to the number of qubits (ie 2^100 X 2^100). Is there a way to perform this operation without actually making this huge matrix? Or can we only work with a 'small' number of qubits at once?
Follow up question: does using 100 4x4 Hadamard gates (one for each qubit) do the same thing as using a single 2^100 x 2^100 Hadamard gate? If so, how do these qubits become entangled?
Solution
It does require that, but you get it for free.
When you apply a 2x2 gate to a single qubit, the gate you are applying to the $n$-qubit system that qubit is in is automatically $2^n$ x $2^n$. If you apply an $H$ to the third qubit out of six, then the operation you applied to the six qubits is $I_2 \otimes I_2 \otimes H \otimes I_2 \otimes I_2 \otimes I_2$. That's a 64x64 matrix; exactly what you needed.
So performing a Hadamard transform on $n$ qubits is actually very easy, even though some very large matrices are being thrown around if you think about what's happening in that way. Just independently hit each qubit with the usual single-qubit $H$ gate.
Note that Hadamarding each qubit doesn't entangle them, though. It puts them in a superposition, but the state still factors. If you want to entangled all the qubits, you could instead hit one of them with a Hadamard then use Controlled-Nots to toggle each of the other qubits based on that Hadamard'ed qubit.
When you apply a 2x2 gate to a single qubit, the gate you are applying to the $n$-qubit system that qubit is in is automatically $2^n$ x $2^n$. If you apply an $H$ to the third qubit out of six, then the operation you applied to the six qubits is $I_2 \otimes I_2 \otimes H \otimes I_2 \otimes I_2 \otimes I_2$. That's a 64x64 matrix; exactly what you needed.
So performing a Hadamard transform on $n$ qubits is actually very easy, even though some very large matrices are being thrown around if you think about what's happening in that way. Just independently hit each qubit with the usual single-qubit $H$ gate.
Note that Hadamarding each qubit doesn't entangle them, though. It puts them in a superposition, but the state still factors. If you want to entangled all the qubits, you could instead hit one of them with a Hadamard then use Controlled-Nots to toggle each of the other qubits based on that Hadamard'ed qubit.
Context
StackExchange Computer Science Q#48781, answer score: 5
Revisions (0)
No revisions yet.