A method of processing a stream of digital samples of an optical signal received by a coherent optical receiver. The digital sample stream is processed to generate a dispersion compensated sample stream. The dispersion compensated sample stream is then processed to compensate polarization dependent impairments of the optical signal.