Lecture 4 - Symbolic quantum mechanics using SymPsi - Atom and cavity

Author: J. R. Johansson ([email protected]), http://jrjohansson.github.io, and Eunjong Kim.

Status: Preliminary (work in progress)

This notebook is part of a series of IPython notebooks on symbolic quantum mechanics computations using SymPy and SymPsi. SymPsi is an experimental fork and extension of the sympy.physics.quantum module in SymPy. The latest version of this notebook is available at http://github.com/jrjohansson/sympy-quantum-notebooks, and the other notebooks in this lecture series are also indexed at http://jrjohansson.github.io.

Requirements: A recent version of SymPy and the latest development version of SymPsi is required to execute this notebook. Instructions for how to install SymPsi is available here.

Disclaimer: The SymPsi module is still under active development and may change in behavior without notice, and the intention is to move some of its features to sympy.physics.quantum when they matured and have been tested. However, these notebooks will be kept up-to-date the latest versions of SymPy and SymPsi.

Setup modules

In [1]:
from sympy import *
init_printing()
In [2]:
from sympsi import *
from sympsi.boson import *
from sympsi.pauli import *

The Jaynes-Cummings model

The Jaynes-Cummings model is one of the most elementary quantum mechanical models light-matter interaction. It describes a single two-level atom that interacts with a single harmonic-oscillator mode of a electromagnetic cavity.

The Hamiltonian for a two-level system in its eigenbasis (see Two-level systems) can be written as

$$ H = \frac{1}{2}\Omega \sigma_z $$

and the Hamiltonian of a quantum harmonic oscillator (see Resonators and cavities) is

$$ H = \hbar\omega_r (a^\dagger a + 1/2) $$

The atom interacts with the electromagnetic field produced by the cavity mode $a + a^\dagger$ through its dipole moment. The dipole-transition operators is $\sigma_x$ (which cause a transition from the two dipole states of the atom). The combined atom-cavity Hamiltonian can therefore be written in the form

$$ H = \hbar\omega_r (a^\dagger a + 1/2) + \frac{1}{2}\hbar\Omega\sigma_z + \hbar g\sigma_x(a + a^\dagger) $$

To obtain the Jaynes-Cumming Hamiltonian

$$ H = \hbar\omega_r (a^\dagger a + 1/2) %-\frac{1}{2}\Delta\sigma_x + \frac{1}{2}\hbar\Omega\sigma_z + \hbar g(\sigma_+ a + \sigma_- a^\dagger) $$

we also need to perform a rotating-wave approximation which simplifies the interaction part of the Hamiltonian. In the following we will begin with looking at how these two Hamiltonians are related.

To represent the atom-cavity Hamiltonian in SymPy we creates an instances of the operator classes BosonOp and SigmaX, SigmaY, and SigmaZ, and use these to construct the Hamiltonian (we work in units where $\hbar = 1$).

In [3]:
omega_r, Omega, g, Delta, t, x, Hsym = symbols("omega_r, Omega, g, Delta, t, x, H")
In [4]:
sx, sy, sz, sm, sp = SigmaX(), SigmaY(), SigmaZ(), SigmaMinus(), SigmaPlus()
a = BosonOp("a")
In [5]:
H = omega_r * Dagger(a) * a + Omega/2 * sz + g * sx * (a + Dagger(a))

Eq(Hsym, H)
Out[5]:
$$H = \frac{\Omega {\sigma_z}}{2} + g {\sigma_x} \left({{a}^\dagger} + {a}\right) + \omega_{r} {{a}^\dagger} {a}$$

To simplify the interaction term we carry out two unitary transformations that corresponds to moving to the interaction picture:

In [6]:
U = exp(I * omega_r * t * Dagger(a) * a)

U
Out[6]:
$$e^{i \omega_{r} t {{a}^\dagger} {a}}$$
In [7]:
H2 = hamiltonian_transformation(U, H.expand())

