# Lecture 5 - Symbolic quantum mechanics using SymPsi - Optomechanics¶

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

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.operatorordering import *


## Optomechanical system¶

Consider the standard Hamiltonian for an optomechanical system, including a classical driving signal on the optical mode:

$$H = \hbar\omega_a a^\dagger a + \hbar \omega_b b^\dagger b - \hbar g a^\dagger a (b + b^\dagger) + (A e^{-i\omega_d t} + A^* e^{i\omega_d t})(a + a^\dagger)$$
In [3]:
omega_a, omega_b, g, A, Delta, t = symbols("omega_a, omega_b, g, A, Delta, t", positive=True)
Hsym, omega_d = symbols("H, omega_d")

In [4]:
a, b = BosonOp("a"), BosonOp("b")

In [5]:
H0 = omega_a * Dagger(a) * a + omega_b * Dagger(b) * b - g * Dagger(a) * a * (b + Dagger(b))

Hdrive = (A * exp(-I * omega_d * t) + conjugate(A) * exp(I * omega_d * t)) * (a + Dagger(a))

H = H0 + Hdrive

Eq(Hsym, H)

Out[5]:
$$H = - g {{a}^\dagger} {a} \left({{b}^\dagger} + {b}\right) + \omega_{a} {{a}^\dagger} {a} + \omega_{b} {{b}^\dagger} {b} + \left(A e^{i \omega_{d} t} + A e^{- i \omega_{d} t}\right) \left({{a}^\dagger} + {a}\right)$$

### Linearized interaction¶

First we apply the unitary transformation $U = e^{i \omega_d a^\dagger a t}$:

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

U

Out[6]:
$$e^{i \omega_{d} t {{a}^\dagger} {a}}$$
In [7]:
H1 = hamiltonian_transformation(U, H, independent=True)

H1

Out[7]:
$$- g {{a}^\dagger} {a} \left({{b}^\dagger} + {b}\right) + \omega_{a} {{a}^\dagger} {a} + \omega_{b} {{b}^\dagger} {b} - \omega_{d} {{a}^\dagger} {a} + \left(A e^{i \omega_{d} t} + A e^{- i \omega_{d} t}\right) \left(e^{i \omega_{d} t} {{a}^\dagger} + e^{- i \omega_{d} t} {a}\right)$$

We can now perform a rotating-wave approximation (RWA) by eliminating all terms that rotate with frequencies $2\omega_d$:

In [8]:
H2 = drop_terms_containing(H1.expand(), [exp(-2*I*omega_d*t), exp(2*I*omega_d*t)])

Eq(Symbol("H_{rwa}"), H2)

Out[8]:
$$H_{{rwa}} = A {{a}^\dagger} + A {a} - g {{a}^\dagger} {a} {{b}^\dagger} - g {{a}^\dagger} {a} {b} + \omega_{a} {{a}^\dagger} {a} + \omega_{b} {{b}^\dagger} {b} - \omega_{d} {{a}^\dagger} {a}$$

Introduce the detuning $\Delta = \omega_a - \omega_d$:

In [9]:
H3 = H2.subs(omega_a, Delta + omega_d).expand()

H3

Out[9]:
$$A {{a}^\dagger} + A {a} + \Delta {{a}^\dagger} {a} - g {{a}^\dagger} {a} {{b}^\dagger} - g {{a}^\dagger} {a} {b} + \omega_{b} {{b}^\dagger} {b}$$

To eliminate the coherent part of the state of the cavity mode we apply the unitary displacement operator $U = e^{\alpha a^\dagger - \alpha^*a}$:

In [10]:
alpha = symbols("alpha")

In [11]:
UH = Dagger(a) * alpha - conjugate(alpha) * a
U = exp(UH)

U

Out[11]:
$$e^{\alpha {{a}^\dagger} - \overline{\alpha} {a}}$$
In [12]:
H4 = hamiltonian_transformation(U, H3, independent=True)

H4

Out[12]:
$$A \left(- \alpha + {a}\right) + A \left(- \overline{\alpha} + {{a}^\dagger}\right) + \Delta \left(- \overline{\alpha} + {{a}^\dagger}\right) \left(- \alpha + {a}\right) - g \left(- \overline{\alpha} + {{a}^\dagger}\right) \left(- \alpha + {a}\right) {{b}^\dagger} - g \left(- \overline{\alpha} + {{a}^\dagger}\right) \left(- \alpha + {a}\right) {b} + \omega_{b} {{b}^\dagger} {b}$$

