Xped
|
#include <Qbasis.hpp>
Public Member Functions | |
Qbasis ()=default | |
template<typename Container > | |
Qbasis (const Container &qins, const size_t &dim) | |
qType | getQ (const size_t &num) const |
qType | qn (std::size_t index) const |
void | remove (const qType &q) |
qType | maxQ () const |
qType | minQ () const |
void | truncate (const std::unordered_set< qType > &qs, const std::size_t &M) |
size_t | leftOffset (const FusionTree< depth, Symmetry > &tree, const std::array< size_t, depth > &plain=std::array< std::size_t, depth >()) const |
size_t | rightOffset (const FusionTree< depth, Symmetry > &tree, const std::array< size_t, depth > &plain=std::array< std::size_t, depth >()) const |
void | push_back (const qType &q, const size_t &inner_dim) |
void | push_back (const qType &q, const size_t &inner_dim, const TreeVector< depth > &tree) |
void | setRandom (const std::size_t &fullSize, const std::size_t &max_sectorSize=5ul) |
void | clear () |
Qbasis< Symmetry, depth+1, AllocationPolicy > | combine (const Qbasis< Symmetry, 1, AllocationPolicy > &other, bool CONJ=false) const |
Qbasis< Symmetry, depth, AllocationPolicy > | add (const Qbasis< Symmetry, depth, AllocationPolicy > &other) const |
std::pair< std::vector< std::size_t >, Qbasis< Symmetry, depth, AllocationPolicy > > | shift (qType qshift) const |
Qbasis< Symmetry, depth, AllocationPolicy > | intersection (const Qbasis< Symmetry, depth, AllocationPolicy > &other) const |
Qbasis< Symmetry, depth, AllocationPolicy > | conj () const |
Qbasis< Symmetry, 1, AllocationPolicy > | forgetHistory () const |
std::string | print () const |
std::string | info () const |
std::string | printTrees () const |
bool | operator== (const Qbasis< Symmetry, depth, AllocationPolicy > &other) const |
auto | begin () |
auto | end () |
auto | cbegin () const |
auto | cend () const |
std::vector< std::size_t > | sort () |
bool | IS_SORTED () const |
bool | IS_CONJ () const |
void | SET_CONJ () |
const auto & | tree (const qType &q) const |
TreeType & | allTrees () |
template<typename Ar > | |
void | serialize (Ar &ar) |
std::size_t | dim () const |
std::size_t | fullDim () const |
std::size_t | largestSector () const |
std::size_t | Nq () const |
std::vector< qType > | qs () const |
std::unordered_set< qType > | unordered_qs () const |
std::vector< std::size_t > | dims () const |
bool | IS_PRESENT (const qType &q) const |
bool | NOT_PRESENT (const qType &q) const |
size_t | inner_num (const size_t &outer_num) const |
size_t | inner_dim (const size_t &num_in) const |
size_t | inner_dim (const qType &q) const |
size_t | outer_num (const qType &q) const |
size_t | full_outer_num (const qType &q) const |
size_t | index (const qType &q) const |
Static Public Member Functions | |
static Qbasis< Symmetry, 1, AllocationPolicy > | TrivialBasis () |
Friends | |
template<typename Symmetry_ , std::size_t depth_, typename AllocationPolicy_ > | |
class | Qbasis |
\describe_Symmetry
This class is a container like class for a basis of a Hilbert space in which global symmetries are present. For each irreducible representation (irrep) of the global symmetry (for each quantum number), the states of the Hilbert states that transforms under that irrep are collected together in a plain Basis object.
One central function is the combine() method, which combine two instances of Qbasis to the tensor product basis, already proper sorted into irreps.
|
default |
Does nothing.
|
inline |
Inserts all quantum numbers in the Container qins
with constant dimension dim
into the basis.
Qbasis< Symmetry, depth, AllocationPolicy > Xped::Qbasis< Symmetry, depth, AllocationPolicy >::add | ( | const Qbasis< Symmetry, depth, AllocationPolicy > & | other | ) | const |
Adds two bases together.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Completely clear the basis.
Qbasis< Symmetry, depth+1, AllocationPolicy > Xped::Qbasis< Symmetry, depth, AllocationPolicy >::combine | ( | const Qbasis< Symmetry, 1, AllocationPolicy > & | other, |
bool | CONJ = false |
||
) | const |
Returns the tensor product basis, already properly sorted with respect to the resulting irreps. This function also saves the history of the combination process for later use. See leftOffset() and rightOffset().
Qbasis< Symmetry, depth, AllocationPolicy > Xped::Qbasis< Symmetry, depth, AllocationPolicy >::conj |
|
inline |
Returns the number of (reduced) basis states.
|
inline |
|
inline |
Qbasis< Symmetry, 1, AllocationPolicy > Xped::Qbasis< Symmetry, depth, AllocationPolicy >::forgetHistory |
size_t Xped::Qbasis< Symmetry, depth, AllocationPolicy >::full_outer_num | ( | const qType & | q | ) | const |
Computes the total number with which the sector with quantum number q
begins and takes into account the dimension of each irrep.
|
inline |
Returns the full number of basis states. If irreps has internal states, the basis states transforming under this irreps are multiplied by this degeneracy.
Symmetry::qType Xped::Qbasis< Symmetry, depth, AllocationPolicy >::getQ | ( | const size_t & | num | ) | const |
Returns the quantum number of the state with number num
.
size_t Xped::Qbasis< Symmetry, depth, AllocationPolicy >::index | ( | const qType & | q | ) | const |
Returns the index of a given quantum number.
std::string Xped::Qbasis< Symmetry, depth, AllocationPolicy >::info |
Prints rough infob.
size_t Xped::Qbasis< Symmetry, depth, AllocationPolicy >::inner_dim | ( | const qType & | q | ) | const |
Computes the sector size of a state with quantum number q
.
size_t Xped::Qbasis< Symmetry, depth, AllocationPolicy >::inner_dim | ( | const size_t & | num_in | ) | const |
Computes the sector size of a state with number num_in
.
size_t Xped::Qbasis< Symmetry, depth, AllocationPolicy >::inner_num | ( | const size_t & | outer_num | ) | const |
Computes the number within the sector from the total number of the state
Qbasis< Symmetry, depth, AllocationPolicy > Xped::Qbasis< Symmetry, depth, AllocationPolicy >::intersection | ( | const Qbasis< Symmetry, depth, AllocationPolicy > & | other | ) | const |
Returns the intersection of this and other
.
|
inline |
|
inline |
Checks whether states with quantum number q
are in the basis. Returns true if the state is present.
|
inline |
std::size_t Xped::Qbasis< Symmetry, depth, AllocationPolicy >::largestSector |
Returns the largest state sector.
size_t Xped::Qbasis< Symmetry, depth, AllocationPolicy >::leftOffset | ( | const FusionTree< depth, Symmetry > & | tree, |
const std::array< size_t, depth > & | plain = std::array<std::size_t, depth>() |
||
) | const |
|
inline |
|
inline |
|
inline |
Checks whether states with quantum number q
are not in the basis. Returns true if the state is absent.
|
inline |
Returns the number of quantum numbers (irreps) contained in this basis.
bool Xped::Qbasis< Symmetry, depth, AllocationPolicy >::operator== | ( | const Qbasis< Symmetry, depth, AllocationPolicy > & | other | ) | const |
size_t Xped::Qbasis< Symmetry, depth, AllocationPolicy >::outer_num | ( | const qType & | q | ) | const |
Computes the total number with which the sector with quantum number q
begins.
std::string Xped::Qbasis< Symmetry, depth, AllocationPolicy >::print |
Prints the basis.
std::string Xped::Qbasis< Symmetry, depth, AllocationPolicy >::printTrees |
Prints the trees.
void Xped::Qbasis< Symmetry, depth, AllocationPolicy >::push_back | ( | const qType & | q, |
const size_t & | inner_dim | ||
) |
Insert the quantum number q
with dimension inner_dim
into the basis.
void Xped::Qbasis< Symmetry, depth, AllocationPolicy >::push_back | ( | const qType & | q, |
const size_t & | inner_dim, | ||
const TreeVector< depth > & | tree | ||
) |
|
inline |
Inverse function to index(const qType&)
.
|
inline |
void Xped::Qbasis< Symmetry, depth, AllocationPolicy >::remove | ( | const qType & | q | ) |
size_t Xped::Qbasis< Symmetry, depth, AllocationPolicy >::rightOffset | ( | const FusionTree< depth, Symmetry > & | tree, |
const std::array< size_t, depth > & | plain = std::array<std::size_t, depth>() |
||
) | const |
|
inline |
|
inline |
void Xped::Qbasis< Symmetry, depth, AllocationPolicy >::setRandom | ( | const std::size_t & | fullSize, |
const std::size_t & | max_sectorSize = 5ul |
||
) |
std::pair< std::vector< std::size_t >, Qbasis< Symmetry, depth, AllocationPolicy > > Xped::Qbasis< Symmetry, depth, AllocationPolicy >::shift | ( | qType | qshift | ) | const |
std::vector< std::size_t > Xped::Qbasis< Symmetry, depth, AllocationPolicy >::sort |
|
inline |
|
static |
void Xped::Qbasis< Symmetry, depth, AllocationPolicy >::truncate | ( | const std::unordered_set< qType > & | qs, |
const std::size_t & | M | ||
) |
|
inline |
|
friend |