Parallel Simulation of Quantum Coherent Evolution by Parameterized Arbitrary Time-dependent Hamiltonians
Theory Implementation Results Files

Spin-1/2 Moment in Magnetic Field

PSiQCoPATH's first sanity check came in the form of the simplest possible quantum system: a spin-1/2 magnetic moment in a static applied magnetic field. In this situation, the well known exact solution is that the spin precesses about the field with angular frequency $\omega_L$, the Larmoor frequency. Figure 1 shows the Bloch sphere representation of the trajectory of a spin initially aligned in the $z$-direction in the presence of a magnetic field parallel to the $y$-direction. From this plot it is clear that the spin exhibits precession as we know it should.

Figure 1: Bloch sphere representation of spin trajectory with $\hat{H} =\hat{\sigma}^y$

This case is perhaps too simple to use as a test case, though, as the Hamiltonian is independent of time. The second test was to have PSiQCoPATH simulate the behavior of a spin-1/2 magnetic moment in a time-varying magnetic field. The magnetic field varied in time according to the equation
$\vec{B}(t) = \sin(\Omega_B t)\,\vec{j} + \cos(\Omega_B t)\,\vec{k}$,
where $\vec{j}$ and $\vec{k}$ are unit vectors in the $y$ and $z$ directions, respectively. The Hamiltonian for this system is

$\displaystyle \hat{H}(t) = \sin(\Omega_B t)\, \hat{\sigma}^y + \cos(\Omega_B t)\,\hat{\sigma}^z$     (1)
where $\hat{\sigma}^y$ and $\hat{\sigma}^z$ are the Pauli spin operators. In the standard basis, the Pauli operators are represented by the matrices
$\displaystyle \sigma^x = \left(\begin{array}{cc} 0 & 1 \\  1 & 0\end{array}\rig...
...ght), \ \ \sigma^z = \left(\begin{array}{cc} 1 & 0 \\  0 & -1\end{array}\right)$     (2)
As the initial condition, the spin was aligned with the field along the z-axis. Some of the results of these calculations are shown in figure 2.

Figure 2: Bloch sphere representation of spin trajectories with Hamiltonian (1)

In the case where $\Omega_B/\omega_L = 0.01$, the motion is very nearly adiabatic. That is, the spin direction very closely follows the field direction. As $\Omega_B$ increases, the trajectory acquires increasingly large cycloid-like wiggles. Although this behavior was not expected beforehand, in retrospect it is easy to understand.

The key to this understanding is a mapping that we discovered between this problem and the trajectory of a point on the rim of a cone rolling on a flat surface (see figure 3). This mapping comes from the fact that a magnetic field generates rotations about its direction with frequency $\omega_L$. In our case, this rotation axis is itself rotating with frequency $\Omega_B$ in the $yz$-plane.

Figure 3: Equivalent problem - trajectory of a point on the rim of a cone rolling on a flat surface

The rolling motion of a cone on flat surface consists of two combined rotations - the cone rotates about its own symmetry axis with frequency $\omega_a$ and about the vertical axis through its tip with frequency $\Omega$. Under the condition of rolling without slippage, the combined effect of these two angular velocities is a net angular velocity along the line of contact between the cone and the surface. As the cone rolls, the direction of this instantaneous axis of rotation rotates about the vertical direction with frequency $\Omega$.

Thus the instantaneous axis of rotation in the cone problem has exactly the same behavior as the instantaneous axis of rotation (the magnetic field) in our spin problem. At a given instant, all points on the cone are rotating about the instantaneous axis of rotation, just as at any given instant the spin is precessing about the instantaneous direction of the magnetic field.

The half-angle of the cone corresponding to a particular choice of $\omega_L$ and $\Omega_B$ in the quantum spin problem can be found by simple trigonometry, and is given by the relation

$\displaystyle \tan\alpha = \frac{\Omega_B}{\omega_L}$     (3)
Note that $\alpha \rightarrow 0$ as $\Omega_B/\omega_L \rightarrow 0$. This means that for very slowly changing fields, the maximum amplitude of the spin's deviations from the field direction goes to zero as expected in the adiabatic limit. From this analysis, we see that any initial condition that starts the quantum spin at a point on the rim of the cone associated with the particular values of $\Omega_B$ and $\omega_L$ of that system will lead to a spin trajectory equivalent to that of the corresponding point on the rim of the associated rolling cone.

