Simulation for trapped ions