How can I apply single qubit gates and CNOT to 8x1 column vectors?

Click For Summary
To apply single qubit gates and CNOT to 8x1 column vectors, one must utilize 8x8 unitary matrices for the transformations. For instance, applying an H gate to the second qubit involves a specific unitary transformation that can be tedious to calculate directly. Instead, it's more efficient to work with tensor products, allowing for a simpler application of gates on individual qubits. The CNOT gate operates similarly, maintaining the principle of manipulating qubits independently. Ultimately, the goal is to transition from the state |000> to a superposition state like (|000> + |111>)/√2 using these gates.
EightBells
Messages
9
Reaction score
1
Homework Statement
Construct the GHZ state, |GHZ>= (1/sqrt(2))*(|000>+|111>) from the state |000> using a sequence of CNOT and single qubit gates.
Relevant Equations
n/a
I know |GHZ>=(1/sqrt(2))[1; 0; 0; 0; 0; 0; 0; 1], and |000>= the tensor product |0> x |0> x |0> = [1; 0; 0; 0; 0; 0; 0; 0].

Can I apply single qubit gates (i.e. 2x2 matrices) and CNOT (a 4x4 matrix) to 8x1 column vectors? If so, does anyone know a good starting point or a hint to get me moving in the right direction?
 
Physics news on Phys.org
Well, of course, any qubit gate that you apply must be an 8x8 unitary matrix. For example, if you want to apply an H gate to the second bit, you are applying the unitary transformation
$$\frac{1}{\sqrt{2}}
\begin{pmatrix}
1 & 0 & 1 & 0 &0 & 0 & 0 & 0 \\
0 & 1 & 0 & 1 &0 & 0 & 0 & 0 \\
1 & 0 & -1 & 0 &0 & 0 & 0 & 0 \\
0 & 1 & 0 & -1 &0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 &1 & 0 & 1 & 0 \\
0 & 0 & 0 & 0 &0 & 1 & 0 & 1 \\
0 & 0 & 0 & 0 &1& 0 & -1 & 0 \\
0 & 0 & 0 & 0 &0 & 1 & 0 & -1 \\
\end{pmatrix}
$$
But work with 8x8 matrices is very tedious, so it's better to always work in tensor product, in this case multiply by the previous matrix is equivalent to do
$$H_2\left|000\right> = \left(I\left|0\right>\right)\left(H\left|0\right>\right)\left(I\left|0\right>\right) = \left(\left|0\right>\right)\left(\frac{\left|0\right>+\left|1\right>}{\sqrt{2}}\right)\left(\left|0\right>\right) = \frac{\left|000\right>+\left|010\right>}{\sqrt{2}}$$

Or, if you want to apply an ##X## gate to the third qubit you simply do
$$X_3\left|000\right> = \left(I\left|0\right>\right)\left(I\left|0\right>\right)\left(X\left|0\right>\right) = \left(\left|0\right>\right)\left(\left|0\right>\right)\left(\left|1\right>\right)
=\left|001\right>$$
which is equivalent to multiply by the matrix
$$\begin{pmatrix}
0 & 1 & 0 & 0 &0 & 0 & 0 & 0 \\
1 & 0 & 0 & 0 &0 & 0 & 0 & 0 \\
0 & 0 & 0 & 1 &0 & 0 & 0 & 0 \\
0 & 0 & 1 & 0 &0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 &0 & 1 & 0 & 0 \\
0 & 0 & 0 & 0 &1 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 &0& 0 & 0 & 1 \\
0 & 0 & 0 & 0 &0 & 0 & 1 & 0 \\
\end{pmatrix}
$$
But we all will agree that is better to work qubit by qubit. The CNOT gate works in the same way. Now, try to apply some qubit gates to go from ##\left|000\right>## to ##\frac{\left|000\right>+\left|111\right>}{\sqrt{2}}##
 
  • Like
Likes EightBells and DrClaude

Similar threads

  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 29 ·
Replies
29
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K