After completing his education Karplus worked at the Institute for Advanced Study in Princeton, where he became interested in the developing, but yet untested, theory of quantum electrodynamics (QED). The magnetic moment of the electron had been determined very precisely by means of a variety of experiments, but the best theoretical calculations of this quantity, based on quantum mechanics, were seriously at variance with the experimental results. There was great interest among physicists in knowing whether or not a calculation based on QED would agree with the experimental results, but because of the ambiguities and complexity of QED, no one had so far been able to do such a calculation. Karplus, in collaboration with Norman Kroll, used QED to calculate the value of the magnetic moment of the electron. This was an extremely difficult calculation, requiring more than a year of intense effort from both men; the agreement between their result and the experimental measurements was the first, dramatic confirmation of QED.