  We consider quantum gates for trapped ions using state-selective displacement
of the ions. We generalize earlier work in order to treat arbitrary separations
between the traps. This requires the impact of anharmonicity arising from the
Coulomb interaction to be estimated. We show that its effects are always small
enough to allow high fidelity. In particular, the method can be applied to two
ions in the same trap. We also show that gates between non-neighbour ions, and
hence a Toffoli (three-qubit controlled-NOT) gate, can be achieved. We discuss
how the gate can be applied to logical qubits encoded in the
decoherence-free-subspace {|01>,|10>}, where each pair of ions stores a single
qubit. We also suggest alternatives to the spin-echo method to suppress
unwanted terms in the evolution.
