I want to write a program that, given the tracked position of a cube being rotated, applies analogous operations to a single qubit. The issue I'm running into is that, although operations correspond to rotations on the Bloch sphere, the mapping isn't one-to-one. So when I try to map back to operations, there are issues like... the path you take between two rotations affects the cumulative operation. Is there a mapping from orientations/rotations to single qubit operations that is continuous, commutative, associative, and can reach all operations (up to a global phase factor)? Is there a particularly *simple* mapping? What I'm using at the moment is [[c + s*z, s*(x - 1j*y)], [s*(x + 1j*y), c - s*z]] where <x,y,z> is the axis to rotate around to get from one orientation to the next, theta is how much to rotate, c is cos(theta), and s is i*sin(theta).