# Quantum NOR Gate

How to implement NOR gate functionality within a quantum circuit? Having $$3$$ input bits $$f(x) \rightarrow y$$, I would like to achieve $$y=1$$ every time when $$x=?00$$ is on input ($$x=000$$ or $$x=100$$).

Note that the last qubit is always in the $$|0\rangle$$ state and the output of this implementation for NOR gate will be stored in the state of that qubit. The first two qubits are for the input state. Here one can find more about similar gates. The main idea is that the X gate will be applied only if both top qubits are in $$|0\rangle$$ state, otherwise, the gate(s) will do nothing. Hence the action on different inputs look like this $$|000\rangle \rightarrow |100\rangle$$, $$|001\rangle \rightarrow |001\rangle$$, $$|010\rangle \rightarrow |010\rangle$$, $$|011\rangle \rightarrow |011\rangle$$ (the bottom qubit is the leftmost qubit in this notation).