H2
Out[7]:
$$\frac{\Omega {\sigma_z}}{2} + g e^{i \omega_{r} t} {\sigma_x} {{a}^\dagger} + g e^{- i \omega_{r} t} {\sigma_x} {a}$$
In [8]:
U = exp(I * Omega * t * sp * sm)

U
Out[8]:
$$e^{i \Omega t {\sigma_+} {\sigma_-}}$$
In [9]:
H3 = hamiltonian_transformation(U, H2.expand())

H3 = H3.subs(sx, sm + sp).expand()

H3 = powsimp(H3)

H3
Out[9]:
$$- \frac{\Omega}{2} \left(1 + {\sigma_z}\right) + \frac{\Omega {\sigma_z}}{2} + g e^{- i \Omega t - i \omega_{r} t} {\sigma_-} {a} + g e^{- i \Omega t + i \omega_{r} t} {\sigma_-} {{a}^\dagger} + g e^{i \Omega t - i \omega_{r} t} {\sigma_+} {a} + g e^{i \Omega t + i \omega_{r} t} {\sigma_+} {{a}^\dagger}$$

We introduce the detuning parameter $\Delta = \Omega - \omega_r$ and substitute into this expression

In [10]:
# trick to simplify exponents
def simplify_exp(e):
    if isinstance(e, exp):
        return exp(simplify(e.exp.expand()))

    if isinstance(e, (Add, Mul)):
        return type(e)(*(simplify_exp(arg) for arg in e.args)) 

    return e
In [11]:
H4 = simplify_exp(H3).subs(-omega_r + Omega, Delta)

H4
Out[11]:
$$- \frac{\Omega}{2} \left(1 + {\sigma_z}\right) + \frac{\Omega {\sigma_z}}{2} + g e^{i \Delta t} {\sigma_+} {a} + g e^{i t \left(\Omega + \omega_{r}\right)} {\sigma_+} {{a}^\dagger} + g e^{- i t \left(\Omega + \omega_{r}\right)} {\sigma_-} {a} + g e^{- i \Delta t} {\sigma_-} {{a}^\dagger}$$

Now, in the rotating-wave approximation we can drop the fast oscillating terms containing the factors $e^{\pm i(\Omega + \omega_r)t}$

In [12]:
H5 = drop_terms_containing(H4, [exp( I * (Omega + omega_r) * t),
                                exp(-I * (Omega + omega_r) * t)])

H5 = drop_c_number_terms(H5.expand())

Eq(Hsym, H5)
Out[12]:
$$H = g e^{i \Delta t} {\sigma_+} {a} + g e^{- i \Delta t} {\sigma_-} {{a}^\dagger}$$

This is the interaction term of in the Jaynes-Cumming model in the interaction picture. If we transform back to the Schrödinger picture we have:

In [13]:
U = exp(-I * omega_r * t * Dagger(a) * a)
H6 = hamiltonian_transformation(U, H5.expand())
In [14]:
U = exp(-I * Omega * t * sp * sm)
H7 = hamiltonian_transformation(U, H6.expand())
In [15]:
H8 = simplify_exp(H7).subs(Delta, Omega - omega_r)

H8 = simplify_exp(powsimp(H8)).expand()

H8 = drop_c_number_terms(H8)

H = collect(H8, g)

Eq(Hsym, H)
Out[15]:
$$H = \frac{\Omega {\sigma_z}}{2} + g \left({\sigma_-} {{a}^\dagger} + {\sigma_+} {a}\right) + \omega_{r} {{a}^\dagger} {a}$$

This is the Jaynes-Cumming model give above, and we have now seen that it is obtained to the dipole interaction Hamiltonian through the rotating wave approximation.

Dispersive regime

In the dispersive regime, where the two-level system is detuned from the cavity by much more than the interaction strength, $\Delta \gg g$, an effective Hamiltonian can be dervied which describes the Stark shift of the two-level system (which depends on the number of photons in the cavity) and the frequency shift of the cavity (which depend on the state of the two-level system).

This effective Hamiltonian, which is correct up to second order in the small paramter $g/\Delta$, is obtained by performing the unitary transformation

