Applies a chosen phase rotation to the component only.
CP generalizes CZ by letting you choose any phase angle . CZ always applies a −1 phase (180°) to . CP lets you apply any phase from 0° to 360°. At , CP becomes CZ. At smaller angles, it applies more subtle phase rotations. This fine-grained control is exactly what the Quantum Fourier Transform (QFT) needs. The QFT is a quantum circuit that converts computational-basis amplitudes into frequency-basis amplitudes, and it is the key subroutine inside Shor’s factoring algorithm. In the QFT, each pair of qubits gets a CP gate with a different angle, building up the precise phase relationships that encode frequency information.
CP is a diagonal matrix with entries (1, 1, 1, . A diagonal matrix acts on each basis state independently, so CP multiplies , and by 1 and by . Like CZ, CP is symmetric between the two qubits (swapping them gives the same gate). The gate is unitary, and its inverse is CP(−. The Quantum Fourier Transform (QFT) on n qubits uses CP gates with angles ^k for k = 1, ..., n−1. Each successively smaller angle encodes a finer frequency resolution.
The joint phase structure of the two-qubit state changes by angle .
At , this becomes the CZ gate.
Applies a conditional phase rotation by angle . Symmetric between the two qubits. At , it reduces to CZ.
It is tempting to think CP is just a minor variation of CZ with little practical significance. That sounds plausible because CZ is already a useful gate. What actually happens is that the ability to choose arbitrary angles is what makes the QFT work. The precision of these angles directly determines the frequency resolution of quantum phase estimation, which is the subroutine behind Shor’s factoring algorithm.
CP is the engine of the Quantum Fourier Transform. The QFT underlies Shor’s factoring algorithm and quantum phase estimation. Understanding CP means understanding how quantum computers extract period and frequency information exponentially faster than classical computers.
In the Quantum Fourier Transform, why do the CP angles decrease as π/2^k?