Skip to main content

Section 2.3 Exploring the CNOT Gate

Now let’s explore how the CNOT gate works. Using the same method, try all four input combinations (|00, |01, |10, and |11) to determine the relationship between inputs and outputs for the CNOT gate. Make the top qubit the control (the spot) and the bottom qubit the target (NOt gate).

Checkpoint 2.3.1. CNOT Truth Table.

    Which picture depicts the proper relationship between the four possible input and output combinations?
  • View Source for datafile
    <datafile label="CNOT_truth_table_CNOTgate" filename="CNOTgate.png">
              <image source="CNOTgate.png" width="66%" />
            </datafile>
    
    Data: CNOTgate.png
  • Yes! It always trades the two input values but it does not trade their locations!
  • View Source for datafile
    <datafile label="CNOT_truth_table_SWAPgateWrong1" filename="SWAPgateWrong1.png">
              <image source="SWAPgateWrong1.png" width="66%" />
            </datafile>
    
    Data: SWAPgateWrong1.png
  • Make sure you hooked up your circuit correctly!
  • View Source for datafile
    <datafile label="CNOT_truth_table_SWAPgateWrong2" filename="SWAPgateWrong2.png">
              <image source="SWAPgateWrong2.png" width="66%" />
            </datafile>
    
    Data: SWAPgateWrong2.png
  • Yes! It traded the values but not locations of the two qubits!
  • View Source for datafile
    <datafile label="CNOT_truth_table_SWAPgateWrong3" filename="SWAPgateWrong3.png">
              <image source="SWAPgateWrong3.png" width="66%" />
            </datafile>
    
    Data: SWAPgateWrong3.png
  • Make sure you hooked up your circuit correctly!
Hint.
Make the circuit and look at the bar graph below the circuit. Construct all for input combinations using not gates, recording the answers each time.
Now that you have the full truth table for CNOT, I suggest adding it onto your page of notes for future reference. In the following questions, you will be asked to calculate the results of circuits involving NOT, SWAP, and/or CNOT gates.

Checkpoint 2.3.2. CNOT Q1.

    What is the output of the following circuit?
    View Source for datafile
    <datafile label="CNOT_Q1-image" filename="CNOT_Q1.png">
      <image source="CNOT_Q1.png" width="66%" />
    </datafile>
    
    Data: CNOT_Q1.png
  • |00 or
    View Source for datafile
    <datafile label="CNOT_Q1_Balls00" filename="Balls00.png">
                <image source="Balls00.png" width="66%" />
              </datafile>
    
    Data: Balls00.png
  • Yes! The swap had no effect!
  • |01 or
    View Source for datafile
    <datafile label="CNOT_Q1_Balls01" filename="Balls01.png">
                <image source="Balls01.png" width="66%" />
              </datafile>
    
    Data: Balls01.png
  • Make sure you hooked up your circuit correctly!
  • |10 or
    View Source for datafile
    <datafile label="CNOT_Q1_Balls10" filename="Balls10.png">
                <image source="Balls10.png" width="66%" />
              </datafile>
    
    Data: Balls10.png
  • Make sure you hooked up your circuit correctly!
  • |11 or
    View Source for datafile
    <datafile label="CNOT_Q1_Balls11" filename="Balls11.png">
                <image source="Balls11.png" width="66%" />
              </datafile>
    
    Data: Balls11.png
  • Make sure you hooked up your circuit correctly!
Hint.
Write down the circuit and write the state of each qubit after each gate.

Checkpoint 2.3.3. CNOT Q2.

    What is the output of the following circuit?
    View Source for datafile
    <datafile label="CNOT_Q2-image" filename="CNOT_Q2.png">
      <image source="CNOT_Q2.png" width="66%" />
    </datafile>
    
    Data: CNOT_Q2.png
  • |00 or
    View Source for datafile
    <datafile label="CNOT_Q2_Balls00" filename="Balls00.png">
                <image source="Balls00.png" width="66%" />
              </datafile>
    
    Data: Balls00.png
  • Yes! The swap had no effect!
  • |01 or
    View Source for datafile
    <datafile label="CNOT_Q2_Balls01" filename="Balls01.png">
                <image source="Balls01.png" width="66%" />
              </datafile>
    
    Data: Balls01.png
  • Make sure you hooked up your circuit correctly!
  • |10 or
    View Source for datafile
    <datafile label="CNOT_Q2_Balls10" filename="Balls10.png">
                <image source="Balls10.png" width="66%" />
              </datafile>
    
    Data: Balls10.png
  • Make sure you hooked up your circuit correctly!
  • |11 or
    View Source for datafile
    <datafile label="CNOT_Q2_Balls11" filename="Balls11.png">
                <image source="Balls11.png" width="66%" />
              </datafile>
    
    Data: Balls11.png
  • Make sure you hooked up your circuit correctly!
Hint.
Write down the circuit and write the state of each qubit after each gate.
You have attempted 1 of 5 activities on this page.