This is easy with this answer.
\documentclass{article}
\usepackage{animate}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[active,tightpage]{preview}
\makeatletter
\def\@anim@@newframe{\@ifstar\@anim@newframe\@anim@newframe}
\def\@anim@newframe{\end{preview}\begin{preview}}
\renewenvironment{animateinline}[2][]{%
\let\newframe\@anim@@newframe%
\let\multiframe\@anim@multiframe%
\begin{preview}}{%
\end{preview}}
\makeatother
\usepackage{tikz}
\usetikzlibrary{angles,quotes}
\begin{document}
\begin{animateinline}[autoplay,loop]{2}
\multiframe{21}{i=0+1}{\pgfmathsetmacro{\myangle}{-4*\i}
\begin{tikzpicture}
% Define radius
\def\r{3}
% Bloch vector
\coordinate[label=above:$\vec{a}$] (a) at (\myangle:{\r} and {\r/3});
\coordinate (orig) at (0,0);
\draw (orig) circle(0.1);
\draw[-latex] (orig) -- (a);
% Sphere
\draw (orig) circle (\r);
\draw[dashed] (orig) ellipse (\r{} and \r/3);
% Axes
\draw[->] (orig) -- ++(-\r/5,-\r/3) node[below] (x1) {$x$};
\draw[->] (orig) -- ++(\r,0) node[right] (x2) {$y$};
\draw[->] (orig) -- ++(0,\r) node[above] (x3) {$z$};
%Angles
\pic [draw=gray,text=gray,->,"$\phi$"] {angle = x1--orig--a};
\pic [draw=gray,text=gray,<-,"$\theta$"] {angle = a--orig--x3};
\end{tikzpicture}}
\end{animateinline}
\end{document}

If you want to rotate it over the full plane, use
\documentclass{article}
\usepackage{animate}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[active,tightpage]{preview}
\makeatletter
\def\@anim@@newframe{\@ifstar\@anim@newframe\@anim@newframe}
\def\@anim@newframe{\end{preview}\begin{preview}}
\renewenvironment{animateinline}[2][]{%
\let\newframe\@anim@@newframe%
\let\multiframe\@anim@multiframe%
\begin{preview}}{%
\end{preview}}
\makeatother
\usepackage{tikz}
\usetikzlibrary{angles,quotes}
\begin{document}
\begin{animateinline}[autoplay,loop]{2}
\multiframe{91}{i=0+1}{\pgfmathsetmacro{\myangle}{-4*\i}
\begin{tikzpicture}
% Define radius
\def\r{3}
% Bloch vector
\coordinate[label={\myangle+90}:$\vec{a}$] (a) at (\myangle:{\r} and {\r/3});
\coordinate (orig) at (0,0);
\draw (orig) circle(0.1);
\draw[-latex] (orig) -- (a);
% Sphere
\draw (orig) circle (\r);
\draw[dashed] (orig) ellipse (\r{} and \r/3);
% Axes
\draw[->] (orig) -- ++(-\r/5,-\r/3) node[below] (x1) {$x$};
\draw[->] (orig) -- ++(\r,0) node[right] (x2) {$y$};
\draw[->] (orig) -- ++(0,\r) node[above] (x3) {$z$};
%Angles
\pic [draw=gray,text=gray,->,"$\phi$"] {angle = x1--orig--a};
\pic [draw=gray,text=gray,<-,"$\theta$"] {angle = a--orig--x3};
\end{tikzpicture}}
\end{animateinline}
\end{document}
Notice that my code is for exporting the animation. If you do not want to export it, but just incorporate it in your pdf document, comment out the block
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[active,tightpage]{preview}
\makeatletter
\def\@anim@@newframe{\@ifstar\@anim@newframe\@anim@newframe}
\def\@anim@newframe{\end{preview}\begin{preview}}
\renewenvironment{animateinline}[2][]{%
\let\newframe\@anim@@newframe%
\let\multiframe\@anim@multiframe%
\begin{preview}}{%
\end{preview}}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
The animation will then show on selected viewers such as acroread.
animatepackage. – Dr. Manuel Kuehner May 03 '18 at 13:31