By coupling a nonlinear system, such as an atom, to the electromagnetic field, it is possible to create Fock states (eigenstates of the harmonic oscillator). (Top) Brune et al. send atoms (left) into a cavity (center). The atoms are prepared with pulse P1 to be in a superposition of states |e〉 and |g〉 before they enter the cavity. The relative phase between these states, which is converted to probability amplitudes for |e〉 and |g〉 with pulse P2 when the atoms exit the cavity, depends on the number of photons in the cavity. (Bottom) In place of a cavity, Wang et al. create an electromagnetic field in a microwave resonator (blue). A superconducting qubit, acting as an artificial atom, couples to the center conductor.