Set up the two wires

Begin with |00⟩ and put H on q0. In the workspace convention, q0 is the rightmost bit in state labels, so the resulting amplitudes are on |00⟩ and |01⟩. Each of the two amplitudes has magnitude 1/√2.

Entangle with a controlled gate

Add CX with q0 as control and q1 as target. The target flips only on the part of the state whose control is 1. The ideal output is the sum of |00⟩ and |11⟩ with equal positive amplitudes. Repeated ideal measurements in the computational basis yield correlated bits with a probability of ½ for each of those two outcomes.

Change one operation

Insert a Z on q0 after CX. The computational-basis probabilities are unchanged, but the sign of the |11⟩ amplitude changes. Apply H to both wires to explore how changing the measurement basis reveals a different correlation pattern.

Further reading

Try a related example