  We study the problem of two superconducting quantum qubits coupled via a
resonator. If only one quanta is present in the system and the number of
photons in the resonator is measured with a null result, the qubits end up in
an entangled Bell state. Here we look at one source of errors in this quantum
nondemolition scheme due to the presence of more than one quanta in the
resonator, previous to the measurement. By analyzing the structure of the
conditional Hamiltonian with arbitrary number of quanta, we show that the
scheme is remarkably robust against these type of errors.
