  We propose a method to prepare entangled states and implement quantum
computation with atoms in optical cavities. The internal state of the atoms are
entangled by a measurement of the phase of light transmitted through the
cavity. By repeated measurements an entangled state is created with certainty,
and this entanglement can be used to implement gates on qubits which are stored
in different internal degrees of freedom of the atoms. This method, based on
measurement induced dynamics, has a higher fidelity than schemes making use of
controlled unitary dynamics.
