a framework for simulating open quantum dynamics


C++QED is a framework for simulating open quantum dynamics in general. Historically, it has in the first place been developed for problems in moving-particle cavity QED, but since then has been applied in several other fields in quantum optics. It is known to be able to simulate full Master equation up to several thousand, and quantum trajectories up to several hundred thousand dimensions.

The basic idea of the framework is to allow users to build arbitrarily complex interacting quantum systems from elementary free subsystems and interactions between them (these are commonly referred to as elements), and simulate their time evolution with a number of available time-evolution drivers. Operating with elementary physical systems, the interface is of much higher level than in the popular Quantum Optics toolbox for Matlab [1], or the much less known, but venerable QSD C++ library [2], as in the latter two the interface is built on quantum operators.

C++QED specifies a small grammar to describe composite quantum systems, which qualifies as a domain specific language (in this case embedded into C++). Apart from providing a number of elements out of the box, there are several tools which facilitate the implementation of new elements. These are being added continuously, on demand from the quantum-optics community.

As of today, the following possibilities for time evolution are provided in the framework:

Full Master equation
Single MCWF trajectory
We use a modification of the original method with higher order adaptive stepsize time evolution.
Ensemble of quantum (at present, MCWF) trajectories

A number of other methods, e.g. the quantum state diffusion, can be easily incorporated into the framework. Note that in the case when the probability of quantum jumps vanishes, the MCWF method reduces to the simulation of the Schroedinger equation, so that the latter is naturally available in the framework.


Performance issues

The framework is very sensitive to performance both in terms of computer resources and coding/design. In the latter aspect the goal, as always in software design, is to create maximally reusable code. In the former aspect, there are physical and computational methods to increase performance. Among the physical ones, the most notable is the maximal use of interaction picture, which may help to get rid of very separate timescales in the problem. Among the computational ones we can mention

  • Maximal exploitation of special operator structures, i.e., sparse and tridiagonal matrices
  • The use of adaptive-stepsize methods for evolving ordinary differential equations
  • Judicious use of memory


Analysis and Visualization

For fast and easy interpretation of the data produced by C++QED there exists a python library called PyCppQED which automatizes this task as far as possible. It also provides functions for creating convenient initial statevectors which then can be passed on to C++QED.


The first release of the framework has been partially documented in a journal article [3], which still applies from the physics point of view.

There is a new tutorial for the second release, and a full (reference or extenders') manual is in preparation.

For PyCppQED there exists a tutorial and a complete reference. It can be downloaded from github.


C++QED is an open source project hosted by SourceForge.net, cf. the project homepage for downloads.

PyCppQED is developed on github but releases can also be found on the sourceforge project homepage of C++QED.

Contact the developers

Any questions, remarks, comments, etc. are welcome.


[1] S. M. Tan, A computational toolbox for quantum and atomic optics, J. Opt. B, 1, 424, (1999)

[2] R. Schack and T. A. Brun, A C++ library using quantum trajectories to solve quantum master equations, Comp. Phys. Commun., 102, 210, (1997)

[3] A. Vukics and H. Ritsch, C++QED: an object-oriented framework for wave-function simulations of cavity QED systems, Eur. Phys. J. D, 44, 585, (2007)

Nach oben scrollen