Two-Qubit Gates and the CNOT

Suppose you have two qubits and want to make them interact. A single-qubit gate like Single-Qubit Gates: X, Y, Z, H can rotate one qubit's state. But acting on qubits independently can never produce entanglement. Something new is needed: a gate that lets one qubit's state control what happens to another. The controlled-NOT, or CNOT, is that gate. It is the simplest possible instance of a much larger family called controlled-U operations. CNOT matters because entanglement is the resource that separates quantum computing from classical simulation. Every quantum algorithm with a genuine speedup routes correlations between qubits through two-qubit gates. This includes Shor's factoring algorithm, Grover's search, quantum teleportation, and quantum error correction. Real hardware backs this up directly. IBM's superconducting processors, Google's Sycamore chip, and trapped-ion systems from IonQ and Quantinuum all report their native two-qubit gate fidelity as a headline performance number. This is because it is usually the bottleneck for circuit depth and algorithm success. The big picture is this: single-qubit gates move a point on the Bloch sphere. But they act on a two-dimensional space and can never couple two separate qubits. CNOT is the bridge between the world of Multi-Qubit Systems and Tensor Products, where states can be entangled, and the world of gates, which must be able to create that entanglement on demand. Once you have CNOT plus arbitrary single-qubit gates, you have a universal gate set. That is enough to build any quantum computation. This article gives the precise definition of CNOT as a truth table, a matrix, and a circuit symbol. It generalizes CNOT to controlled-U gates. It proves why CNOT entangles and why it is unitary and reversible. It also works through explicit numeric examples, including the construction of a Bell state. It closes with the classic mistakes people make when reasoning about controlled gates. Finally, it shows where these operations show up in real quantum hardware.

Key takeaways
  • CNOT flips a target qubit if and only if a control qubit is ∣1⟩|1\rangle; it is the quantum analogue of a controlled classical XOR.
  • On basis states ∣c⟩∣t⟩|c\rangle|t\rangle, CNOT maps ∣c⟩∣t⟩→∣c⟩∣t⊕c⟩|c\rangle|t\rangle \to |c\rangle|t \oplus c\rangle; it is its own inverse.
  • The general recipe is controlled-UU: apply unitary UU to a target register only when the control qubit is ∣1⟩|1\rangle, leaving ∣0⟩|0\rangle-control branches untouched.
  • Applying CNOT to a superposed control creates entanglement — this is the mechanism behind the Bell states and teleportation.
  • CNOT's matrix is unitary and a permutation matrix (in the computational basis), so it is automatically reversible with zero information loss.
  • CNOT plus single-qubit gates forms a universal gate set, the foundation of Universal Gate Sets and the full The Quantum Circuit Model.
The core insight

CNOT is a reversible, unitary "if-then" gate that conditions one qubit's transformation on another qubit's value, and this conditioning is precisely what generates entanglement.

The idea

A controlled gate takes a single-qubit unitary UU and promotes it to a two-qubit (or multi-qubit) operation: apply UU to a target qubit only if a control qubit is in state ∣1⟩|1\rangle, and do nothing if the control is ∣0⟩|0\rangle. Formally, on computational basis states of the control,

controlled-U:∣0⟩c⊗∣ψ⟩t↦∣0⟩c⊗∣ψ⟩t,∣1⟩c⊗∣ψ⟩t↦∣1⟩c⊗U∣ψ⟩t.\text{controlled-}U : |0\rangle_c \otimes |\psi\rangle_t \mapsto |0\rangle_c \otimes |\psi\rangle_t, \qquad |1\rangle_c \otimes |\psi\rangle_t \mapsto |1\rangle_c \otimes U|\psi\rangle_t.

The CNOT (controlled-NOT, also written CX\text{CX}) is the special case U=XU = X, the Pauli bit-flip. Since X∣0⟩=∣1⟩X|0\rangle = |1\rangle and X∣1⟩=∣0⟩X|1\rangle = |0\rangle, CNOT is the quantum lift of the classical operation "flip tt if c=1c = 1," which is exactly bitwise XOR: the truth table maps (c,t)↦(c, t⊕c)(c,t) \mapsto (c,\, t \oplus c). The crucial subtlety, and the reason this gate deserves an entire article, is that quantum control is defined by linearity, not by "looking at" the control qubit and branching classically. When the control qubit is in a superposition α∣0⟩+β∣1⟩\alpha|0\rangle + \beta|1\rangle, CNOT does not measure it and pick a branch; it applies the linear extension of the two basis rules above to the full two-qubit state. This linear extension of a classical-looking rule is exactly what produces entanglement, a phenomenon with no classical analogue. A gate that only ever acted on product states one qubit at a time — no matter how cleverly chosen — could never create the correlations that make CNOT(H⊗I)∣00⟩\text{CNOT}(H\otimes I)|00\rangle a Bell state instead of a product state.

