The CNOT Gate
The controlled-NOT (CNOT, or CX) is the workhorse two-qubit gate. It flips a target qubit if and only if the control qubit is :
| input | output | | --- | --- | | | | | | | | | | | | |
(Here the left bit is qubit 0, the control.) On a superposed control, CNOT does something with no classical analogue: it correlates the two qubits, which is the seed of entanglement — the subject of the next module.
Try it
Put the control in and use CNOT to flip the target, reaching .
Run your code to see the quantum state.
Sign in on the full site to ask questions and join the discussion.