Now want to cancel out the drivng terms so we set $A - \Delta \alpha = 0$, i.e. $\alpha = A/\Delta$:

In [13]:
H5 = H4.expand().subs({A: alpha * Delta, conjugate(alpha): alpha})

H5 = collect(H5, [g * Dagger(a) * a, - alpha * g])

H5

Out[13]:
$$- \Delta \alpha^{2} + \Delta {{a}^\dagger} {a} + \alpha^{2} g \left(- {{b}^\dagger} - {b}\right) + \alpha g \left({{a}^\dagger} {{b}^\dagger} + {{a}^\dagger} {b} + {a} {{b}^\dagger} + {a} {b}\right) + g {{a}^\dagger} {a} \left(- {{b}^\dagger} - {b}\right) + \omega_{b} {{b}^\dagger} {b}$$

Drop C-numbers from the Hamiltonian:

In [14]:
H6 = drop_c_number_terms(H5)

H6

Out[14]:
$$\Delta {{a}^\dagger} {a} + \alpha^{2} g \left(- {{b}^\dagger} - {b}\right) + \alpha g \left({{a}^\dagger} {{b}^\dagger} + {{a}^\dagger} {b} + {a} {{b}^\dagger} + {a} {b}\right) + g {{a}^\dagger} {a} \left(- {{b}^\dagger} - {b}\right) + \omega_{b} {{b}^\dagger} {b}$$

Now, if driving strength is large, so that $\alpha \gg 1$, we can drop the nonlinear interaction term, and we have an linear effective coupling:

In [15]:
H7 = H6.subs(g * Dagger(a) * a, 0)

e = (a + Dagger(a)) * (b + Dagger(b))
H7 = H7.subs(e.expand(), e)

Eq(Hsym, H7)

Out[15]:
$$H = \Delta {{a}^\dagger} {a} + \alpha^{2} g \left(- {{b}^\dagger} - {b}\right) + \alpha g \left({{a}^\dagger} + {a}\right) \left({{b}^\dagger} + {b}\right) + \omega_{b} {{b}^\dagger} {b}$$

This linearlized optomechanical Hamiltonian has at least two interesting regimes:

### Red sideband¶

The red sideband regime occurs when the detuning is $\Delta = \omega_b$. In this case, if we move to a frame rotating with the driving field, we obtain:

In [16]:
H1 = H7
H1

Out[16]:
$$\Delta {{a}^\dagger} {a} + \alpha^{2} g \left(- {{b}^\dagger} - {b}\right) + \alpha g \left({{a}^\dagger} + {a}\right) \left({{b}^\dagger} + {b}\right) + \omega_{b} {{b}^\dagger} {b}$$
In [17]:
U = exp(I * Dagger(a) * a * Delta * t)
U

Out[17]:
$$e^{i \Delta t {{a}^\dagger} {a}}$$
In [18]:
H2 = hamiltonian_transformation(U, H1, independent=True)
H2

Out[18]:
$$\alpha^{2} g \left(- {{b}^\dagger} - {b}\right) + \alpha g \left(e^{i \Delta t} {{a}^\dagger} + e^{- i \Delta t} {a}\right) \left({{b}^\dagger} + {b}\right) + \omega_{b} {{b}^\dagger} {b}$$
In [19]:
U = exp(I * Dagger(b) * b * omega_b * t)
U

Out[19]:
$$e^{i \omega_{b} t {{b}^\dagger} {b}}$$
In [20]:
H3 = hamiltonian_transformation(U, H2, independent=True)
H3

Out[20]:
$$\alpha^{2} g \left(- e^{i \omega_{b} t} {{b}^\dagger} - e^{- i \omega_{b} t} {b}\right) + \alpha g \left(e^{i \Delta t} {{a}^\dagger} + e^{- i \Delta t} {a}\right) \left(e^{i \omega_{b} t} {{b}^\dagger} + e^{- i \omega_{b} t} {b}\right)$$

If we substitute $\Delta = \omega_b$ we get:

In [21]:
H4 = H3.expand().subs(Delta, omega_b)
H4