How it works

Convention. We write two-qubit basis states as ∣c⟩∣t⟩=∣ct⟩|c\rangle|t\rangle = |ct\rangle with the control qubit listed first, matching the usual circuit diagrams and Nielsen–Chuang ordering. Some tools use the opposite convention, so always check which wire is the control before reading a matrix off a textbook.

Truth table (basis states):

Input ∣c t⟩|c\,t\rangleOutput ∣c t⊕c⟩|c\,t\oplus c\rangle
∣00⟩|00\rangle∣00⟩|00\rangle
∣01⟩|01\rangle∣01⟩|01\rangle
∣10⟩|10\rangle∣11⟩|11\rangle
∣11⟩|11\rangle∣10⟩|10\rangle

Matrix. Ordering basis vectors as ∣00⟩,∣01⟩,∣10⟩,∣11⟩|00\rangle, |01\rangle, |10\rangle, |11\rangle, CNOT is

CNOT=(1000010000010010).\text{CNOT} = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \end{pmatrix}.

The top-left 2×22\times2 identity block acts on the c=0c=0 subspace (do nothing); the bottom-right anti-diagonal block is exactly the Pauli XX matrix acting on the target when c=1c=1. This block structure is the matrix expression of "apply II or XX to the target, conditioned on the control," and it generalizes immediately: replace the XX block with any 2×22\times 2 unitary UU to get the matrix for controlled-UU,

controlled-U=∣0⟩⟨0∣⊗I  +  ∣1⟩⟨1∣⊗U.\text{controlled-}U = |0\rangle\langle 0|\otimes I \;+\; |1\rangle\langle 1|\otimes U .

Circuit symbol. CNOT is drawn as a solid dot on the control wire connected by a vertical line to a ⊕\oplus (circled plus) symbol on the target wire. Controlled-UU replaces the ⊕\oplus with a boxed UU.

Algorithm view. Treat CNOT as a subroutine that acts on a 4-dimensional amplitude vector, exactly the way any gate is simulated on a classical computer for testing and small-scale verification. ```

# Simulating CNOT on a 2-qubit state vector

# state is a length-4 complex array indexed by integer c*2 + t

# (c = control bit, t = target bit), i.e. amplitude order |00>,|01>,|10>,|11> function APPLY_CNOT(state, control_index, target_index): new_state = copy(state) for index in 0 .. 3: c = bit(index, control_index) # extract control bit of this basis label t = bit(index, target_index) # extract target bit of this basis label if c == 1: flipped_index = index XOR (1 << target_index) # flip only the target bit new_state[flipped_index] = state[index] else: new_state[index] = state[index] return new_state

# Generalization: controlled-U on a target qubit, U given as a 2x2 unitary matrix function APPLY_CONTROLLED_U(state, control_index, target_index, U): new_state = copy(state) for index in 0 .. 3: c = bit(index, control_index) if c == 0: new_state[index] += state[index] # untouched branch else: t = bit(index, target_index) i0 = index with target bit set to 0 i1 = index with target bit set to 1

# only accumulate once per (i0,i1) pair; shown here for the t=0 half if t == 0: new_state[i0] = U[0][0]state[i0] + U[0][1]state[i1] new_state[i1] = U[1][0]state[i0] + U[1][1]state[i1] return new_state ``` The first routine is just a permutation of amplitudes — no arithmetic beyond bookkeeping — which is why CNOT is cheap to simulate and, on hardware, implementable as a native two-qubit interaction. The second routine shows the general pattern: leave the c=0c=0 block alone, and apply the 2×22\times2 unitary UU to the amplitude pair indexed by the target qubit whenever c=1c=1.

Figure
CNOT as a circuit: acting on |1+⟩ produces an entangled Bell pair
|1⟩ |+⟩ H entangled output: (|10⟩ + |01⟩) / √2 control target (after H)

Notice in the diagram that the control qubit starts in the classical state ∣1⟩|1\rangle, but the target starts in superposition ∣+⟩=(∣0⟩+∣1⟩)/2|+\rangle = (|0\rangle+|1\rangle)/\sqrt2 produced by a Hadamard gate. Applying CNOT to ∣1⟩∣+⟩|1\rangle|+\rangle produces (∣11⟩+∣10⟩)/2(|11\rangle + |10\rangle)/\sqrt2, which after relabeling is exactly an entangled Bell-type state — a preview of The Bell States.

