Path: blob/main/notebooks/ch-labs/Lab02_Single_Qubit_Gates.ipynb
3855 views
Lab 2 Single Qubit Gates
Prerequisite Ch.1.3 Representing Qubit States Ch.1.4 Single Qubit Gates
Other relevant materials Grokking the Bloch Sphere
Part 1 - Effect of Single-Qubit Gates on state |0>
Goal
Create quantum circuits to apply various single qubit gates on state |0> and understand the change in state and phase of the qubit.
![]() | ![]() | ![]() | ![]() |
|---|
To see the effect of each of the gates, we will take a single circuit with 4 qubits and apply a different gate to each of the qubits to plot the values of each of those qubits on the blocsphere.
| Effect on Qubit on application of Gate | Satevector | QSphere Plot | Statevector (Post Measurement) |
|---|---|---|---|
| Input State = Before measurement, - qubit state = - qubit has probability 1 of being in state ‘1’ Post measurement, quit state is ‘1’ with phase 0 | ![]() | ![]() | ![]() |
| Input State = Before measurement, - qubit state = - qubit has probability 1 of being in state ‘1’ Post measurement, quit state is ‘1’ with phase pi/2 | ![]() | ![]() | ![]() |
| Input State = Before measurement, - qubit state = - qubit has probability 1 of being in state ‘0’ Post measurement, quit state is ‘0’ with phase 0 | ![]() | ![]() | ![]() |
| Input State = Before measurement, - qubit state = - qubit has probability 1 of being in state ‘0’ Post measurement, quit state is ‘0’ with phase 0 | ![]() | ![]() | ![]() |
Part 2 - Effect of Single-Qubit Gates on state |1>
Goal
Create quantum circuits to apply various single qubit gates on state |1> and understand the change in state and phase of the qubit.
![]() | ![]() | ![]() | ![]() |
|---|
To see the effect of each of the gates, we will take a single circuit with 4 qubits and apply a different gate to each of the qubits to plot the values of each of those qubits on the blocsphere.
| Effect on Qubit on application of Gate | Satevector | QSphere Plot | Statevector (Post Measurement) |
|---|---|---|---|
| Input State = Before measurement, - qubit state = - qubit has probability 1 of being in state ‘0’ Post measurement, quit state is ‘0’ with phase 0 | ![]() | ![]() | ![]() |
| Input State = Before measurement, - qubit state = - qubit has probability 1 of being in state ‘0’ Post measurement, quit state is ‘0’ with phase 3pi/2 | ![]() | ![]() | ![]() |
| Input State = Before measurement, - qubit state = - qubit has probability 1 of being in state ‘1’ Post measurement, quit state is ‘1’ with phase pi | ![]() | ![]() | ![]() |
| Input State = Before measurement, - qubit state = - qubit has probability 1 of being in state ‘1’ Post measurement, quit state is ‘1’ with phase pi/2 | ![]() | ![]() | ![]() |
Part 3 - Effect of Single-Qubit Gates on state |+>
Goal
Create quantum circuits to apply various single qubit gates on state |+> and understand the change in state and phase of the qubit.
![]() | ![]() | ![]() | ![]() |
|---|
To see the effect of each of the gates, we will take a single circuit with 4 qubits and apply a different gate to each of the qubits to plot the values of each of those qubits on the blocsphere.
| Effect on Qubit on application of Gate | Satevector | QSphere Plot | Probability (Histogram) |
|---|---|---|---|
| Input State = Before measurement, - qubit state = - qubit has probability 0.5 of being in each of the states ‘0’ and ‘1’ | ![]() | ![]() | ![]() |
| Input State = Before measurement, - qubit state = - qubit has probability 0.5 of being in each of the states ‘0’ and ‘1’ | ![]() | ![]() | ![]() |
| Input State = Before measurement, - qubit state = - qubit has probability 0.5 of being in each of the states ‘0’ and ‘1’ | ![]() | ![]() | ![]() |
| Input State = Before measurement, - qubit state = - qubit has probability 0.5 of being in each of the states ‘0’ and ‘1’ | ![]() | ![]() | ![]() |
Part 4 - Effect of Single-Qubit Gates on state |->
Goal
Create quantum circuits to apply various single qubit gates on state |-> and understand the change in state and phase of the qubit.
![]() | ![]() | ![]() | ![]() |
|---|
To see the effect of each of the gates, we will take a single circuit with 4 qubits and apply a different gate to each of the qubits to plot the values of each of those qubits on the blocsphere.
| Effect on Qubit on application of Gate | Satevector | QSphere Plot | Probability (Histogram) |
|---|---|---|---|
| Input State = Before measurement, - qubit state = - qubit has probability 0.5 of being in each of the states ‘0’ and ‘1’ | ![]() | ![]() | ![]() |
| Input State = Before measurement, - qubit state = - qubit has probability 0.5 of being in each of the states ‘0’ and ‘1’ | ![]() | ![]() | ![]() |
| Input State = Before measurement, - qubit state = - qubit has probability 0.5 of being in each of the states ‘0’ and ‘1’ | ![]() | ![]() | ![]() |
| Input State = Before measurement, - qubit state = - qubit has probability 0.5 of being in each of the states ‘0’ and ‘1’ | ![]() | ![]() | ![]() |
Part 5 - Effect of Single-Qubit Gates on state |i>
Goal
Create quantum circuits to apply various single qubit gates on state |i> and understand the change in state and phase of the qubit.
![]() | ![]() | ![]() | ![]() |
|---|
To see the effect of each of the gates, we will take a single circuit with 4 qubits and apply a different gate to each of the qubits to plot the values of each of those qubits on the blocsphere.
| Effect on Qubit on application of Gate | Satevector | QSphere Plot | Probability (Histogram) |
|---|---|---|---|
| Input State = Before measurement, - qubit state = - qubit has probability 0.5 of being in each of the states ‘0’ and ‘1’ | ![]() | ![]() | ![]() |
| Input State = Before measurement, - qubit state = - qubit has probability 0.5 of being in each of the states ‘0’ and ‘1’ | ![]() | ![]() | ![]() |
| Input State = Before measurement, - qubit state = - qubit has probability 0.5 of being in each of the states ‘0’ and ‘1’ | ![]() | ![]() | ![]() |
| Input State = Before measurement, - qubit state = - qubit has probability 0.5 of being in each of the states ‘0’ and ‘1’ | ![]() | ![]() | ![]() |
Part 6 - Effect of Single-Qubit Gates on state |-i>
Goal
Create quantum circuits to apply various single qubit gates on state |-i> and understand the change in state and phase of the qubit.
![]() | ![]() | ![]() | ![]() |
|---|
To see the effect of each of the gates, we will take a single circuit with 4 qubits and apply a different gate to each of the qubits to plot the values of each of those qubits on the blocsphere.
| Effect on Qubit on application of Gate | Satevector | QSphere Plot | Probability (Histogram) |
|---|---|---|---|
| Input State = Before measurement, - qubit state = - qubit has probability 0.5 of being in each of the states ‘0’ and ‘1’ | ![]() | ![]() | ![]() |
| Input State = Before measurement, - qubit state = - qubit has probability 0.5 of being in each of the states ‘0’ and ‘1’ | ![]() | ![]() | ![]() |
| Input State = Before measurement, - qubit state = - qubit has probability 0.5 of being in each of the states ‘0’ and ‘1’ | ![]() | ![]() | ![]() |
| Input State = Before measurement, - qubit state = - qubit has probability 0.5 of being in each of the states ‘0’ and ‘1’ | ![]() | ![]() | ![]() |































































































