Unitary transformations of pauli operators

In [1]:
from sympy import *
init_printing()

from sympy.physics.quantum import *
from sympy.physics.quantum.pauli import *
In [2]:
from sympy_quantum_utils import *
In [3]:
eps, delta, theta, Hsym, t = symbols("epsilon, delta, theta, H, t")
Omega = symbols("Omega", positive=True)
n = 6
In [4]:
sx, sy, sz = SigmaX(), SigmaY(), SigmaZ()

Two-level system in its eigenbasis

Consider the Hamiltonian for a two-level quantum system on the form:

$$ H = \frac{1}{2}\Delta\sigma_x + \frac{1}{2}\epsilon\sigma_z $$
In [21]:
H = eps/2 * sz + delta/2 * sx

Eq(Hsym, H)
Out[21]:
$$H = \frac{\delta {\sigma_x}}{2} + \frac{\epsilon {\sigma_z}}{2}$$

Instantaneous eigenbasis

We can transform the Hamiltonian to the eigenbasis (where the Hamiltonian is diagonal, only containing a $\sigma_z$ term) by applying the unitary tranformation:

In [6]:
U = exp(I * theta/2 * sy)
In [7]:
hamiltonian_transformation_auto(U, sx)
Out[7]:
$$\sin{\left (\theta \right )} {\sigma_z} + \cos{\left (\theta \right )} {\sigma_x}$$
In [8]:
hamiltonian_transformation_auto(U, sz)
Out[8]:
$$- \sin{\left (\theta \right )} {\sigma_x} + \cos{\left (\theta \right )} {\sigma_z}$$
In [9]:
H1 = hamiltonian_transformation_auto(U, H)

H1
Out[9]:
$$\frac{\delta}{2} \left(\sin{\left (\theta \right )} {\sigma_z} + \cos{\left (\theta \right )} {\sigma_x}\right) + \frac{\epsilon}{2} \left(- \sin{\left (\theta \right )} {\sigma_x} + \cos{\left (\theta \right )} {\sigma_z}\right)$$
In [20]:
H4 = collect(H1, (sx, sz))

H4
Out[20]:
$$\frac{\delta}{2} \left(\sin{\left (\theta \right )} {\sigma_z} + \cos{\left (\theta \right )} {\sigma_x}\right) + \frac{\epsilon}{2} \left(- \sin{\left (\theta \right )} {\sigma_x} + \cos{\left (\theta \right )} {\sigma_z}\right)$$

In the eigenbasis we require the coefficient of $\sigma_x$ to be zero, so we have the condition:

In [13]:
c, o = split_coeff_operator(H4.args[1])

Eq(c, 0)
Out[13]:
$$\frac{\delta}{2} \sin{\left (\theta \right )} + \frac{\epsilon}{2} \cos{\left (\theta \right )} = 0$$
In [14]:
Eq(tan(theta), delta/eps)
Out[14]:
$$\tan{\left (\theta \right )} = \frac{\delta}{\epsilon}$$
In [15]:
eq = Eq(theta, atan(delta/eps))

eq
Out[15]:
$$\theta = \operatorname{atan}{\left (\frac{\delta}{\epsilon} \right )}$$
In [16]:
H5 = simplify(H4.subs(theta, atan(delta/eps)))

H5
Out[16]:
$$\frac{\epsilon {\sigma_z}}{2} \sqrt{\frac{\delta^{2}}{\epsilon^{2}} + 1}$$

Now introduce $\Omega = \sqrt{\Delta^2 + \epsilon^2}$:

In [17]:
powsimp(simplify(H5.subs(eps, sqrt(Omega ** 2-delta ** 2))), force=True)
Out[17]:
$$\frac{\Omega {\sigma_z}}{2}$$

So we have reached the eigenbasis by applying the unitary transformation

In [18]:
U
Out[18]:
$$e^{\frac{i \theta}{2} {\sigma_y}}$$

with

In [19]:
eq
Out[19]:
$$\theta = \operatorname{atan}{\left (\frac{\delta}{\epsilon} \right )}$$

Versions

In [16]:
%reload_ext version_information

%version_information sympy
Out[16]:
SoftwareVersion
Python3.4.0 (default, Apr 11 2014, 13:05:11) [GCC 4.8.2]
IPython3.0.0-dev
OSposix [linux]
sympy0.7.4.1-git
Sat Jun 07 16:27:37 2014 JST