Complexity & correctness

Unitarity and reversibility. CNOT's matrix is a real permutation matrix: every row and column has exactly one 11 and the rest 00s. Permutation matrices are always orthogonal, hence unitary (CNOT†CNOT=I\text{CNOT}^\dagger \text{CNOT} = I), and CNOT is its own inverse since applying the same flip rule twice restores the target bit: t⊕c⊕c=tt \oplus c \oplus c = t. This matches the general requirement that every quantum gate be unitary, guaranteeing reversibility and no loss of quantum information — a strictly stronger constraint than the reversibility of classical logic gates like XOR, because unitarity must hold for every superposition, not just classical bit inputs.

Why controlled-UU is always unitary. Write controlled-U=∣0⟩⟨0∣⊗I+∣1⟩⟨1∣⊗U\text{controlled-}U = |0\rangle\langle0|\otimes I + |1\rangle\langle1|\otimes U. Since ∣0⟩⟨0∣|0\rangle\langle0| and ∣1⟩⟨1∣|1\rangle\langle1| are orthogonal projectors summing to identity, and II, UU are each unitary,

(controlled-U)†(controlled-U)=∣0⟩⟨0∣⊗I+∣1⟩⟨1∣⊗U†U=∣0⟩⟨0∣⊗I+∣1⟩⟨1∣⊗I=I⊗I.(\text{controlled-}U)^\dagger(\text{controlled-}U) = |0\rangle\langle0|\otimes I + |1\rangle\langle1|\otimes U^\dagger U = |0\rangle\langle0|\otimes I + |1\rangle\langle1|\otimes I = I\otimes I.

The cross terms vanish because ⟨0∣1⟩=0\langle0|1\rangle = 0. So controlled-UU is unitary for any unitary UU, not just XX — this is why the construction generalizes so cleanly.

Why CNOT entangles. Take the control in superposition α∣0⟩+β∣1⟩\alpha|0\rangle + \beta|1\rangle and the target in ∣0⟩|0\rangle. Linearity gives

CNOT[(α∣0⟩+β∣1⟩)⊗∣0⟩]=α CNOT∣00⟩+β CNOT∣10⟩=α∣00⟩+β∣11⟩.\text{CNOT}\big[(\alpha|0\rangle+\beta|1\rangle)\otimes|0\rangle\big] = \alpha\,\text{CNOT}|00\rangle + \beta\,\text{CNOT}|10\rangle = \alpha|00\rangle + \beta|11\rangle.

Claim: this state cannot be written as a tensor product ∣ϕ⟩⊗∣χ⟩|\phi\rangle\otimes|\chi\rangle whenever α,β≠0\alpha,\beta \neq 0. Suppose it could: (ϕ0∣0⟩+ϕ1∣1⟩)⊗(χ0∣0⟩+χ1∣1⟩)=ϕ0χ0∣00⟩+ϕ0χ1∣01⟩+ϕ1χ0∣10⟩+ϕ1χ1∣11⟩(\phi_0|0\rangle+\phi_1|1\rangle)\otimes(\chi_0|0\rangle+\chi_1|1\rangle) = \phi_0\chi_0|00\rangle+\phi_0\chi_1|01\rangle+\phi_1\chi_0|10\rangle+\phi_1\chi_1|11\rangle. Matching coefficients against α∣00⟩+0⋅∣01⟩+0⋅∣10⟩+β∣11⟩\alpha|00\rangle+0\cdot|01\rangle+0\cdot|10\rangle+\beta|11\rangle forces ϕ0χ1=0\phi_0\chi_1=0 and ϕ1χ0=0\phi_1\chi_0=0, while ϕ0χ0=α≠0\phi_0\chi_0=\alpha\neq0 and ϕ1χ1=β≠0\phi_1\chi_1=\beta\neq0 (both nonzero, both factors of a product state). The first two equations force either ϕ0=0\phi_0=0 or χ1=0\chi_1=0, and either ϕ1=0\phi_1=0 or χ0=0\chi_0=0 — but any such choice contradicts ϕ0χ0≠0\phi_0\chi_0\neq0 and ϕ1χ1≠0\phi_1\chi_1\neq0 simultaneously. No consistent assignment exists, so the state is not separable: CNOT applied to a superposed control genuinely entangles the two qubits. This is a full proof, not a hand-wave, and it is the precise sense in which "controlled gates create entanglement."

