I have two quaternions, $Q_0$ and $Q_1$. I want to find the unit angular velocity vector $w$ that rotates $Q_0$ in the direction of $Q_1$ (shortest path). How can I do this?
The analog of what I want in terms of linear velocity is to take points $P_0$ and $P_1$, and find the vector $v = (P_0-P_1)/||P_0-P_1||$.
Given that $Q_0$ and $Q_1$ are unit quaternions, i.e., located on the 3-sphere $S^3$, the question for the shortest path from $Q_0$ to $Q_1$ can be rotated by left multiplication with $Q_0^{-1}$ to the question of the shortest path from $1$ to $W=Q_0^{-1}Q_1\in S^3$.
Now represent $W$ as $\cosϕ+w\sinϕ$, $ϕ\in[0,\pi]$, $|w|=1$, $Re(w)=0$, the obvious shortest arc on the sphere is given by $W(t)=\cos(tϕ)+w\sin(tϕ)$, $t\in[0,1]$. Rotating the solution back to the initial situation gives
$$Q(t)=Q_0W(t)=Q_0(\cos(tϕ)+w\sin(tϕ))$$
And since $w=(Q_0^{-1}Q_1-\cosϕ)/\sinϕ$, one has the more symmetric formula
$$Q(t)=Q_0\frac{\sin((1-t)ϕ)}{\sinϕ}+Q_1\frac{\sin(tϕ)}{\sinϕ}$$