Quantum state swap for two trapped Rydberg atoms