Global vs Relative Phase
A precise account of why an overall phase factor is physically irrelevant while phase differences within a superposition are not.
The projective structure of state space
Quantum states that differ only by an overall factor e^{i theta} represent the same physical situation. The genuine state space is therefore not the Hilbert space itself but the set of rays, called projective Hilbert space. For a single qubit this is the Bloch sphere: the four real parameters of a two-component complex vector collapse to two angles once normalization and global phase are removed.
Density matrices erase global phase automatically
The density matrix rho = |psi>
Relative phase survives in rho
For |psi> = a|0> + b|1>, the off-diagonal element of rho is a b*, whose argument is the relative phase. These coherences are what interference reads out. A process that drives the off-diagonals to zero while leaving the diagonal populations intact is pure dephasing; it destroys relative phase without changing which-state probabilities in the computational basis.
The diagonal entries are populations; the off-diagonal entries carry the relative phase. Global phase would multiply the whole matrix by e^{i theta} times its conjugate, i.e. by one, so it cannot appear.
Why the distinction matters in a circuit
A single-qubit Z gate and its global-phase-shifted cousin -Z act identically on any lone qubit, so implementations may ignore the difference. But once that qubit is a control, the phase becomes relative to the other branch and becomes physical: a controlled-Z is not a controlled-(-Z). This is why phases that look ignorable on isolated qubits must be tracked carefully inside controlled operations and multi-qubit gates.