How do I convert a 3-axis quaternion to a 1-axis x-y axis plane?

I had to go back and check what the comment "factor of two divided out" means. To get the normalized values of vx, vy and vz multiply each by 2.

As a check, the result should have magnitude = sqrt(vx^2 + vy^2 + vz^2) = 1