Out[21]:
$$- \alpha^{2} g e^{i \omega_{b} t} {{b}^\dagger} - \alpha^{2} g e^{- i \omega_{b} t} {b} + \alpha g e^{2 i \omega_{b} t} {{a}^\dagger} {{b}^\dagger} + \alpha g {{a}^\dagger} {b} + \alpha g {a} {{b}^\dagger} + \alpha g e^{- 2 i \omega_{b} t} {a} {b}$$

Now we can do a rotating-wave approximation and get rid of terms rotating at angular frequencies $2\omega_b$, and then transform back to the original frame:

In [22]:
H5 = drop_terms_containing(H4, [exp(+2 * I * omega_b * t), exp(-2 * I * omega_b * t)])
H5

Out[22]:
$$- \alpha^{2} g e^{i \omega_{b} t} {{b}^\dagger} - \alpha^{2} g e^{- i \omega_{b} t} {b} + \alpha g {{a}^\dagger} {b} + \alpha g {a} {{b}^\dagger}$$
In [23]:
U = exp(-I * Dagger(a) * a * omega_b * t)  # Delta = omega_b
H6 = hamiltonian_transformation(U, H5, independent=True)
U = exp(-I * Dagger(b) * b * omega_b * t)
H7 = hamiltonian_transformation(U, H6, independent=True)
H7 = collect(H7, [alpha**2, g])
H7

Out[23]:
$$\alpha^{2} \left(- g {{b}^\dagger} - g {b}\right) + \alpha \left(g {{a}^\dagger} {b} + g {a} {{b}^\dagger}\right) + \omega_{b} {{a}^\dagger} {a} + \omega_{b} {{b}^\dagger} {b}$$

Now the interaction term is $a^\dagger b + ab^\dagger$, which is a swapping interaction that can be used for state transfer or energy transfer in for example cooling application (side-band cooling).

### Blue sideband¶

If, instead, we choose a driving frequency such that $\Delta = -\omega_b$, we obtain:

In [24]:
H4 = H3.expand().subs(Delta, -omega_b)
H4

Out[24]:
$$- \alpha^{2} g e^{i \omega_{b} t} {{b}^\dagger} - \alpha^{2} g e^{- i \omega_{b} t} {b} + \alpha g e^{2 i \omega_{b} t} {a} {{b}^\dagger} + \alpha g {{a}^\dagger} {{b}^\dagger} + \alpha g {a} {b} + \alpha g e^{- 2 i \omega_{b} t} {{a}^\dagger} {b}$$

As before, we do a rotating-wave approximation to get rid of fast oscillating terms:

In [25]:
H5 = drop_terms_containing(H4, [exp(+2 * I * omega_b * t), exp(-2 * I * omega_b * t)])
H5

Out[25]:
$$- \alpha^{2} g e^{i \omega_{b} t} {{b}^\dagger} - \alpha^{2} g e^{- i \omega_{b} t} {b} + \alpha g {{a}^\dagger} {{b}^\dagger} + \alpha g {a} {b}$$

and moving back to the original frame results in:

In [26]:
U = exp( I * Dagger(a) * a * omega_b * t)  # Delta = -omega_b
H6 = hamiltonian_transformation(U, H5, independent=True)
U = exp(-I * Dagger(b) * b * omega_b * t)
H7 = hamiltonian_transformation(U, H6, independent=True)
H7 = collect(H7, [alpha**2, g])
H7

Out[26]:
$$\alpha^{2} \left(- g {{b}^\dagger} - g {b}\right) + \alpha \left(g {{a}^\dagger} {{b}^\dagger} + g {a} {b}\right) - \omega_{b} {{a}^\dagger} {a} + \omega_{b} {{b}^\dagger} {b}$$

Here, instead of a swap interaction we have obtained an interaction on the form $a^\dagger b^\dagger + a b$, which is the parametric amplification Hamiltonian. It can be used to parametrically amplify the states of the optical and mechanical modes, and generated interesting nonclassical states like Schrodinger-cat states.

## Nonlinear regime: effective Kerr nonlinearity¶

In the regime where $g \sim \omega_b$, the effect of the coupling to the mechanical mode $b$ on the optical mode $a$ is an effective Kerr-nonlinearity, i.e., a term on the form $(a^\dagger a)^2$ in the Hamiltonian. To see this we can perform the so-called polariton defined by the unitary

$$U = \exp\left(-\frac{g}{\omega_b} a^\dagger a (b^\dagger - b)\right)$$
In [27]:
H0