Aside from the intellectual interest of this result, it also turns out to be one of the rare cases of a Hamiltonian with non-trivial time dependence for which we have an exact answer to compare with the simulation. The agreement with our results appears to be quite good, though we have not explored it in quantitative detail.

Adiabatic Quantum Computation

Once this method validation was complete, we used PSiQCoPATH to simulate the solution of a few instances of NP-Complete problems using the method of quantum computation by adiabatic evolution described in the introduction and the reference given there. The particular problem for which we had easy access the proper Hamiltonians was the so-called exact cover problem. Exact cover is a version of satisfiability involving 3 bit clauses of the form

$\displaystyle z_i + z_j + z_k = 1$     (4)
where $z_i$, $z_j$, and $z_k$ are bits that take on the values 0 or 1.

This problem is described in detail in the paper by Farhi et al. As in that paper, we use a linear interpolation between the initial and final Hamiltonians of the form

$\displaystyle \hat{H}(t) = \left(\frac{t}{T}\right) \hat{H}_p + \left(1 - \frac{t}{T}\right)\hat{H}_0$     (5)
where $\hat{H}_p$ is the ``problem'' Hamiltonian and $\hat{H}_0$ is an initial Hamiltonian with ground state
$\displaystyle \vert \, \psi_0 \, \rangle = \frac{1}{\sqrt{2^N}}\left(\vert \, 0 \, \rangle + \vert \, 1 \, \rangle \right)^{\otimes N},$     (6)
and $T$ is the length of the run. Larger values of $T$ correspond to longer runs, and hence slower evolution. Thus the evolution should become increasingly adiabatic as $T$ becomes large.

We would like to thank Daniel Nagaj for supplying us with these Hamiltonians. An example of our results for a 6 qubit instance of Exact Cover are shown in figure 4.

Figure 4: Eigenstate populations vs time for 6 qubit Exact Cover for sweep times $T = 50$ and $T = 500$

These plots were generated by a Matlab script written by us to parse the PSiQCoPATH output files and perform the desired analysis. The script diagonalizes the system's Hamiltonian at each output time step and transforms the evolved state at the corresponding time step into this eigenbasis. The $n^{th}$ eigenstate population is equal to the square magnitude of the $n^{th}$ component of the evolved state in the instantaneous eigenbasis. For $T = 50$, we see that the probability of finishing in the ground state, i.e. of obtaining the correct solution to the problem, is approximately 60%. When $T = 500$, this probability is very nearly 1.

In figure 5, the energy levels (eigenvalues) of the instantaneous Hamiltonian are plotted over the course of the evolution. Notice that the position of the minimum energy gap is precisely where the ground state population gets ``lost'' in the fast run. This is what is expected from the considerations of the adiabatic theorem, and makes for a nice confirmation of the theory.

Figure 5: Energy levels vs time for 6 qubit Exact Cover

In the end we were only able to test up to 8 qubits. This is really not enough to make progress over the current state of the art in research on this topic, but with the improvements described in the section on future work we should be able to scale up to much higher dimension. All results were obtained from full time evolution operator calculations. Although this calculation is in a sense overkill for what we have used it for in the analysis, the full time evolution matrix could be used to find the success probability in the case where the initial state is actually a ``mixed-state'' due to thermal noise and/or uncertain preparation. This is an interesting situation to look at from a practical point of in view as this is a more realistic picture of what the situation will be like in real physical implementations.

With the distributed data approach of the matrix-vector multiplication single state evolution algorithm, we should be able to reach even larger systems. Memory usage is significantly lower in that case, and the distribution across processors should allow us to handle much larger matrices without having to reach beyond the cache/fast memory. This code did not become operational until after the tests described, so we only have detailed results for the full time evolution operator calculations.

Throughout these runs we also kept track of PSiQCoPATH's performance in terms of running time. Running time as a function of simulation length and number of processors is plotted in figure 6. The trends are very nearly linear in both $1/p$ and $T$, confirming our projected scaling rules.

Figure 6: Running time vs inverse number of processors

Click here to see more of our results in the PSiQCoPATH data/plot archive