Computing Library › Worked Examples
Worked Examples

Building a Bell State Step by Step

Construct the maximally entangled two-qubit Bell state with one Hadamard and one CNOT, tracking the amplitudes at each step.

The target

A Bell state is a two-qubit state that cannot be written as a product of single-qubit states. The canonical one is |Phi+> = (|00> + |11>)/sqrt(2). Measuring either qubit instantly fixes the other: the outcomes are perfectly correlated.

Step 1 - start in |00>

Kronos motion — state estimation

Both qubits begin in the ground state. The joint state vector in the basis (|00>,|01>,|10>,|11>) is (1,0,0,0).

Step 2 - Hadamard on qubit 0

H maps |0> to (|0>+|1>)/sqrt(2). Applied to the first qubit the state becomes (|00> + |10>)/sqrt(2), i.e. amplitudes (1,0,1,0)/sqrt(2). The first qubit is now in an equal superposition; the second is still |0>.

Step 3 - CNOT with qubit 0 as control

CNOT flips the target (qubit 1) when the control (qubit 0) is 1. The |00> term is unchanged; the |10> term becomes |11>. The result is (|00> + |11>)/sqrt(2) - the Bell state.

python
import numpy as np
H = np.array([[1,1],[1,-1]])/np.sqrt(2)
I = np.eye(2)
CNOT = np.array([[1,0,0,0],[0,1,0,0],[0,0,0,1],[0,0,1,0]])
psi = np.array([1,0,0,0])            # |00>
psi = np.kron(H, I) @ psi           # H on qubit 0
psi = CNOT @ psi
print(psi)   # [0.707 0 0 0.707]

Reading the result

The probabilities are |amplitude|^2 = 1/2 for |00> and 1/2 for |11>, and zero for the mixed outcomes. That zero is the signature of entanglement: you never see 01 or 10. The other three Bell states are reached by inserting an X or Z before the CNOT.

This tiny circuit is the workhorse of teleportation, superdense coding, and entanglement-based error checks used throughout quantum computing simulation work.