The two-atom correlation scheme originally proposed by Davidovich, Brune, Raimond, and Haroche for measuring the decoherence of a mesoscopic superposition of coherent states of a QED cavity field is shown to be equivalent to a quantum computer solving Deutsch's problem. Using the existing analysis of decoherence in the Master equation formalism, and other important losses in this system, the final probability for obtaining the correct result for the computation is found in terms of the time period between atom traversals, the number of photons in the cavity, and the precision of the atomic velocity. The error due to decoherence in this system amounts to a phase error, and in the Master equation approach is a linear effect at small time scales. By explicitly considering the dynamics of the decoherence process when the system is coupled to a bath of oscillators with finite mode cutoff the error due to decoherence is found to decrease significantly and becomes a quadratic effect at short-time scales.