$$ U = e^{\frac{g}{\Delta}(a \sigma_- - a^\dagger \sigma_+)} $$
In [16]:
U = exp((x * (a * sp - Dagger(a) * sm)).expand())

U
Out[16]:
$$e^{- x {{a}^\dagger} {\sigma_-} + x {a} {\sigma_+}}$$
In [17]:
#H1 = unitary_transformation(U, H, allinone=True, expansion_search=False, N=3).expand()
#H1 = qsimplify(H1)
#H1
In [18]:
H1 = hamiltonian_transformation(U, H, expansion_search=False, N=3).expand()

H1 = qsimplify(H1)

H1
Out[18]:
$$- \frac{\Omega x^{2}}{2} - \Omega x^{2} {{a}^\dagger} {a} {\sigma_z} - \frac{\Omega x^{2}}{2} {\sigma_z} - \Omega x {{a}^\dagger} {\sigma_-} - \Omega x {a} {\sigma_+} + \frac{\Omega {\sigma_z}}{2} + g x^{4} {{a}^\dagger} \left({a}\right)^{2} {\sigma_+} - \frac{3 g}{4} x^{4} {{a}^\dagger} {\sigma_-} - g x^{4} \left({{a}^\dagger}\right)^{2} {a} {\sigma_-} + \frac{5 g}{4} x^{4} {a} {\sigma_+} - 2 g x^{2} {{a}^\dagger} \left({a}\right)^{2} {\sigma_+} - 2 g x^{2} {{a}^\dagger} {\sigma_-} - 2 g x^{2} \left({{a}^\dagger}\right)^{2} {a} {\sigma_-} - 2 g x^{2} {a} {\sigma_+} + g x + 2 g x {{a}^\dagger} {a} {\sigma_z} + g x {\sigma_z} + g {{a}^\dagger} {\sigma_-} + g {a} {\sigma_+} + \frac{\omega_{r} x^{4}}{4} {{a}^\dagger} {a} - \frac{\omega_{r} x^{3}}{2} {{a}^\dagger} {\sigma_-} - \frac{\omega_{r} x^{3}}{2} {a} {\sigma_+} + \frac{\omega_{r} x^{2}}{2} + \omega_{r} x^{2} {{a}^\dagger} {a} {\sigma_z} + \frac{\omega_{r} x^{2}}{2} {\sigma_z} + \omega_{r} x {{a}^\dagger} {\sigma_-} + \omega_{r} x {a} {\sigma_+} + \omega_{r} {{a}^\dagger} {a}$$
In [19]:
H2 = drop_terms_containing(H1.expand(), [x**3, x**4])

H2
Out[19]:
$$- \frac{\Omega x^{2}}{2} - \Omega x^{2} {{a}^\dagger} {a} {\sigma_z} - \frac{\Omega x^{2}}{2} {\sigma_z} - \Omega x {{a}^\dagger} {\sigma_-} - \Omega x {a} {\sigma_+} + \frac{\Omega {\sigma_z}}{2} - 2 g x^{2} {{a}^\dagger} \left({a}\right)^{2} {\sigma_+} - 2 g x^{2} {{a}^\dagger} {\sigma_-} - 2 g x^{2} \left({{a}^\dagger}\right)^{2} {a} {\sigma_-} - 2 g x^{2} {a} {\sigma_+} + g x + 2 g x {{a}^\dagger} {a} {\sigma_z} + g x {\sigma_z} + g {{a}^\dagger} {\sigma_-} + g {a} {\sigma_+} + \frac{\omega_{r} x^{2}}{2} + \omega_{r} x^{2} {{a}^\dagger} {a} {\sigma_z} + \frac{\omega_{r} x^{2}}{2} {\sigma_z} + \omega_{r} x {{a}^\dagger} {\sigma_-} + \omega_{r} x {a} {\sigma_+} + \omega_{r} {{a}^\dagger} {a}$$
In [20]:
H3 = H2.subs(x, g/Delta)

