The effect of a controlled gate is usually explained as applying the gate in the case the control qubit is in the state 1⟩ and doing nothing when the state of the control qubit is 0⟩. This understanding of controlled gates as classical controls is useful, but has limitations.
An interesting phenomenon occurs when the control qubit is in a superposition of 0⟩ and 1⟩ state and the target qubit is in an eigenstate of an operator U. Let's see what happens when we apply a controlled U gate to the target qubit:
Ctrl U (α0⟩ + β1⟩) ⊗ Ψ⟩ = (α0⟩ + β exp(iθ) 1⟩) ⊗ Ψ⟩
Here the factor exp(iθ) is the eigenvalue of the operator U. What we see in this case is that the state of the target qubit Ψ⟩ has not changed while a component of the state of the control qubit has acquired a phase which is related to the eigenvalue of the operator U. An important observation to be made here is that this works in a similar manner for both singlequbit or multiqubit gates U. The phase is given by the eigenvalue of U and can be in principle read out and measured in subsequent steps of a larger algorithm.
In our example we use a Hadamard gate to act first on the auxiliary qubit in order to create a superposition. The state of the working qubit is prepared to be 1⟩ which is an eigenstate of phase gate with eigenvalue exp(iθ). After the ControlPhase gate is applied the 1⟩ component of the auxiliary qubit state gains a exp(iθ) phase relative to the 0⟩ component. However, if we make a measurement on the auxiliary qubit at this point, the phase cannot be detected and the 0⟩ and 1⟩ state are equally probable. This is why at the end we apply another Hadamard gate on auxiliary qubit. After this operation, when measuring the auxiliary qubit, the probability for measuring the 0⟩ state is 1/2(1 + cos(θ)).
