# Why there're two axis of rotation when I'm trying to visualize this time-evolution?

This is a follow-up question of the problem I posted earlier. The following diagram illustrates my question: I'm trying to perform the time evolution of a random Hamiltonian. The green vector represents the expected axis of rotation. I prepared two initial states and I was expecting that the two traces of time evolution (blue and purple curves) should be centered around the green vector. However, on the figure, it looks like there's another vector contributing to the rotation. I'm wondering why that would happen? It seems that the invisible vector corresponds to the solution we don't want in this post. How can I fix the issue?

PS: Each point on the trace corresponds to a result of $$U_3(\theta,\phi,\lambda)$$ obtained from the statevector simulator (the quantum circuit only has a $$U_3$$ gate, or maybe an extra state-preparation gate in the front). From the given constraints, $$0≤𝜃≤𝜋$$, $$0≤𝜙<2𝜋$$, $$0≤𝜆<2𝜋$$. To make sure my $$U_3$$ arguments are valid, I tried

lambd = float(remainder(lambdt,2*pi))
phi = float(remainder(phit,2*pi))
theta =float(remainder(thetat,2*pi))
lambd = (lambd + 2*np.pi) % (2*np.pi)
phi = (phi + 2*np.pi) % (2*np.pi)
if theta > pi:
theta = 2*pi-gamma


Where deltat, betat and gammat represent the original t-dependent values (they could take any value), I'm trying to convert them to the range we desire, but the traces obtained don't quite agree with that (due to the undesired 'rings').

Thanks so much for the help:)

• It seems you are using your variable names {$\delta, \beta, \gamma$} from the earlier question after the code snippet but your new ones {$\theta, \psi, \lambda$} in ithe code except gamma is left at the end of the code and its definition in the code is unclear. – Joseph Geipel Mar 26 at 1:30