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$).


1 Answer 1


A possible implementation for NOR gate by using one Toffoli gate and X gates:

enter image description here

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).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.