H3
Out[20]:
$$\frac{\Omega {\sigma_z}}{2} + g {{a}^\dagger} {\sigma_-} + g {a} {\sigma_+} + \omega_{r} {{a}^\dagger} {a} - \frac{\Omega g}{\Delta} {{a}^\dagger} {\sigma_-} - \frac{\Omega g}{\Delta} {a} {\sigma_+} + \frac{g^{2}}{\Delta} + \frac{2 g^{2}}{\Delta} {{a}^\dagger} {a} {\sigma_z} + \frac{g^{2} {\sigma_z}}{\Delta} + \frac{g \omega_{r}}{\Delta} {{a}^\dagger} {\sigma_-} + \frac{g \omega_{r}}{\Delta} {a} {\sigma_+} - \frac{\Omega g^{2}}{2 \Delta^{2}} - \frac{\Omega g^{2}}{\Delta^{2}} {{a}^\dagger} {a} {\sigma_z} - \frac{\Omega g^{2} {\sigma_z}}{2 \Delta^{2}} - \frac{2 g^{3}}{\Delta^{2}} {{a}^\dagger} \left({a}\right)^{2} {\sigma_+} - \frac{2 g^{3}}{\Delta^{2}} {{a}^\dagger} {\sigma_-} - \frac{2 g^{3}}{\Delta^{2}} \left({{a}^\dagger}\right)^{2} {a} {\sigma_-} - \frac{2 g^{3}}{\Delta^{2}} {a} {\sigma_+} + \frac{g^{2} \omega_{r}}{2 \Delta^{2}} + \frac{g^{2} \omega_{r}}{\Delta^{2}} {{a}^\dagger} {a} {\sigma_z} + \frac{g^{2} \omega_{r} {\sigma_z}}{2 \Delta^{2}}$$
In [21]:
H4 = drop_c_number_terms(H3)

H4
Out[21]:
$$\frac{\Omega {\sigma_z}}{2} + g {{a}^\dagger} {\sigma_-} + g {a} {\sigma_+} + \omega_{r} {{a}^\dagger} {a} - \frac{\Omega g}{\Delta} {{a}^\dagger} {\sigma_-} - \frac{\Omega g}{\Delta} {a} {\sigma_+} + \frac{2 g^{2}}{\Delta} {{a}^\dagger} {a} {\sigma_z} + \frac{g^{2} {\sigma_z}}{\Delta} + \frac{g \omega_{r}}{\Delta} {{a}^\dagger} {\sigma_-} + \frac{g \omega_{r}}{\Delta} {a} {\sigma_+} - \frac{\Omega g^{2}}{\Delta^{2}} {{a}^\dagger} {a} {\sigma_z} - \frac{\Omega g^{2} {\sigma_z}}{2 \Delta^{2}} - \frac{2 g^{3}}{\Delta^{2}} {{a}^\dagger} \left({a}\right)^{2} {\sigma_+} - \frac{2 g^{3}}{\Delta^{2}} {{a}^\dagger} {\sigma_-} - \frac{2 g^{3}}{\Delta^{2}} \left({{a}^\dagger}\right)^{2} {a} {\sigma_-} - \frac{2 g^{3}}{\Delta^{2}} {a} {\sigma_+} + \frac{g^{2} \omega_{r}}{\Delta^{2}} {{a}^\dagger} {a} {\sigma_z} + \frac{g^{2} \omega_{r} {\sigma_z}}{2 \Delta^{2}}$$
In [22]:
H5 = collect(H4, [Dagger(a) * a, sz])

