What's the difference between automorphism and rotate

rotate in the source code calls automorphism

From a developer/user’s perspective, rotate is a library API that enables cyclic rotation through the encrypted vector. Automorphism is the mathematical principle that affects this rotation.

While the user submits Rotate(ctxt, rotIdx) to cyclically rotate the encrypted vector in ctxt to the left/right by rotidx. To affect this functionality, OpenFHE uses an automorphism transform under the hood.

If you would like to learn about automorphism transform in the context of FHE, you can refer to Appendix C in this paper.