2
$\begingroup$

Here are the different toffolis (or maybe one of them is toffoli and the others are very similar to toffoli gates)

enter image description here

My question is:

  1. we know the matrix of the number 1 Toffoli:

enter image description here

What are the matrices for other two toffoli gates?

$\endgroup$
3
  • $\begingroup$ I would recommend to write down a map how three-qubit basis states (000, 001, 010, 011, 100, 101, 110, 111) are changed with the gates. Then convert the resulting basis states to vector representation and put them into a matrix (as columns) in the same order as the input states in the bracket above. $\endgroup$ Nov 28, 2022 at 7:10
  • 1
    $\begingroup$ An answer to a very similar question which will show you how to answer your own question :) quantumcomputing.stackexchange.com/questions/28315/… $\endgroup$ Nov 28, 2022 at 12:49
  • $\begingroup$ very helpful, thanks :) $\endgroup$
    – quest
    Nov 28, 2022 at 23:15

2 Answers 2

3
$\begingroup$

The problem is much easier to think about in turns of permutations. You can see that the matrix you created simply swaps the last two elements of the statevector: $[a_{000}, a_{001}, a_{010}, a_{011}, a_{100}, a_{101}, a_{110}, a_{111}]$ becomes $[a_{000}, a_{001}, a_{010}, a_{011}, a_{100}, a_{101}, a_{111}, a_{110}]$

The middle gate above swaps $a_{010}$ and $a_{011}$. The right gate swaps $a_{100}$ and $a_{101}$. The matrix is the identity matrix, but the two $1$s corresponding to these two rows are moved to the opposite corners of the square they are corners of.

And yes, the two gates, together, make an odd parity check.

$\endgroup$
1
  • $\begingroup$ From the three examples you have, you should be able to understand the pattern of which two states swap on a CNOT. I really think you should figure this out for yourself, to show you understood my answer. $\endgroup$ Nov 28, 2022 at 17:46
0
$\begingroup$
                             -----UPDATED------

Thanks to @Rajiv Krishnakumar, I solved the problem by this link Here are my toffolis: enter image description here

enter image description here The other two toffoli was already found yesterday: enter image description here

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.