Analysis of a controlled phase gate using circular Rydberg states