Time and space complexity. Simulating CNOT on a classical computer costs O(1)O(1) arithmetic operations per basis-state amplitude touched, since it is a fixed permutation of a 4-entry table; on nn qubits embedded in a 2n2^n-dimensional state vector, applying CNOT to two of the nn wires costs O(2n)O(2^n) time (touch every amplitude once) and O(1)O(1) extra space if done in place, because it only swaps amplitude pairs that differ in the target bit whenever the control bit is 1. This is the same asymptotic cost as any other single fixed two-qubit gate; the exponential blow-up is inherent to full state-vector simulation, not to CNOT specifically. On real hardware, CNOT (or an equivalent native two-qubit entangling gate such as the cross-resonance gate or the Mølmer–Sørensen gate) executes in constant time — one hardware pulse or pulse sequence — independent of nn, which is the entire point of building a quantum device rather than simulating one.

The tradeoff to be honest about. Two-qubit gates are the accuracy bottleneck of near-term hardware: single-qubit gate fidelities on leading platforms often exceed 99.9%, while two-qubit gate fidelities typically trail at 99–99.9%, because entangling interactions require precise coupling between physical qubits and are more sensitive to crosstalk and calibration drift. Circuit depth in two-qubit gates, not single-qubit gate count, is usually the dominant source of error in a real quantum computation, which is why compilers aggressively minimize CNOT count when mapping abstract circuits to hardware topology.

Worked example

Setup. Prepare qubit 1 (control) in ∣0⟩|0\rangle and apply HH; prepare qubit 2 (target) in ∣0⟩|0\rangle and leave it. Then apply CNOT with qubit 1 as control, qubit 2 as target. This is the standard Bell-state recipe. Step-by-step amplitude trace, using basis order ∣00⟩,∣01⟩,∣10⟩,∣11⟩|00\rangle,|01\rangle,|10\rangle,|11\rangle:

StageState (as vector)State (Dirac notation)
Initial(1,0,0,0)(1,0,0,0)∣00⟩|00\rangle
After HH on qubit 112(1,0,1,0)\frac{1}{\sqrt2}(1,0,1,0)12(∣00⟩+∣10⟩)\frac{1}{\sqrt2}(|00\rangle+|10\rangle)
After CNOT (control=1, target=2)12(1,0,0,1)\frac{1}{\sqrt2}(1,0,0,1)12(∣00⟩+∣11⟩)\frac{1}{\sqrt2}(|00\rangle+|11\rangle)

Reading off the matrix action directly: CNOT leaves the ∣00⟩|00\rangle amplitude alone (control bit 0), and sends the ∣10⟩|10\rangle amplitude to the ∣11⟩|11\rangle slot (control bit 1, target flips 0→10\to1). The result, 12(∣00⟩+∣11⟩)\frac{1}{\sqrt2}(|00\rangle+|11\rangle), is the Bell state ∣Φ+⟩|\Phi^+\rangle — the canonical maximally entangled two-qubit state, foreshadowing The Bell States directly.

A second, less symmetric trace to show the general controlled-UU mechanics rather than just this famous special case. Let the control qubit be in ∣1⟩|1\rangle and the target qubit start in ∣1⟩|1\rangle, but apply controlled-HH (control == qubit 1, target == qubit 2, U=HU = H) instead of CNOT.

StageState (as vector)State (Dirac notation)
Initial(0,0,0,1)(0,0,0,1)∣11⟩|11\rangle
Controlled-HH acts on target since control bit is 1apply HH to the t=1t=1 component: H∣1⟩=12(∣0⟩−∣1⟩)H|1\rangle = \frac{1}{\sqrt2}(|0\rangle-|1\rangle)—
Final12(0,0,1,−1)\frac{1}{\sqrt2}(0,0,1,-1)12(∣10⟩−∣11⟩)\frac{1}{\sqrt2}(|10\rangle-|11\rangle)

Check separability here: this state factors as ∣1⟩⊗12(∣0⟩−∣1⟩)|1\rangle \otimes \frac{1}{\sqrt2}(|0\rangle-|1\rangle), a product state, because the control started in a definite basis state ∣1⟩|1\rangle rather than a superposition. This confirms the correctness argument above precisely: entanglement requires the control to be in superposition before the controlled gate acts. A controlled-UU gate applied to a classical control value never entangles; it merely selects a branch, exactly like classical conditional execution.

