The binary namespace
Wrapper of binary::Base
Wrapper of binary::make
The evolution namespace
Wrapper of evolution::Method
Wrapper of evolution::Pars
- C++ signature :
- boost::shared_ptr<ModeBase const> make(mode::Pars,QM_Picture)
make( (ParsPumped)arg1, (QMP)arg2) -> ModeBase :
- C++ signature :
- boost::shared_ptr<ModeBase const> make(mode::ParsPumped,QM_Picture)
make( (ParsLossy)arg1, (QMP)arg2) -> ModeBase :
- C++ signature :
- boost::shared_ptr<ModeBase const> make(mode::ParsLossy,QM_Picture)
make( (ParsPumpedLossy)arg1, (QMP)arg2) -> ModeBase :
- C++ signature :
- boost::shared_ptr<ModeBase const> make(mode::ParsPumpedLossy,QM_Picture)
The parameters namespace
Wrapper of parameters::ParameterTable
Wrapper of parameters::update. Note that the signature differs a little bit compared to the C++ version, it is not necessary to pass in the argument list length.
Parameters: |
|
---|
- C++ signature :
- quantumdata::StateVector<1> hoState(particle::Pars [,bool])
hoState( (ParsPumped)arg1 [, (bool)arg2]) -> object :
- C++ signature :
- quantumdata::StateVector<1> hoState(particle::ParsPumped [,bool])
- C++ signature :
- quantumdata::StateVector<1> wavePacket(particle::Pars [,bool])
wavePacket( (ParsPumped)arg1 [, (bool)arg2]) -> object :
- C++ signature :
- quantumdata::StateVector<1> wavePacket(particle::ParsPumped [,bool])
- C++ signature :
- quantumdata::StateVector<1> init(std::complex<double>)
init( (Pars)arg1) -> object :
- C++ signature :
- quantumdata::StateVector<1> init(qbit::Pars)
The quantumdata namespace
The quantumtrajectory namespace
Wrapper of quantumtrajectory::mcwf::Pars
The structure namespace
Instantiation of structure::Interaction with RANK=2
Instantiation of structure::Interaction with RANK=3
Instantiation of structure::QuantumSystem with RANK=1
Instantiation of structure::QuantumSystem with RANK=2
Instantiation of structure::QuantumSystem with RANK=3
Instantiation of structure::QuantumSystem with RANK=4
The trajectory namespace
Wrapper of trajectory::ParsEvolved
Wrapper of trajectory::ParsRun
Wrapper of trajectory::ParsStochastic
Instantiation of BinarySystem with template parameters false,false,false
Instantiation of BinarySystem with template parameters false,false,true
Instantiation of BinarySystem with template parameters false,true,false
Instantiation of BinarySystem with template parameters false,true,true
Instantiation of BinarySystem with template parameters true,false,false
Instantiation of BinarySystem with template parameters true,false,true
Instantiation of BinarySystem with template parameters true,true,false
Instantiation of BinarySystem with template parameters true,true,true
Wrapper of evolve with RANK=1.
- C++ signature :
- boost::python::api::object evolve(boost::python::numeric::array,boost::shared_ptr<structure::QuantumSystem<1> const>,evolution::Pars)
Wrapper of evolve with RANK=2.
Wrapper of evolve with RANK=3.
Wrapper of evolve with RANK=4.
Wrapper of :elements:`picture::updateWithPicture`. Note that the signature differs a little bit compared to the C++ version, it is not necessary to pass in the argument list length.
param p: | The ParameterTable |
---|---|
type p: | ParameterTable |
param list argv: | |
The argument list | |
param str prefix: | |
The prefix (default “--”) | |
returns qmp: | The quantum mechanical picture to use |
This module provides the infrastructure to instantiate and build C++QED wrapper classes on demand. The main class to implementing this functionality is OnDemand.
This class serves as a base to classes which need to be compiled on the fly in cpypyqed.
This is needed for class templates which cannot be pre-instantiated at cpypyqed compile time because there are too many possibilities of template parameters. A typical example is the class Composite.
Classes deriving from OnDemand need to implement generate_source.
Parameters: |
|
---|
This will be set to the directory where the C++ source templates are found, typically used in the implementation of generate_source.
This creates the C++ source file of the python module. It is a stub and has to be implmented by deriving classes.
Implementations have to save the result to builddir. They can access template files in the directory cpypyqeddir.
Parameters: | builddir (str) – The directory where the module is going to be built. The result has to be saved here. |
---|
Returns an instance of the underlying class represented by this OnDemand object. The arguments of this function are passed through to the constructor of the underlying class. If the on-demand module holding the class has not been built yet or the C++QED library version does not fit, the module is compiled on the fly.
Equivalent of mkdir -p.
http://stackoverflow.com/questions/600268/mkdir-p-functionality-in-python
Parameters: | path (str) – The directory to create. |
---|
This will be set to the directory where the C++ source templates are found, typically used in the implementation of generate_source.
This module is the wrapper for the C++QED composite bundle.
Typically the enduser only has to call the convenience maker function makeComposite.
Wrapper of the C++QED function composite::make with a modified signature better suited for Python.
This function takes a dictionary where the keys describe an Act object and values are InteractionN-objects (with N the rank of the interaction). The key has to be a N-tuple of integers corresponding to the involved subsystems. For example, the key value pair (0,2):poc will be a Act<0,2>(poc), where poc could be an instance of ParticleOrthogonalToCavity and the interaction acts on the subsystems 0 and 2.
Example usage (where poc is a ParticleOrthogonalToCavity-object, subsytem 0 is a mode and subsystems 1 and 2 are particles):
>>> c = makeComposite({(0,2):poc,(0,1):poc})
Parameters: | acts (dict) – A dictionary holding the subsystem tuples as keys and the interaction objects as values. |
---|---|
Returns: | A wrapped C++QED Composite-object, compiled on demand if necessary. |
Return type: | Composite<VA> |
A OnDemand-class wrapping the C++QED class Composite.
The constructor takes a dictionary where the keys describe an Act object and values are InteractionN-objects (with N the rank of the interaction). The key has to be a N-tuple of integers corresponding to the involved subsystems. For example, the key value pair {(0,2):poc} will be a Act<0,2>(poc), where poc could be an instance of ParticleOrthogonalToCavity and the interaction acts on the subsystems 0 and 2.
Note that the constructor will only yield an OnDemand-object, not a real C++QED composite object. However, calling the OnDemand.maker-method on the resulting object will return a true composite object, while instantiating and compiling the class template as needed. The convinience maker function makeComposite has the same signature as the constructor here and automatically calls the underlying OnDemand.maker function, thus returning a true composite object which can be passed to evolve.
Parameters: | acts (dict) – A dictionary holding the subsystem tuples as keys and the interaction objects as values. |
---|
Overriding OnDemand.generate_source
This takes care of creating the proper source file to compile a boost.Python module, which holds the correct C++QED Composite class.
Overriding OnDemand.maker
This function compiles and creates the needed C++QED Act-objects on demand and passes them to OnDemand.maker, where they are passed into composite::make to create the right Composite object.
A OnDemand-class wrapping the C++QED class Act.
The template parameters denoting the involved subsystems are given as constructor arguments to this class. The interaction which this object should hold has to be passed in as an argument to OnDemand.maker.