FFT-based coarse carrier recovery for QPSK
A square operation creates an unmodulated tone for a BPSK signal at 2x the carrier frequency (a pure tone for the case that the signal was unfiltered or rectangular pulses with perfect phase and amplitude balance in the BPSK modulation, and typically a stronger carrier with weaker sidebands in the more common filtered or pulse-shaped cases). For QPSK signals (including OQPSK) a fourth law operation is required which produces the same at 4x the carrier frequency.

This can be explained by knowing that multiplying signals causes their phases to add. So a signal multiplied by itself (square) that is modulated 0° to 180° would then become 0° to 360° which is the same as 0° (unmodulated). For QPSK the states are 0°, 90°, 180° and 270° where it can be seen that multiplying any of those phases by 4 results in 0° using the same modulo 360 operation when adding phase.

It is typical when using this approach for carrier recovery to also use a PLL to track the recovered 4x carrier in order to clean up the residual (much lower) sidebands resulting from the finite bandwidth modulated signal and then the PLL-filtered signal is frequency divided to complete the carrier recovery.

I tend not to use this approach given the higher sampling frequency required and the comparative complexity to other methods when implementing all digital systems but this would make for a relatively simple analog approach using analog frequency multipliers. I detail another approach for carrier recovery specific to BPSK, QPSK and QAM that would be in my opinion much more efficient for a digital radio implementation in this post: High modulation index PSK - carrier recovery

This is also an interesting approach by fred harris for a frequency lock loop that I believe would work for QPSK carrier acquisition with additional subsequent phase tracking: How does this FLL work?