# How do you build the modified Toffoli gate using only local unitary and CNOT operations?

How do you build a circuit for a modified Toffoli gate using only local unitary operations and CNOT operations? The two-qubit unitary operation is given by: $$\text{diag}\{1, 1, 1, e^{i\phi}\}$$.

• You included the programming tag: are looking for some type of code implementation, or simply a mathematical derivation? – rjh324 May 12 at 21:41
• What do you mean by "modified toffoli"? – DaftWullie May 13 at 6:30