  Experimental imperfections induce phase and population errors in quantum
systems. We present a method to compensate unitary errors affecting also the
population of the qubit states. This is achieved through the interaction of the
target qubit with an additional control qubit. We show that our approach works
well for single-photon and two-photon excitation schemes. In the first case, we
study two reduced models (i) a two-level system in which the interaction
corresponds to an effective level shift and (ii) a three-level one describing
two qubits in the Bell triplet subspace. In the second case, instead, a
double-STIRAP process is presented with comparable compensation efficiency with
respect to the single-photon case.