Out[27]:
$$- g {{a}^\dagger} {a} \left({{b}^\dagger} + {b}\right) + \omega_{a} {{a}^\dagger} {a} + \omega_{b} {{b}^\dagger} {b}$$
In [28]:
x = symbols("x")

In [29]:
U = exp(- x * Dagger(a) * a * (Dagger(b) - b))

U

Out[29]:
$$e^{- x {{a}^\dagger} {a} \left({{b}^\dagger} - {b}\right)}$$
In [30]:
H1 = H0.subs(A, 0)

H1

Out[30]:
$$- g {{a}^\dagger} {a} \left({{b}^\dagger} + {b}\right) + \omega_{a} {{a}^\dagger} {a} + \omega_{b} {{b}^\dagger} {b}$$
In [31]:
H2 = hamiltonian_transformation(U, H1, independent=True, expansion_search=False, N=2)

H3 = normal_ordered_form(H2.expand(), independent=True)

H3

Out[31]:
$$- 2 g x^{3} {{a}^\dagger} {a} + 2 g x^{3} {{a}^\dagger} {a} \left({b}\right)^{2} - 4 g x^{3} {{a}^\dagger} {{b}^\dagger} {a} {b} + 2 g x^{3} {{a}^\dagger} \left({{b}^\dagger}\right)^{2} {a} - 2 g x^{3} \left({{a}^\dagger}\right)^{2} \left({a}\right)^{2} + 2 g x^{3} \left({{a}^\dagger}\right)^{2} \left({a}\right)^{2} \left({b}\right)^{2} - 4 g x^{3} \left({{a}^\dagger}\right)^{2} {{b}^\dagger} \left({a}\right)^{2} {b} + 2 g x^{3} \left({{a}^\dagger}\right)^{2} \left({{b}^\dagger}\right)^{2} \left({a}\right)^{2} + g x^{2} {{a}^\dagger} {a} {b} + g x^{2} {{a}^\dagger} {a} \left({b}\right)^{3} - 3 g x^{2} {{a}^\dagger} {{b}^\dagger} {a} - g x^{2} {{a}^\dagger} {{b}^\dagger} {a} \left({b}\right)^{2} - g x^{2} {{a}^\dagger} \left({{b}^\dagger}\right)^{2} {a} {b} + g x^{2} {{a}^\dagger} \left({{b}^\dagger}\right)^{3} {a} - 2 g x {{a}^\dagger} {a} - 2 g x \left({{a}^\dagger}\right)^{2} \left({a}\right)^{2} - g {{a}^\dagger} {a} {b} - g {{a}^\dagger} {{b}^\dagger} {a} + \omega_{a} x^{2} {{a}^\dagger} {a} - \omega_{a} x^{2} {{a}^\dagger} {a} \left({b}\right)^{2} + 2 \omega_{a} x^{2} {{a}^\dagger} {{b}^\dagger} {a} {b} - \omega_{a} x^{2} {{a}^\dagger} \left({{b}^\dagger}\right)^{2} {a} + \omega_{a} {{a}^\dagger} {a} + \omega_{b} x^{2} {{a}^\dagger} {a} + \omega_{b} x^{2} \left({{a}^\dagger}\right)^{2} \left({a}\right)^{2} + \omega_{b} x {{a}^\dagger} {a} {b} + \omega_{b} x {{a}^\dagger} {{b}^\dagger} {a} + \omega_{b} {{b}^\dagger} {b}$$
In [32]:
H4 = H3.subs({x**2: 0, x**3: 0, x: g/omega_b})  # neglect higher order terms

H4 = collect(H4, Dagger(a)*a)

H4

Out[32]:
$$- \frac{2 g^{2}}{\omega_{b}} \left({{a}^\dagger}\right)^{2} \left({a}\right)^{2} + \omega_{b} {{b}^\dagger} {b} + \left(- \frac{2 g^{2}}{\omega_{b}} + \omega_{a}\right) {{a}^\dagger} {a}$$

In this Hamiltonian, the mechanical and optical mode is effectively decoupled, but the influence of the mechanical mode on the optical mode is described by the induced Kerr nonlinearity for the optical mode.

## Versions¶

In [33]:
%reload_ext version_information

%version_information sympy, sympsi

Out[33]:
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.3.0
OSDarwin 13.4.0 x86_64 i386 64bit
sympy0.7.5-git
sympsi0.1.0.dev-0c6e514
Thu Oct 09 16:16:53 2014 JST