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

Click For Summary
SUMMARY

The discussion focuses on applying single qubit gates and CNOT gates to 8x1 column vectors in quantum computing. It establishes that any qubit gate must be represented as an 8x8 unitary matrix when working with 8 qubits. The conversation provides specific examples of applying the Hadamard (H) gate and the X gate to the qubits, demonstrating the tensor product approach for simplification. The importance of working with qubits individually rather than directly manipulating large matrices is emphasized for efficiency.

PREREQUISITES
  • Understanding of quantum states and notation, specifically |GHZ> and |000>
  • Familiarity with single qubit gates such as Hadamard (H) and X gates
  • Knowledge of tensor products in quantum mechanics
  • Basic understanding of unitary matrices and their properties
NEXT STEPS
  • Research the implementation of quantum gates using Qiskit
  • Explore the mathematical foundations of unitary transformations in quantum computing
  • Learn about the CNOT gate and its applications in quantum entanglement
  • Study the concept of quantum circuits and how to represent them visually
USEFUL FOR

Quantum computing enthusiasts, researchers in quantum mechanics, and developers working on quantum algorithms will benefit from this discussion.

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   Reactions: 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