H5
Out[22]:
$$g {{a}^\dagger} {\sigma_-} + g {a} {\sigma_+} + \left(\frac{\Omega}{2} + \frac{g^{2}}{\Delta} - \frac{\Omega g^{2}}{2 \Delta^{2}} + \frac{g^{2} \omega_{r}}{2 \Delta^{2}}\right) {\sigma_z} + {{a}^\dagger} {a} \left(\omega_{r} + \frac{2 g^{2}}{\Delta} {\sigma_z} - \frac{\Omega g^{2}}{\Delta^{2}} {\sigma_z} + \frac{g^{2} \omega_{r}}{\Delta^{2}} {\sigma_z}\right) - \frac{\Omega g}{\Delta} {{a}^\dagger} {\sigma_-} - \frac{\Omega g}{\Delta} {a} {\sigma_+} + \frac{g \omega_{r}}{\Delta} {{a}^\dagger} {\sigma_-} + \frac{g \omega_{r}}{\Delta} {a} {\sigma_+} - \frac{2 g^{3}}{\Delta^{2}} {{a}^\dagger} \left({a}\right)^{2} {\sigma_+} - \frac{2 g^{3}}{\Delta^{2}} {{a}^\dagger} {\sigma_-} - \frac{2 g^{3}}{\Delta^{2}} \left({{a}^\dagger}\right)^{2} {a} {\sigma_-} - \frac{2 g^{3}}{\Delta^{2}} {a} {\sigma_+}$$

Now move to a frame co-rotating with the qubit and oscillator frequencies:

