# Translating cumulative rotations into Pauli operators

1. Sep 11, 2014

### Strilanc

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).

2. Sep 11, 2014

### DrDu

Well, rotations aren't commutative.
The matrix you are using is good and the parametrization in terms of axis and angle, too. However, the cos and sin terms should contain theta/2, not theta itself.

3. Sep 11, 2014

### Strilanc

Ah, commutativity isn't the property I want.

What I want is "different paths and discretizations between two orientations give the same net operation". So, I should be able to twirl the cube all kinds of crazy ways quickly and slowly while computing small deltas to keep the qubit matching it, but when I stop and return the cube to the starting orientation then the qubit should also be back at its starting value.

For example, I've noticed that if I just kind of wobble the cube's front face around the imaginary axis poking through it that the qubit does not also wobble: it drifts. A good example is that applying Y then Z then X gets the cube back in the same orientation, but adds a factor of -1 to the qubit's state. That factor is technically unobservable, but I want to visualize the qubit in an intuitive way and it *looks* like a big observable effect.

I've noticed that a factor of c+s on everything cancels out that -1, but not the wobbly-drift. I also tried purposefully canceling any rotations on |0> (but still allowing it to be negative). That worked quite well, but I don't think it will work if I try to use it in entangled multi-qubit systems because I'm not sure it's even linear.

4. Sep 11, 2014

### The_Duck

There is no continuous one-to-one mapping between SU(2) matrices (which represent the possible operations on a qubit) and rotations. The set of rotations is in one-to-one correspondence with the group of SO(3) matrices. But the Lie groups SU(2) and SO(3) are topologically distinct; for example SU(2) is simply connected while SO(3) is not. There is a continuous *two*-to-one mapping from SU(2) to SO(3), but not a continuous one-to-one mapping.

5. Sep 11, 2014

### Strilanc

What's the continuous two-to-one mapping? The one I already have? Is the two-to-one-ness just a factor of +-1?

6. Sep 11, 2014

### The_Duck

It's hard for me to read your notation, but the two-to-one mapping is given for example here: http://www.nyu.edu/classes/tuckerman/quant.mech/lectures/lecture_6/node4.html . It's two-to-one because the angle $\alpha$ can range from $0$ to $4 \pi$.

Yes, the two-to-one-ness is because of an overall factor of $\pm 1$. Say you pick an axis and consider a continuous family of rotations around that axis, ranging from an angle of $0$ to an angle of $2 \pi$. Then you ask what the corresponding continuous family of SU(2) matrices is. You will find that the corresponding family of SU(2) matrices starts with the identity matrix $1$ but ends, not at the identity matrix, but at $-1$.

7. Sep 11, 2014

### Strilanc

Yup, that's it. Basically just $I \cdot \cos{\frac{\theta}{2}} + i \hat{v} \vec{\sigma} \sin{\frac{\theta}{2}}$, with $\hat{v}$ being the axis and $\theta$ the angle and $\vec{\sigma}$ the vector of pauli matrices.

8. Sep 11, 2014

### DrDu

From what I understood you weren't interested in global phase factors (the -1 for a 2pi rotation) but in some mysterious wobbling?

9. Sep 11, 2014

### Strilanc

Well, because I'm trying to make a visualization, the interest is more in making the mapping visually simple. I didn't really communicate that well. Various properties are useful, with continuity being more important than a global phase factor slowly accumulating. But if I could also get rid of the phase factor, that's even better.

The "wobbling" refers to a motion I'm applying to the cube, which is being interpreted as operations that perturb the qubit by small amounts. The operations don't cancel out, despite the cube staying near and returning to the same orientation, and instead accumulate global phase. Apparently that's unavoidable, unless I want to sacrifice continuity.

For example, one way to ensure a phase factor didn't accumulate would be to get from orientation A to orientation B by always returning to a fixed orientation C in between. But this would introduce singularities where the qubit's state would flip wildly from small motions around a pole.

10. Sep 22, 2014

### Strilanc

I found a slight improvement, I think.

The mapping mentioned above, $I \cdot \cos{\frac{\theta}{2}} + i \hat{v} \vec{\sigma} \sin{\frac{\theta}{2}}$),is actually the one used to go from angle-axis rotations to quaternion rotations.

Pauli matrices are similar to quaternions, in that if you multiply each matrix by $i$ then you get something that squares to -1 and they commute in the same way that the quaternions i, j, and k do. However, because the mapping is going from rotations to quaternions and quaternions are imaginary-scaled Pauli matrices, the result is that a half X rotation is no longer just a logical NOT... it also gets a phase factor.

The simplest thing that could fix this was to just try to cancel the phase factor by multiplying by $e^{i \frac{\theta}{2}}$... and that works! In fact, it causes the expression to simplify quite a bit because half-angle identities come into play and get rid of the divisions inside the sine functions. The result is this mapping:

$\frac{(I + \hat{v} \vec{\sigma}) + e^{i \theta} (I - \hat{v} \vec{\sigma})}{2}$

Where $I$ is the identity matrix, $\vec{\sigma}$ is the vector of Pauli matrices, $\hat{v}$ is the axis to rotate around (being used to scale the matrices), and $\theta$ is how much to rotate around that axis.

That mapping gives the correct cumulative operations, although of course you can gain phase factors due to the fact that XYZ=i.