1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Quantum computing - form a SWAP gate from x3 controlled-NOT gates

  1. Dec 15, 2012 #1
    1. The problem statement, all variables and given/known data

    Show that three controlled-NOT gates (for a 2 qubit system) can be combined to form a SWAP gate. The control qubit alternates between the 2 qubits for each consecutive c-NOT gate. (The diagram is Figure 5 of the following notes: http://www-inst.eecs.berkeley.edu/~cs191/fa07/lectures/lecture9_fa07.pdf )

    2. Relevant equations

    The explicit matrix form of a controlled-NOT gate is

    \begin{matrix}
    1 & 0 & 0 & 0 \\
    0 & 1 & 0 & 0 \\
    0 & 0 & 0 & 1 \\
    0 & 0 & 1 & 0
    \end{matrix}

    3. The attempt at a solution

    Multiply the following 3 matrices, representing c-NOTs with alternating control gate:

    \begin{matrix}
    1 & 0 & 0 & 0 \\
    0 & 1 & 0 & 0 \\
    0 & 0 & 0 & 1 \\
    0 & 0 & 1 & 0
    \end{matrix}

    \begin{matrix}
    0 & 1 & 0 & 0 \\
    1 & 0 & 0 & 0 \\
    0 & 0 & 1 & 0 \\
    0 & 0 & 0 & 1
    \end{matrix}

    \begin{matrix}
    1 & 0 & 0 & 0 \\
    0 & 1 & 0 & 0 \\
    0 & 0 & 0 & 1 \\
    0 & 0 & 1 & 0
    \end{matrix}

    The correct answer should be (for a SWAP gate):

    \begin{matrix}
    1 & 0 & 0 & 0 \\
    0 & 0 & 1 & 0 \\
    0 & 1 & 0 & 0 \\
    0 & 0 & 0 & 1
    \end{matrix}

    But this is not what I get. I think there may be a problem with my matrix representation of the second c-NOT gate in the series.
     
  2. jcsd
  3. Dec 22, 2013 #2
    turns out, as you guessed, the matrix representation of the CNOT(2->1) gate is incorrect.

    CNOT(2->1) = I[itex]\otimes[/itex]|0><0| + X[itex]\otimes[/itex]|1><1|

    =
    1 0 0 0
    0 0 0 1
    0 0 1 0
    0 1 0 0
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Quantum computing - form a SWAP gate from x3 controlled-NOT gates
  1. Logic gates ? (Replies: 4)

Loading...