Density operator of arbitrary arity. More...
#include <DensityOperator.h>
Public Types | |
typedef LazyDensityOperator< RANK > | LDO_Base |
typedef ArrayBase< 2 *RANK > | ABase |
typedef LDO_Base::Dimensions | Dimensions |
typedef LDO_Base::Idx | Idx |
typedef ABase::ArrayLow | DensityOperatorLow |
typedef linalg::CMatrix | CMatrix |
Public Types inherited from quantumdata::LazyDensityOperator< RANK > | |
typedef boost::shared_ptr< const LazyDensityOperator > | Ptr |
Many class templates in the framework define shared pointers to their own types, in a template-metafunction like manner. | |
typedef DimensionsBookkeeper< RANK, true > | Base |
typedef Base::Dimensions | Dimensions |
Inherited from DimensionsBookkeeper. | |
typedef IdxTiny< RANK > | Idx |
The type used for indexing the “rows” and the “columns”: a tiny vector of integers (multi-index) | |
Public Types inherited from DimensionsBookkeeper< RANK, true > | |
typedef ExtTiny< RANK > | Dimensions |
The dimensions as a static vector of size N_RANK. | |
Public Member Functions | |
DensityOperator (const DensityOperatorLow &, ByReference) | |
Referencing constructor implemented in terms of blitzplusplus::halfCutTiny. | |
DensityOperator (const Dimensions &, bool init=true) | |
DensityOperator (const StateVector< RANK > &psi) | |
Constructs the class as a dyadic product of psi with itself. | |
DensityOperator (const DensityOperator &) | |
By-value copy constructor (deep copy) | |
DensityOperator & | operator= (const DensityOperator &rho) |
Default assignment doesn't work, because LazyDensityOperator is always purely constant (const DimensionsBookkeeper base) | |
template<typename OTHER > | |
DensityOperator & | operator= (const OTHER &other) |
(Multi-)matrix style indexing | |
const IndexerProxy | operator() (const Idx &firstIndex) const |
IndexerProxy | operator() (const Idx &firstIndex) |
template<typename... SubscriptPack> | |
const IndexerProxy | operator() (int s0, SubscriptPack...subscriptPack) const |
template<typename... SubscriptPack> | |
IndexerProxy | operator() (int s0, SubscriptPack...subscriptPack) |
Norm | |
double | norm () const |
returns the trace “norm” | |
double | renorm () |
” and also renormalises | |
Matrix view | |
const CMatrix | matrixView () const |
returns a two-dimensional view of the underlying data, created on the fly via blitzplusplus::binaryArray | |
CMatrix | matrixView () |
” | |
Naive operations for vector space | |
DensityOperator & | operator+= (const DensityOperator &rho) |
DensityOperator & | operator-= (const DensityOperator &rho) |
const DensityOperator | operator- () const |
const DensityOperator | operator+ () const |
template<typename OTHER > | |
DensityOperator & | operator*= (const OTHER &dc) |
template<typename OTHER > | |
DensityOperator & | operator/= (const OTHER &dc) |
Public Member Functions inherited from quantumdata::LazyDensityOperator< RANK > | |
const IndexerProxy | operator() (const Idx &firstIndex) const |
Multi-matrix style indexing via Idx type. | |
template<typename... SubscriptPack> | |
const IndexerProxy | operator() (int s0, SubscriptPack...subscriptPack) const |
Multi-matrix style indexing via packs of integers. More... | |
double | trace () const |
Returns the trace (redirected to a pure virtual) | |
template<typename V > | |
const ldo::DiagonalIterator< RANK, V > | begin () const |
Return the ldo::DiagonalIterator corresponding to the beginning of the sequence of slices defined by V More... | |
template<typename V > | |
const ldo::DiagonalIterator< RANK, V > | end () const |
” for the end | |
Public Member Functions inherited from DimensionsBookkeeper< RANK, true > | |
DimensionsBookkeeper (mpl::bool_< IS_CONST >=mpl::false_()) | |
Constructor usable only in the IS_CONST=false case. More... | |
DimensionsBookkeeper (const Dimensions &dimensions) | |
Standard constructor usable also in the IS_CONST=true case. | |
const Dimensions & | getDimensions () const |
Get the Dimensions vector. | |
size_t | getTotalDimension () const |
Get the total dimension of a system of arbitrary arity. | |
size_t | getDimension (mpl::int_< RANK >=mpl::int_< 1 >()) const |
Get the (single) dimension for a unary system. | |
size_t | getDimension (size_t i) const |
void | setDimensions (const Dimensions &dimensions) |
This will work only in the non-const case. | |
Static Public Attributes | |
static const int | N_RANK =RANK |
Static Public Attributes inherited from DimensionsBookkeeper< RANK, true > | |
static const int | N_RANK |
Arity of the Hilbert space. | |
static const int | DIMESIONS_BOOKKEEPER_RANK |
Ditto (to break ambiguity if a class is derived from another base featuring N_RANK ). | |
Friends | |
class | IndexerProxy |
Additional Inherited Members | |
Protected Member Functions inherited from quantumdata::LazyDensityOperator< RANK > | |
LazyDensityOperator (const Dimensions &dims) | |
Density operator of arbitrary arity.
Cf. rationale
RANK | arity of the Hilbert space |
The DensityOperator interface is similar to StateVector with obvious differences.
<RANK>
represents a density operator on a Hilbert space of arity RANK
. This makes that the number of its indices is actually 2*RANK
. This is the reason why it inherits from quantumdata::ArrayBase <2*RANK>.Definition at line 54 of file DensityOperator.h.