test toffoli gate is unitary