A device for compensating IQ time skew in a coherent transmitter, the device comprising: a digital delay filter configured to: receive a digital data signal comprising in-phase and quadrature, 10, components, and set an IQ time skew bias based on skew sweep control information from a control unit, such that the digital delay filter sets the IQ time-skew bias equal to each of a plurality of IQ time-skew bias values; for each of the plurality of IQ time-skew bias values, the device is configured to: by a pilot tone generator: combine a first pilot tone with a first frequency band of the digital data signal, and combine a second pilot tone with a second frequency band of the digital data signal, thereby generating a modified digital data signal; by an electro-optic modulator, EOM, generate an optical signal based on the modified digital data signal; by a pilot tone detector: receive the optical signal; generate a detector digital signal based on the optical signal; and detect a first pilot tone power and a second pilot tone power based on the detector digital signal; calculate a power ratio between the first pilot tone power and the second pilot tone power, thereby generating power ratio information, which is passed to the control unit; and once the IQ time skew bias value sweep has been performed for each of the plurality of IQ time-skew bias values, the control unit is configured to determine an IQ time skew between an in-phase component and a quadrature component of the optical signal based on the plurality of IQ time-skew bias values and the respective plurality of power ratios received from the pilot tone detector as power ratio information. a digital delay filter configured to: receive a digital data signal comprising in-phase and quadrature, 10, components, and set an IQ time skew bias based on skew sweep control information from a control unit, such that the digital delay filter sets the IQ time-skew bias equal to each of a plurality of IQ time-skew bias values; for each of the plurality of IQ time-skew bias values, the device is configured to: by a pilot tone generator: combine a first pilot tone with a first frequency band of the digital data signal, and combine a second pilot tone with a second frequency band of the digital data signal, combine a first pilot tone with a first frequency band of the digital data signal, and combine a second pilot tone with a second frequency band of the digital data signal, thereby generating a modified digital data signal; by an electro-optic modulator, EOM, generate an optical signal based on the modified digital data signal; by a pilot tone detector: receive the optical signal; generate a detector digital signal based on the optical signal; and detect a first pilot tone power and a second pilot tone power based on the detector digital signal; calculate a power ratio between the first pilot tone power and the second pilot tone power, thereby generating power ratio information, which is passed to the control unit; and receive the optical signal; generate a detector digital signal based on the optical signal; and detect a first pilot tone power and a second pilot tone power based on the detector digital signal; calculate a power ratio between the first pilot tone power and the second pilot tone power, thereby generating power ratio information, which is passed to the control unit; and once the IQ time skew bias value sweep has been performed for each of the plurality of IQ time-skew bias values, the control unit is configured to determine an IQ time skew between an in-phase component and a quadrature component of the optical signal based on the plurality of IQ time-skew bias values and the respective plurality of power ratios received from the pilot tone detector as power ratio information.