Abstract

The v2 Milestone 10 release of C++QED is primarily a feature release, which also corrects some problems of the previous release, especially as regards the build system. The adoption of C++11 features has led to many simplifications in the codebase. A full doxygen-based API manual [1] is now provided together with updated user guides. A largely automated, versatile new testsuite directed both towards computational and physics features allows for quickly spotting arising errors. The states of trajectories are now savable and recoverable with full binary precision, allowing for trajectory continuation regardless of evolution method (single/ensemble Monte Carlo wave-function or Master equation trajectory). As the main new feature, the framework now presents Python bindings to the highest-level programming interface, so that actual simulations for given composite quantum systems can now be performed from Python. New version program summaryProgram title: C++QEDCatalogue identifier: AELU_v2_0Program summary URL:http://cpc.cs.qub.ac.uk/summaries/AELU_v2_0.htmlProgram obtainable from: CPC Program Library, Queen’s University, Belfast, N. IrelandLicensing provisions: yesNo. of lines in distributed program, including test data, etc.: 492422No. of bytes in distributed program, including test data, etc.: 8070987Distribution format: tar.gzProgramming language: C++/Python.Computer: i386-i686, x86 64.Operating system: In principle cross-platform, as yet tested only on UNIX-like systems (including Mac OS X).RAM: The framework itself takes about 60MB, which is fully shared. The additional memory taken by the program which defines the actual physical system (script) is typically less than 1MB. The memory storing the actual data scales with the system dimension for state-vector manipulations, and the square of the dimension for density-operator manipulations. This might easily be GBs, and often the memory of the machine limits the size of the simulated system.Classification: 4.3, 4.13, 6.2.External routines: Boost C++ libraries, GNU Scientific Library, Blitz++, FLENS, NumPy, SciPyCatalogue identifier of previous version: AELU_v1_0Journal reference of previous version: Comput. Phys. Comm. 183 (2012) 1381Does the new version supersede the previous version?: YesNature of problem:Definition of (open) composite quantum systems out of elementary building blocks [2,3]. Manipulation of such systems, with emphasis on dynamical simulations such as Master-equation evolution [4] and Monte Carlo wave-function simulation [5].Solution method:Master equation, Monte Carlo wave-function methodReasons for new version:The new version is mainly a feature release, but it does correct some problems of the previous version, especially as regards the build system.Summary of revisions:We give an example for a typical Python script implementing the ring-cavity system presented in Sec. 3.3 of Ref. [2]:C+ + codePython codeinvoking the framework#include “EvolutionComposite.h”#include “ParticleTwoModes.h” int main(int argc, char* argv[]) {import sys from cpypyqed import *command-line parametersParameterTable p; evolution::Pars pe(p); particle::Pars pp(p); mode::ParsLossy pmP(p,“P”); mode::ParsPumpedLossy pmM(p,“M”); particlecavity::ParsAlong ppcP(p,“P”); particlecavity::ParsAlong ppcM(p,“M”); ppcP.modeCav=MFT_PLUS; ppcM.modeCav=MFT_MINUS; auto qmp=updateWithPicture(p,argc,argv,“--”);p=parameters.ParameterTable() pe=evolution.Pars(p) pp=particle.Pars(p) pmP=mode.ParsLossy(p,“P”) pmM=mode.ParsLossy(p,“M”) ppcP=particlecavity.ParsAlong(p,“P”) ppcM=particlecavity.ParsAlong(p,“M”) ppcP.modeCav=ModeFunctionType.PLUS ppcM.modeCav=ModeFunctionType.MINUS qmp=updateWithPicture(p,sys.argv,“--”)defining free elementsparticle::Ptr part (make(pp,qmp)); mode ::Ptr plus (make(pmP,qmp)); mode ::Ptr minus(make(pmM,qmp));part=particle.make(pp,qmp) plus = mode.make(pmP,qmp) minus= mode.make(pmM,qmp)initial conditionsauto psi(wavePacket(pp)* init(pmP)*init(pmM));psi=particle.wavePacket(pp)** mode.init(pmP)**mode.init(pmM)defining interactions & composite on the fly, and evolving the systemevolve<0>(psi, composite::make(_<1,0>(ParticleAlongCavity(plus,part,ppcP)), _<2,0>(ParticleAlongCavity(minus,part,ppcM)), _<1,2,0>(ParticleTwoModes(plus,minus,part, ppcP,ppcM))), pe);}evolve(psi, makeComposite({(1,0):ParticleAlongCavity(plus,part,ppcP), (2,0):ParticleAlongCavity(minus,part,ppcM), (1,2,0):ParticleTwoModes(plus,minus,part, ppcP,ppcM)}), pe)Restrictions:Total dimensionality of the system. Master equation—few thousands. Monte Carlo wave-function trajectory—several millions.Unusual features:Because of the heavy use of compile-time algorithms, compilation of programs written in the framework may take a long time and much memory (up to several GBs).Additional comments:•The framework is not a program, but provides and implements an application-programming interface for developing simulations in the indicated problem domain.•We use several C++11 features which limits the range of supported compilers (g++ 4.7, clang++ 3.1)•Documentation, http://cppqed.sourceforge.net/Running time:Depending on the magnitude of the problem, can vary from a few seconds to weeks.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call