In the last lesson, I challenged you to solve five problems to help you revisit the fundamental mathematics of quantum computing.
Here is the solution to the first problem.
Problem 1
The Pauli-X gate acts as a quantum NOT gate and functions to flip a qubit state.
The following matrix represents it:
Apply this gate to a qubit in state |0⟩ and a qubit in state |1⟩.
What will the resulting states be after the application?
Solution 1
Given the Pauli-X gate matrix:
We need to apply it to |0> and |1> which are represented by the following vectors:
Let’s first apply the Pauli-X gate to |0> :
The final result is:
Next, let’s apply the Pauli-X gate to |1> :
The final result is:
We confirm that applying the Pauli-X gate to |0> flips it to |1> and vice versa.
Message me or mention in the comments below if any of these steps are unclear. Check out the next post to find the solution to Problem 2!