In matrix form (rows and columns ordered ∣00⟩,∣01⟩,∣10⟩,∣11⟩):
CP(λ)=100001000010000eiλ.
You can verify it is unitary: the four columns are orthonormal and the determinant has magnitude 1.
Why only ∣11⟩ acquires a phase
The gate is controlled: it acts on the target only when the control is ∣1⟩. The
single-qubit P(λ) gate adds a phase eiλ to ∣1⟩ and leaves ∣0⟩
alone. CP(λ) makes that action conditional on the control being ∣1⟩, so the phase
appears exactly on ∣11⟩ — the only basis state where both qubits are ∣1⟩.
Common special cases
Three frequently used controlled-phase angles have their own shorthand names:
For example, CZ is a special case of CP(π) and is symmetric: it does not matter which qubit
you call "control" and which you call "target," because ∣11⟩ is the only state it changes.
Try it
Apply a controlled-phase of π/2 with qubit 0 as the control and qubit 1 as the target. The
grader checks the full two-qubit unitary matrix, so doing nothing will not pass.
Run your code to see the quantum state.
Sign in on the full site to ask questions and join the discussion.