Entanglement and Bell States
Combining a Hadamard gate with a CNOT produces one of the most famous states in quantum computing: a Bell state, two qubits so correlated that measuring one instantly tells you the other's outcome, no matter how far apart they are.
Building a Bell state
from qiskit import QuantumCircuit
from qiskit.quantum_info import Statevector
qc = QuantumCircuit(2)
qc.h(0) # qubit 0 into superposition
qc.cx(0, 1) # entangle qubit 1 with qubit 0
state = Statevector(qc)
print(state)
print(state.probabilities()) # ~50% |00>, ~50% |11>, 0% |01>, 0% |10>
Notice what's missing: |01> and |10> have zero probability. Each qubit, measured on its own, is still individually random (50/50), but the two outcomes are perfectly correlated, you'll always get 00 or 11, never a mismatch.
Why this isn't just "correlated dice"
Two classical coins could also be correlated, if you rig them in advance to always land the same way. The difference is that a Bell state's qubits don't have a predetermined outcome at all until measured, and yet the correlation still holds perfectly, from any distance, immediately. This is what physicists mean by entanglement: a genuinely quantum kind of correlation with no classical equivalent, and it's the resource that powers algorithms like quantum teleportation and superdense coding, and gives many quantum algorithms their speedup.
Verifying it experimentally
Running the circuit many times and checking that only 00/11 ever appear (never 01/10) is exactly how you'd verify entanglement on a real device, where you can't just print the Statevector directly, covered in the next lesson.
TIP
A Bell state is the simplest possible entangled state, just h then cx, but it's the building block nearly every more advanced quantum algorithm relies on. If you understand why |01>/|10> have zero probability here, you understand the core idea of entanglement.