# How to solve time-dependent Schrodinger equation and plot trajectory on Bloch sphere?

Let's say I have a $$2 \times 2$$ Hamiltonian that I am solving using the time-dependent Schrodinger equation: $$i \frac{d}{dt} |{\Phi}\rangle=H|{\Phi}\rangle.\tag{1}$$ Consider a generic Hamiltonian $$H = \begin{bmatrix} h_1 & h_2\tag{2} \\ h_3 & h_4\ \end{bmatrix}.$$ $$|{\Phi}\rangle$$ takes the general form with complex coefficients $$(a,b)^T$$ (a column vector). Then, given some initial conditions (such as $$a(0)=0,b(0)=1$$), I can solve the following system of equations resulting from the Schrodinger equation above: \begin{align}\tag{3} i \dot{a}&=a h_1 + b h_2\\ i\dot{b}&=a h_3 + b h_4,\tag{4} \end{align} where the overhead dot denotes a time-derivative.

This can give me the coefficients $$a,b$$ at each time $$t$$. However, I now want to plot this trajectory on the Bloch sphere, a convenient tool for visualizing 2-state systems. All 2-state Hermitian systems may be mapped to this tool, which in its simplest form corresponds to a spin-$$\frac{1}{2}$$ particle in an effective magnetic field.

If $$|{\Phi}\rangle$$ can be written in the following basis: $$|{\Phi}\rangle=a |0\rangle + b|1\rangle,\tag{5}$$ (corresponding to the same coefficients $$a,b$$ found earlier), we can equivalently write $$|{\Phi}\rangle=\cos\left({\frac{\theta}{2}}\right) |0\rangle + \sin\left(\frac{\theta}{2}\right) e^{i\phi}|1\rangle,\tag{6}$$ where $$\theta$$ and $$\phi$$ are the polar and azimuthal angles in spherical coordinates.

How do I plot the trajectory of the state, say, from $$t=0$$ to $$t=1$$? If I solve $$a=\cos\left({\frac{\theta}{2}}\right)$$ and $$b=\sin\left(\frac{\theta}{2}\right) e^{i\phi}$$, the resulting $$\theta,\phi$$ are going to be complex angles in general. These cannot be plotted on a sphere as they are not real values. Where did I go wrong in my understanding?

What I want to achieve is similar to the animation in this post. Even in their case, you end up with complex $$|\Phi\rangle$$. I do not get how we can plot such complex angles.

Thank you.

• QuTip has a section on doing this, see: qutip.org/docs/4.1/guide/guide-bloch.html Nov 27, 2021 at 19:42
• @EverydayFoolish, thanks. I did find that earlier, and went tried to find how they did this using their GitHub source code. But I was not successful with the insufficient skills I have. Nov 27, 2021 at 20:34

## 1 Answer

The angles $$\phi$$ and $$\theta$$ never contain a non-zero imaginary part (they are always purely real numbers). The general solution to Eq. 1 is:

$$\tag{1} |\Phi(t)\rangle = e^{-\textrm{i}H t} | \Phi(0)\rangle.$$

This can be written as:

$$\tag{2} \begin{bmatrix} a(t) \\ b(t) \end{bmatrix} = U \begin{bmatrix} a(0) \\ b(0) \end{bmatrix} .$$

where the unitary matrix $$U$$ is just the matrix exponential in Eq. 1. The general expression for a 2x2 unitary matrix is:

$$\tag{3} U = \begin{bmatrix} c & d \\ -e^{i\varphi} d^* & e^{i\varphi} c^* \\ \end{bmatrix}, \qquad \left| c \right|^2 + \left| d \right|^2 = 1.$$

You now have the solution:

$$\tag{4} \begin{bmatrix} a(t) \\ b(t) \end{bmatrix} = \begin{bmatrix} c\cdot a(0) + d\cdot b(0)\\ -e^{i\varphi} d^*\cdot a(0) + e^{i\varphi} c^* \cdot b(0) \end{bmatrix} .$$

In your case, $$a(0) = 0$$ and $$b(0) = 1$$, so its even simpler:

\begin{align} \tag{5} \begin{bmatrix} a(t) \\ b(t) \end{bmatrix} &= \begin{bmatrix} d\\ e^{i\varphi} c^* \end{bmatrix} \\ &=d(t)|0\rangle + e^{i\varphi} c^*(t)|1\rangle.\tag{6} \end{align}

If you recall the polar form of a complex number, the angle (or "phase") is always a real number, and the same is true here.

Often Eq. 3 is expressed as in Eq. 2.31 of this set of PDF lecture notes by John Preskill (but the same formula will be found in almost every first year course on quantum information theory and many advanced NMR courses):

Here $$\hat{n}$$ is a unit vector with three components and $$\vec{\mathbf{\sigma}}$$ is a vector containing three elements: $$\sigma_x$$, $$\sigma_y$$ and $$\sigma_z$$. Note also that any Hermitian 2x2 matrix can be decomposed in terms of the identity $$I$$ and the three elements of $$\vec{\sigma}$$. Since $$\textrm{i}\sigma_y$$ will be real, the only imaginary numbers will appear from $$\textrm{i}\sigma_x$$ and $$\textrm{i}\sigma_z$$, for which in both cases you can factor out $$e^{\textrm{i}\phi}$$, especially since when $$\phi=\frac{\pi}{2}$$ we have $$e^{\textrm{i}\phi} = \textrm{i}$$.

• I guess chapter 2 of Eberly and Allen has a good section on this, and about the intuition for understanding two-level system(TLS) dynamics on bloch sphere. Nov 27, 2021 at 19:36
• Thank you for the answer! I am still having trouble understanding what's going on. 1) I hope to do this without rewriting H in terms of Pauli matrices (I am working with several models, for which this will take a lot of time). Is this possible? 2) Is my approach of time-evolving the Schro. eq. not feasible? 3) I chose U = exp(-i H(t) t). But this does not take the form of eq. (4) numerically, and gives me two different $\phi$. Nov 27, 2021 at 20:24
• 4) How do I get the angles from eq. (4) for general initial conditions? Do I just use eq. (6) from my post? But then I get complex angles again. Or, for the case in eq. (6) in your post, using polar angles, $d(t)$ and $e^{i\phi}c^{*}(t)$ are complex and give $\cos(\phi_1)+i \sin(\phi_1)$ and $\cos(\phi_2)+i \sin(\phi_2)$ respectively. I cannot see how this gives $\theta$ and $\phi$ for the sphere. I am terribly sorry I've misunderstood. Nov 27, 2021 at 20:27
• If you are limiting yourself to TLS, then you can just follow expectation values of the pauli matrices and you can just plot $\langle\vec{S }(t)\rangle$ or $\frac{\hbar}{2} \left( \langle\sigma_{x}(t)\rangle,\langle\sigma_{y}(t)\rangle,\langle\sigma_{z}(t)\rangle\right)$ in 3D space, where your axes would be $\vec{S_{x}}, \vec{S_{y}}, \vec{S_{z}}$ Nov 27, 2021 at 21:05
• Also, to add another point, your $\phi$ and $\theta$ at any given moment in time, say $t$, would be the solid angle and polar angle of the vector $\langle \vec{S}(t)\rangle$. Nov 27, 2021 at 21:11