Common pitfalls & traps

PitfallWhat goes wrongFix
Confusing control and target wire orderReading the matrix with the wrong qubit as "first" flips which basis states swapFix a convention (control listed first) and check every diagram against it explicitly
Assuming CNOT always entanglesApplying CNOT to any classical control state (like ∣0⟩|0\rangle or ∣1⟩|1\rangle) never entangles, only superposed controls doCheck whether the control is in superposition before claiming entanglement
Treating "controlled" as classical measurement-and-branchLeads to wrong predictions for superposed controls, since real hardware applies a coherent linear map, not a measurementAlways apply the linear extension of the truth table, never collapse the control first
Forgetting CNOT is self-inverseRedundant CNOT pairs are sometimes left in circuits, wasting gate budget and fidelityRecognize CNOT⋅CNOT=I\text{CNOT}\cdot\text{CNOT} = I and cancel adjacent identical CNOTs during optimization
Misreading controlled-UU for non-diagonal UUAssuming controlled-UU commutes with swapping control/target, which is false unless UU has special symmetryExplicitly track which wire carries the projector ∣1⟩⟨1∣|1\rangle\langle1| and which carries UU
Ignoring hardware connectivityAssuming any two qubits can interact directly; real chips only connect nearest neighborsAccount for SWAP-gate overhead when compiling CNOTs between distant qubits

Pioneers & history

The controlled-NOT gate is not attributed to a single discoverer in the way a named theorem might be; it emerged from the reversible-computing and quantum-information communities converging on the same construction from different directions, once quantum circuit models crystallized in the 1980s and 1990s.

Origins · 1 minRichard Feynman and how this was discovered
RF
Richard Feynman
1918–1988 · Proposed simulating physics with quantum systems and helped seed the idea of quantum logic gates in the early 1980s

DD
David Deutsch
1953–present · Formalized the quantum Turing machine and quantum circuit model, providing the theoretical scaffolding in which controlled gates like CNOT are defined precisely

History
1982
— Feynman argues that quantum systems can efficiently simulate quantum physics, motivating quantum computation as a distinct model.
1985
— Deutsch defines the quantum Turing machine and quantum circuits, giving controlled operations a rigorous mathematical home.
1989
— Barenco, Deutsch, Ekert, and Jozsa (among others active in this period) study which small gate sets suffice for universal quantum computation.
1995
— Barenco et al. prove that CNOT plus arbitrary single-qubit gates form a universal set for quantum computation.
1995
— Early experimental demonstrations of controlled two-qubit gates appear in trapped-ion and cavity-QED systems, moving CNOT from theory to laboratory reality.

Where this matters

CNOT and controlled-UU gates are the entangling primitive inside essentially every non-trivial quantum protocol. Quantum teleportation and superdense coding both use a CNOT-plus-Hadamard pair to prepare and later disentangle a Bell pair, exactly the construction shown in the worked example above. Quantum error-correcting codes such as the surface code, used in Google's and IBM's roadmaps toward fault tolerance, rely on layers of CNOTs to spread a single logical qubit's information redundantly across many physical qubits and to extract error syndromes without collapsing the encoded state. Shor's algorithm and Grover's algorithm both compile down, in their circuit-level descriptions, to sequences dominated by controlled operations acting on superposed registers — this is literally where their quantum advantage comes from. On real hardware, the CNOT is rarely implemented directly as drawn; it is compiled from whichever two-qubit interaction is physically native to the device. Superconducting qubits (IBM, Google, Rigetti) typically implement a cross-resonance or CZ-type interaction and synthesize CNOT from it using single-qubit rotations; trapped-ion systems (IonQ, Quantinuum) use the Mølmer–Sørensen gate, which entangles pairs (or larger groups) of ions via shared motional modes; photonic and neutral-atom platforms use their own native entangling mechanisms. In every case, quantum compilers translate the abstract CNOT gates that appear in a written circuit into the native gate set of the target device, and minimizing this translated two-qubit gate count is one of the central optimization problems in real-world quantum compiler engineering. Understanding CNOT precisely — its matrix, its entangling behavior, its cost — is therefore not just a theoretical exercise but the direct prerequisite for reading any quantum hardware benchmark or circuit diagram.

Ask the tutor: How does chaining multiple CNOT and controlled-U gates let you build arbitrary multi-qubit entangled states from a simple starting register?

Is CNOT the only two-qubit gate needed for universal quantum computation?