In [23]:
H5.expand()
Out[23]:
$$\frac{\Omega {\sigma_z}}{2} + g {{a}^\dagger} {\sigma_-} + g {a} {\sigma_+} + \omega_{r} {{a}^\dagger} {a} - \frac{\Omega g}{\Delta} {{a}^\dagger} {\sigma_-} - \frac{\Omega g}{\Delta} {a} {\sigma_+} + \frac{2 g^{2}}{\Delta} {{a}^\dagger} {a} {\sigma_z} + \frac{g^{2} {\sigma_z}}{\Delta} + \frac{g \omega_{r}}{\Delta} {{a}^\dagger} {\sigma_-} + \frac{g \omega_{r}}{\Delta} {a} {\sigma_+} - \frac{\Omega g^{2}}{\Delta^{2}} {{a}^\dagger} {a} {\sigma_z} - \frac{\Omega g^{2} {\sigma_z}}{2 \Delta^{2}} - \frac{2 g^{3}}{\Delta^{2}} {{a}^\dagger} \left({a}\right)^{2} {\sigma_+} - \frac{2 g^{3}}{\Delta^{2}} {{a}^\dagger} {\sigma_-} - \frac{2 g^{3}}{\Delta^{2}} \left({{a}^\dagger}\right)^{2} {a} {\sigma_-} - \frac{2 g^{3}}{\Delta^{2}} {a} {\sigma_+} + \frac{g^{2} \omega_{r}}{\Delta^{2}} {{a}^\dagger} {a} {\sigma_z} + \frac{g^{2} \omega_{r} {\sigma_z}}{2 \Delta^{2}}$$
In [24]:
U = exp(I * omega_r * t * Dagger(a) * a)
In [25]:
H6 = hamiltonian_transformation(U, H5.expand()); H6
Out[25]:
$$\frac{\Omega {\sigma_z}}{2} + g e^{i \omega_{r} t} {{a}^\dagger} {\sigma_-} + g e^{- i \omega_{r} t} {a} {\sigma_+} - \frac{\Omega g}{\Delta} e^{i \omega_{r} t} {{a}^\dagger} {\sigma_-} - \frac{\Omega g}{\Delta} e^{- i \omega_{r} t} {a} {\sigma_+} + \frac{2 g^{2}}{\Delta} {{a}^\dagger} {a} {\sigma_z} + \frac{g^{2} {\sigma_z}}{\Delta} + \frac{g \omega_{r}}{\Delta} e^{i \omega_{r} t} {{a}^\dagger} {\sigma_-} + \frac{g \omega_{r}}{\Delta} e^{- i \omega_{r} t} {a} {\sigma_+} - \frac{\Omega g^{2}}{\Delta^{2}} {{a}^\dagger} {a} {\sigma_z} - \frac{\Omega g^{2} {\sigma_z}}{2 \Delta^{2}} - \frac{2 g^{3}}{\Delta^{2}} e^{i \omega_{r} t} {{a}^\dagger} {\sigma_-} - \frac{2 g^{3}}{\Delta^{2}} e^{i \omega_{r} t} \left({{a}^\dagger}\right)^{2} {a} {\sigma_-} - \frac{2 g^{3}}{\Delta^{2}} e^{- i \omega_{r} t} {{a}^\dagger} \left({a}\right)^{2} {\sigma_+} - \frac{2 g^{3}}{\Delta^{2}} e^{- i \omega_{r} t} {a} {\sigma_+} + \frac{g^{2} \omega_{r}}{\Delta^{2}} {{a}^\dagger} {a} {\sigma_z} + \frac{g^{2} \omega_{r} {\sigma_z}}{2 \Delta^{2}}$$
In [26]:
U = exp(I * Omega * t * Dagger(sm) * sm)
In [27]:
H7 = hamiltonian_transformation(U, H6.expand()); H7
Out[27]:
$$- \Omega {\sigma_+} {\sigma_-} + \frac{\Omega {\sigma_z}}{2} + g e^{i \Omega t} e^{- i \omega_{r} t} {a} {\sigma_+} + g e^{- i \Omega t} e^{i \omega_{r} t} {{a}^\dagger} {\sigma_-} - \frac{\Omega g}{\Delta} e^{i \Omega t} e^{- i \omega_{r} t} {a} {\sigma_+} - \frac{\Omega g}{\Delta} e^{- i \Omega t} e^{i \omega_{r} t} {{a}^\dagger} {\sigma_-} + \frac{2 g^{2}}{\Delta} {{a}^\dagger} {a} {\sigma_z} + \frac{g^{2} {\sigma_z}}{\Delta} + \frac{g \omega_{r}}{\Delta} e^{i \Omega t} e^{- i \omega_{r} t} {a} {\sigma_+} + \frac{g \omega_{r}}{\Delta} e^{- i \Omega t} e^{i \omega_{r} t} {{a}^\dagger} {\sigma_-} - \frac{\Omega g^{2}}{\Delta^{2}} {{a}^\dagger} {a} {\sigma_z} - \frac{\Omega g^{2} {\sigma_z}}{2 \Delta^{2}} - \frac{2 g^{3}}{\Delta^{2}} e^{i \Omega t} e^{- i \omega_{r} t} {{a}^\dagger} \left({a}\right)^{2} {\sigma_+} - \frac{2 g^{3}}{\Delta^{2}} e^{i \Omega t} e^{- i \omega_{r} t} {a} {\sigma_+} - \frac{2 g^{3}}{\Delta^{2}} e^{- i \Omega t} e^{i \omega_{r} t} {{a}^\dagger} {\sigma_-} - \frac{2 g^{3}}{\Delta^{2}} e^{- i \Omega t} e^{i \omega_{r} t} \left({{a}^\dagger}\right)^{2} {a} {\sigma_-} + \frac{g^{2} \omega_{r}}{\Delta^{2}} {{a}^\dagger} {a} {\sigma_z} + \frac{g^{2} \omega_{r} {\sigma_z}}{2 \Delta^{2}}$$

Now, since we are in the dispersive regime $|\Omega-\omega_r| \gg g$, we can do a rotating-wave approximation and drop all the fast rotating terms in the Hamiltonian above:

In [28]:
H8 = drop_terms_containing(H7, [exp(I * omega_r * t), exp(-I * omega_r * t),
                                exp(I * Omega * t), exp(-I * Omega * t)])

H8
Out[28]:
$$- \Omega {\sigma_+} {\sigma_-} + \frac{\Omega {\sigma_z}}{2} + \frac{2 g^{2}}{\Delta} {{a}^\dagger} {a} {\sigma_z} + \frac{g^{2} {\sigma_z}}{\Delta} - \frac{\Omega g^{2}}{\Delta^{2}} {{a}^\dagger} {a} {\sigma_z} - \frac{\Omega g^{2} {\sigma_z}}{2 \Delta^{2}} + \frac{g^{2} \omega_{r}}{\Delta^{2}} {{a}^\dagger} {a} {\sigma_z} + \frac{g^{2} \omega_{r} {\sigma_z}}{2 \Delta^{2}}$$
In [29]:
H9 = qsimplify(H8)

