I have a question, which I have thought about for a while now, and can't seem to figure out.
I have a quantum circuit and I would like to construct a unitary gate acting on a qubit $q$ that acts as a NOT gate on $q$ if $q = |1\rangle$, and leaves $q$ invariant if $q = |0\rangle$. In other words, I would like the NOT gate to act on $q$ AND be controlled by $q$. I am not sure how to implement this? Is there a sequence of gates that gives this required result?
I tried to to implement it by finding a unitary operator so that $|0\rangle$ goes to $|0\rangle$ and $|1\rangle$ also goes to $|0\rangle$ (which is equivalent to the above). I found the matrix that does this, but it is not unitary (and I don't think there is any unitary matrix that does this operation).
I feel like I am missing something obvious here, but can't figure it out. Any help would be appreciated! Thanks!