I am reading a book called "Quantum Computing for computer scientists" and stuck at this exercise for a day. Bellow is the description of Deutsch gate:
And here is the description of Toffoli gate:
In my opinion, phase shift operation only change the phase of |1> state, but leave the probability of both state (|0> and |1>) with no change. My question is how phase shift operation change the |110> -> |111> and |111> -> |110> as in the case of Toffoli gate (I mark by red rectangle in Toffoli gate matrix above?
If I misunderstand any thing, please point out. Any help, hint to solve this exercise would be appreciated.
Thank you in advance.
Edit: Since I haven't had enough reputation to post more than two links, please view the information about phase shift gate here. http:/ /i.stack.imgur.com/um8ov.png