H9 = collect(H9, [Dagger(a) * a, sz])

H9
Out[29]:
$$- \frac{\Omega}{2} + \left(\frac{g^{2}}{\Delta} - \frac{\Omega g^{2}}{2 \Delta^{2}} + \frac{g^{2} \omega_{r}}{2 \Delta^{2}}\right) {\sigma_z} + {{a}^\dagger} {a} \left(\frac{2 g^{2}}{\Delta} {\sigma_z} - \frac{\Omega g^{2}}{\Delta^{2}} {\sigma_z} + \frac{g^{2} \omega_{r}}{\Delta^{2}} {\sigma_z}\right)$$

Now move back to the lab frame:

In [30]:
U = exp(-I * omega_r * t * Dagger(a) * a)
In [31]:
H10 = hamiltonian_transformation(U, H9.expand()); H10
Out[31]:
$$- \frac{\Omega}{2} + \omega_{r} {{a}^\dagger} {a} + \frac{2 g^{2}}{\Delta} {{a}^\dagger} {a} {\sigma_z} + \frac{g^{2} {\sigma_z}}{\Delta} - \frac{\Omega g^{2}}{\Delta^{2}} {{a}^\dagger} {a} {\sigma_z} - \frac{\Omega g^{2} {\sigma_z}}{2 \Delta^{2}} + \frac{g^{2} \omega_{r}}{\Delta^{2}} {{a}^\dagger} {a} {\sigma_z} + \frac{g^{2} \omega_{r} {\sigma_z}}{2 \Delta^{2}}$$
In [32]:
U = exp(-I * Omega * t * Dagger(sm) * sm)
In [33]:
H11 = hamiltonian_transformation(U, H10.expand()); H11
Out[33]:
$$- \frac{\Omega}{2} + \Omega {\sigma_+} {\sigma_-} + \omega_{r} {{a}^\dagger} {a} + \frac{2 g^{2}}{\Delta} {{a}^\dagger} {a} {\sigma_z} + \frac{g^{2} {\sigma_z}}{\Delta} - \frac{\Omega g^{2}}{\Delta^{2}} {{a}^\dagger} {a} {\sigma_z} - \frac{\Omega g^{2} {\sigma_z}}{2 \Delta^{2}} + \frac{g^{2} \omega_{r}}{\Delta^{2}} {{a}^\dagger} {a} {\sigma_z} + \frac{g^{2} \omega_{r} {\sigma_z}}{2 \Delta^{2}}$$
In [34]:
H12 = qsimplify(H11)

H12 = collect(H12, [Dagger(a) * a, sz])

H12 = H12.subs(omega_r, Omega-Delta).expand().collect([Dagger(a)*a, sz]).subs(Omega-Delta,omega_r)

Eq(Hsym, H12)
Out[34]:
$$H = \left(\frac{\Omega}{2} + \frac{g^{2}}{2 \Delta}\right) {\sigma_z} + {{a}^\dagger} {a} \left(\omega_{r} + \frac{g^{2} {\sigma_z}}{\Delta}\right)$$

This is the Hamiltonian of the Jaynes-Cummings model in the the dispersive regime. It can be interpreted as the resonator having a qubit-state-dependent frequency shift, or alternatively that the qubit is feeling a resonator-photon-number dependent Stark-shift.

Versions

In [35]:
%reload_ext version_information

%version_information sympy, sympsi
Out[35]:
SoftwareVersion
Python3.4.1 (default, Sep 20 2014, 19:44:17) [GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)]
IPython2.1.0
OSDarwin 13.4.0 x86_64 i386 64bit
sympy0.7.5-git
sympsi0.1.0.dev-9060485
Thu Oct 09 16:25:51 2014 JST