Phase ambiguity in QAM modulation
Typically, phase ambiguity arises in the demodulation process when the carrier recovery is done via a loop that tracks the fourth harmonic of the received signal.  So why can't the loop track the carrier frequency directly? Well, the received signal doesn't have a carrier signal -- it has a modulated carrier signal whose phase is going to change at every symbol interval which makes the phase untrackable by a typical loop -- and it is necessary to take the fourth power to eliminate the modulation and produce a signal with unchanging phase. As a result, the local oscillator (LO) in the receiver might be in any of four different phases differing by $\pi/2$, and the local reference signals to the mixers in the I and Q branches of the receiver might end up being not the expected
\begin{align}\big(\cos(\omega t), -\sin(\omega t)\big)&amp; &amp; \text{LO and received signal are in phase}\end{align}
as reference signals (note that the Q branch reference leads the I branch reference by $\pi/2$) but instead 
\begin{align}\big(\sin(\omega t),\cos(\omega t)\big)&amp; &amp; \text{LO lags received signal by }\pi/2\end{align}
or
\begin{align}\big(-\cos(\omega t), \sin(\omega t)\big)&amp; &amp; \text{LO lags received signal by }\pi\end{align}
or
\begin{align}\big( -\sin(\omega t),-\cos(\omega t)\big)&amp; &amp; \text{LO lags received signal by }3\pi/2.\end{align}
The result is that instead of the I and Q bits appearing at their respective demodulator outputs (the receiver produces $(I,Q)$), the receiver might be producing $(\bar{Q},I)$, or $(\bar{I},Q)$, or $(\bar{Q},I)$ where the overbars denote bit complements.  Differential demodulation is commonly used to eliminate the phase ambiguity.