Skip to content

tomdbar/rb-cqed

Repository files navigation

rb-cqed

Generic badge Generic badge Generic badge MIT License


This repository contains the rb_cqed package for modelling cavity-QED. This allows for easy simulations of coupled emitter-cavity system.


alt text alt text

Beyond simple toy models, the focus is on the production of single photons from a single 87Rb atom coupled to a cavity using a vacuum-stimulated Raman adiabatic passage (vSTIRAP) process on the D2 line.

In particular these models include a two effects (and supported the corresponding work) that have not been previously considered in such as system:

  • Nonlinear Zeeman effects that modify the energy levels and coupling strengths of the excited manifold of the D2 line [1].
  • Cavity birefringence, where the polarisation eigenmodes of the cavity are non-degenerate [2,3].

alt text alt text alt text

Also contained is a collection of IPython notebooks, supported by Mathematica notebooks, that both serve as a short introduction to the package, and examples of more detailed simulations.

References

[1] Barrett, T. D. et al., Nonlinear Zeeman effects in the cavity-enhanced emission of polarised photons, New J. Phys 20, 073030 (2018).

[2] Barrett, T. D. et al., Polarisation oscillations in birefringent emitter-cavity systems, Phys. Rev. Lett. 122, 083602 (2019).

[3] Barrett, T. D. et al., Pushing Purcell-enhancement beyond its limits, arxiv:1903.08628 (2019)New J. Phys 22, 063013 (2020).

Installation

The models run on QuTiP. Specifically the package was developed using version 4.3.1, and more recent versions may not be compatible.

To install rb_cqed locally, first you must prepare a suitable environment (this assumes you are using conda and have the appropriate conda-forge channel avaialble).

Minimum requirements:

>>> conda create -n [env-name] python==3.6 qutip==4.3.1

Recommended requirements:

>>> conda create -n [env-name] python==3.6 qutip==4.3.1 gcc jupyter nb_conda

Then download and install the rb_cqed package from this repository.

(env-name) >>> pip install [path ro rb_cqed]

The test scripts can then be used to ensure the install was successful.

(env-name) >>> import rb_cqed.testing as rt
(env-name) >>> rt.run()

Repository contents

Demonstration notebooks showing the basic functionality of rb_cqed. Learn by doing - these serve as the documentation!

The notebooks in jupyter_notebooks/notebooks-single provide the gritty details of the code for simulating these systems. They are not the easiest or recommended way to run the models. Instead, the object oriented approach demonstrated in jupyter_notebooks/rb_cqed_demos/ is recommended.

The IPython notebooks in jupyter_notebooks/notebooks-single contain considerable overlap with one another and can best be thought of as multiple versions of the same notebook, tailored towards modelling variations of our atom-cavity system. Although specific functionality is included in only some of the notebooks (i.e. where I think it is most useful), it is a straightforward task to mix-and-match this for a custom model that you might be interested in.

  • vStirap-zeeman-scheme.ipyn - For models that use all (or any subset) of the excited manifold and only the ground F=1,m_F={0,+/-1} sublevels. As driving tranistions between these magentic sublevels often reuqires an external field to lift their degeneracy, nonlinear Zeeman effects are included along with cavity birefringence effects.

  • vStirap-hyperfine-scheme.ipyn - For models that use all (or any subset) of both the excited and ground state manifolds. Nonlinear Zeeman effects are included as above, however as all atomic levels can, in principle, be included in the model cavity birefringence effects are neglected in order that the dimension of our modelled Hilbert space does not get too unwieldy. Additionally this notebook contains some examples of driving two-laser STIRAP transitions, where the cavity coupling is not required, to prepare or repump the atom in the desired state. Some simple analysis of the system evolution for many emission+rempumping cycles is also included.

There are additionally notebooks serving some of the same functionality in jupyter_notebooks/notebooks-single/c-pulses folder. As the name suggests, these allow the laser pulses to be given as C functions, greatly increasing the speed of the simulations for certain pulse shapes.

The notebooks in the mathematica_notebooks folder are not required to run the above models, however they are used to support the model. Specifically:

  • hamiltonian-derivation.nb - Details the derivation of the Hamiltonians used to model the system. Hopefully this demystifies the relatively complex couplings hardcoded into the IPython notebooks!

  • 87rb-d2-in-B-field.nb - Models the level structure and coupling strengths of the 87Rb D2 line in the presence of an exteral magnetic field. This notebook produces the parameter files in the params folder, which in turn are imported into the vStirap-xxx-scheme.ipyn notebooks to include nonlinear Zeeman effects.

  • cavity-parameters - A simple helper notebook that calculates the cavity parameters used in our models (such as the linewidth and atom-cavity coupling rates) from physical parameters such as the cavity length, mirror curvatures and so on. This is intendned to assist in choosing physically realistic cavity parameters in the notebooks in which they are not derived.

Requirements

Other than standard libraries (numpy, matplotlib etc.) the IPython notebooks require the QuTiP package, version 4.3.1. An environment.yml file is provided in the supplementary/ folder.

For Mathematica, 87rb-d2-in-B-field.nb requires the Atomic Density Matrix (ADM) package.

Patch for QuTiP as of 05/09/2018

Please note, the below is my speculation, I don't pretend to know the QuTiP package in detail, but for what it is worth...

As of QuTiP 4.3.1 I believe there is an issue with the rhs_generate function, which my notebooks use to generate the cython file for simulating the Hamiltonians. The mesolve function seems to work as intended, however this is much slower when repeated simulating the same Hamiltonian with only changing variables. After my own investigation I resolved the issue by changing lines 202-207 of rhs_generate from:

 # add the constant part of the lagrangian
 if Lconst != 0:
     Ldata.append(Lconst.data.data)
     Linds.append(Lconst.data.indices)
     Lptrs.append(Lconst.data.indptr)
     Lcoeff.append("1.0")

to

 # add the constant part of the lagrangian
 if Lconst != 0:
     Ldata = [Lconst.data.data]+Ldata
     Linds = [Lconst.data.indices]+Linds
     Lptrs = [Lconst.data.indptr]+Lptrs
     Lcoeff = ["1.0"]+Lcoeff

If you have similar issues I suggest you try the above, or alternatively use the rhs_generate.py file provided, where I have already made the change.