Not by itself — CNOT alone only permutes computational basis states and cannot create arbitrary superpositions or complex phases. What is true, and proven rigorously by Barenco and collaborators in 1995, is that CNOT together with arbitrary single-qubit unitaries forms a universal gate set: any unitary on any number of qubits can be approximated to arbitrary precision using only these two ingredients. This is why circuit diagrams so often show CNOTs interspersed with single-qubit rotations. CNOT supplies all the entangling power needed, while single-qubit gates supply all the local rotation freedom, and together they span the full space of quantum operations, a foundation covered further under Universal Gate Sets.

Does CNOT actually copy the control qubit's value, like classical fan-out?

No, and this is a subtle but important distinction. On classical basis inputs ∣0⟩|0\rangle and ∣1⟩|1\rangle, CNOT does look like it "copies" the control's value into the target (if target starts at ∣0⟩|0\rangle, it ends up matching the control bit). But if the control starts in superposition α∣0⟩+β∣1⟩\alpha|0\rangle+\beta|1\rangle, CNOT produces the entangled state α∣00⟩+β∣11⟩\alpha|00\rangle+\beta|11\rangle, not two independent copies of α∣0⟩+β∣1⟩\alpha|0\rangle+\beta|1\rangle. Genuine copying of an unknown quantum state is forbidden by the no-cloning theorem, and CNOT does not violate that theorem — it entangles rather than clones.

What is the difference between CNOT and the classical XOR gate?

Classically, XOR takes two bits and outputs their exclusive-or as a single bit, which is irreversible (you cannot recover both inputs from the output alone). CNOT instead outputs two qubits: the control unchanged, and the target replaced by target XOR control — this reversible two-output structure is what makes it unitary. If you only look at the target output on classical basis inputs, it reproduces XOR exactly, which is why CNOT is often called the quantum analogue of XOR. But CNOT's real power comes from what happens on superposed inputs, where XOR has no classical meaning at all.

Can any two qubits on a quantum chip be connected with a CNOT directly?

Usually not. Physical qubits are arranged on a chip or trap according to a fixed connectivity graph, and a native two-qubit entangling gate typically only exists between qubits that are physically adjacent or otherwise coupled. If a circuit calls for a CNOT between two non-adjacent qubits, a compiler must insert SWAP gates (or use other routing strategies) to bring the relevant qubits together first, at the cost of extra gate operations and extra opportunities for error. This routing problem is a major focus of quantum compiler design and directly affects how deep and how noisy a compiled circuit turns out to be.

Why is the control qubit's state left unchanged after a CNOT?

Because the defining rule of every controlled-UU gate explicitly leaves the control register alone; only the target register is transformed, and only conditionally. Mathematically, the operator ∣0⟩⟨0∣⊗I+∣1⟩⟨1∣⊗U|0\rangle\langle0|\otimes I + |1\rangle\langle1|\otimes U acts as the identity on the control's tensor factor in both terms of the sum, so no operation ever alters the control qubit's amplitude structure by itself. This is what allows CNOT to be reused as a diagnostic tool, for instance in quantum error correction, where a control-like ancilla qubit is deliberately left readable after interacting with a data qubit to extract a syndrome without destroying the data.

How does CNOT relate to the Bell states and quantum teleportation?

The standard recipe for producing a Bell pair is to apply a Hadamard to one qubit starting in ∣0⟩|0\rangle, then apply CNOT with that qubit as control and a second ∣0⟩|0\rangle qubit as target, yielding 12(∣00⟩+∣11⟩)\frac{1}{\sqrt2}(|00\rangle+|11\rangle), as derived step by step in the worked example. Quantum teleportation and superdense coding both begin by preparing exactly this entangled pair using CNOT, then later use a second CNOT (paired with measurements and classical communication) to disentangle and transfer information. This makes CNOT the mechanical engine behind both protocols, not just an abstract example gate.

Is a controlled-Z gate different from CNOT, and does it also entangle?

Controlled-Z (CZ) is the case U=ZU = Z instead of U=XU = X; its matrix is diagonal with a single −1-1 in the ∣11⟩|11\rangle entry rather than the off-diagonal block CNOT has. CZ still entangles a superposed control with a superposed target, by exactly the same linearity argument used for CNOT, and CZ can even be converted into CNOT (and vice versa) by sandwiching the target qubit with Hadamard gates. Many hardware platforms, especially superconducting qubits, actually implement CZ or CZ-like interactions natively and synthesize CNOT from CZ plus single-qubit gates, since CZ is often easier to realize with the available physical coupling.

Before this

Where this leads