#include <quantum.h>
Public Member Functions | |
TensorProductStructure (itype NN, const itype *sizeinit) | |
Constructor: create a tensor product structure with NN subsystems, whose sizes are obtained from a C array. | |
TensorProductStructure (const IArray &sizeinit) | |
Constructor: create a tensor product structure whose subsystem sizes are contained in an STL array. | |
TensorProductStructure (itype NN, const IArray &sizeinit) | |
Constructor: create a tensor product structure with NN subsystems, whose sizes are obtained from the first NN elements of an STL array. | |
TensorProductStructure (itype NN,...) | |
Constructor: create a tensor product structure with NN subsystems, whose sizes are given by the NN following arguments. | |
TensorProductStructure (const TensorProductStructure &other) | |
Copy constructor: create a tensor product structure that mirrors another. | |
~TensorProductStructure () | |
Destructor: de-allocates the size array. | |
void | redefine (const TensorProductStructure &other) |
Erase all the information in this TensorProductStructure, and redefine it based on other . | |
itype | operator() (const itype *indices) const |
Returns an index into a flat array, computed from the multi-index indices . | |
itype | operator() (itype index1,...) const |
void | component_indices (itype index, itype *indices) const |
Extracts the set of subsystem indices corresponding to index and deposits them in indices . | |
itype | Size (itype i) const |
Returns the i 'th subsystem's dimension. | |
itype | Size (void) const |
Returns the total vector space dimension, the product of all subsystems' dimension. | |
itype | Dimensions (void) const |
Returns the total number of subsystems. | |
bool | operator== (const TensorProductStructure &other) const |
Returns true if and only if both structures have the same number of subsystems, and all subsystems have the same size. |
In quantum information science, the pure states of a system are elements in a vector space. Vector spaces with tensor product structures represent composite systems. The TensorProductStructure class is intended to facilitate viewing a large vector space as a tensor product of smaller ones. It does not enhance the functionality of the underlying space (if that space is ever actually realized), but allows the definition of abstract or compressed entities such as product states and product operators.
|
Constructor: create a tensor product structure with NN subsystems, whose sizes are given by the NN following arguments. This constructor should be used with caution; it may crash horribly if insufficiently many arguments are given! |
|
Returns an index into a flat array, computed from the multi-index This operator, and its overloaded cousin, are the primary reason why TensorProductStructure exists. A tensor product structure is simply a convenient mnemonic for translating a multi-index (i.e., array of subsystem indices) into a single index. The mapping is one-to-one, so every valid multi-index is mapped into a unique integer index between 0 and Size()-1. The obvious mapping is used: if is the number of indices and is the dimension of the 'th subsystem, then |