Take the 2-minute tour ×
Physics Stack Exchange is a question and answer site for active researchers, academics and students of physics. It's 100% free, no registration required.

I have a circuit that has 4 wires and 2 following each other Toffoli gates. The first Toffoli gate occupies 3 wires from above, the following Toffoli gate occupies 3 wires from below.
What will look like the inverse circuit of this entire circuit?

Thanks much!

share|improve this question
    
Related question from OP: physics.stackexchange.com/q/57811/2451 –  Qmechanic Mar 25 '13 at 13:51
    
Yes, they are started similar, but here is quite another question :) –  ABCD Mar 25 '13 at 14:03

1 Answer 1

up vote 0 down vote accepted

Well, if inverse means "how to undo", you just need to calculate the inverse matrix of the product of the two matrices discussed there: 2 following gates, permutation matrix

Have fun.

share|improve this answer
    
thanks, but I wonder how will the circuit look like –  ABCD Mar 25 '13 at 19:47
    
Well, it seems to me that a Toffoli gate is its own inverse when looking at the permutation table... By the way circuits and logic gates are supposed to be reversibly, isn't it ? –  FraSchelle Mar 25 '13 at 20:38
    
Thanks. I'm sorry, I don't understand your question. The circuit for an inverse of BA will look the same as the circuit for BA? –  ABCD Mar 26 '13 at 6:24
    
Not in general, but $(B.A)^{-1}=A^{-1}.B^{-1}$ and for Toffoli, $A^{-1}.B^{-1}=A.B$, am I right ? –  FraSchelle Mar 26 '13 at 9:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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