C++QEDCore  2.100.2 (v2 Milestone 10 Development branch)
a framework for simulating open quantum dynamics – core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Specifying subsystems

Many constructs in the framework require the specification of a subsystem of a multiary quantum system @ compile time. The main example is retained index positions for slicing (cf. The multi-array concept). It is the template parameter V, a compile-time sequence, that specifies the subsystem.

Example models

tmptools::Vector and range_c from Boost.MPL.

Preconditions
  • Size<V>::value must not be larger than the arity
  • V must not “contain”
    • negative values,
    • values not smaller than the arity, and
    • duplicate values.

These are checked for @ compile time, and any violation is signalled by more or less intelligent compiler errors generated with the help of Boost.MPL's static assertions.

See also
ConsistencyChecker, tmptools::Vector