Site Tools


cx-gate

Table of Contents

CX gate (CNOT)

CX gate (controlled-X, also called CNOT or controlled-NOT) is a two-qubit gate that flips the target qubit if and only if the control qubit is , and does nothing otherwise. It is the standard entangling gate in quantum computing.

The rows and columns are ordered , with the first qubit as control and the second as target:

Creating entanglement

A Hadamard gate on the control followed by CX is the standard circuit for producing a Bell state from the product state :

The resulting state cannot be written as a product of two single-qubit states — it is entangled.

Properties

The CX gate is its own inverse: . Together with all single-qubit gates it forms a universal gate set for quantum computation. In the Hadamard basis, the roles of control and target are exchanged: (control and target flipped).

List of code implementations

cx-gate.md · Last modified: