Operator Information

uint64_t danceq::internal::Operator::Ntensor_max

Defines the maximal number of sites of a non-local subcluster which contains all operators that are fully supported on it.

The idea is to group the system into non-local subclusters and to incorporate all operators strings that are fully supported on such a cluster. The maximal size of these clusters (if there is no operator string acting on more sites) is given by Ntensor_max. More information can be found here. The default value is chosen such that the dimension of the underlying sparse matrix does not exceed 2048. It can be set by calling set_Ntensor_max(…)

uint64_t danceq::internal::Operator::Nbody_max

Maximal number of sites that participate in a tensor product.

uint64_t danceq::internal::Operator::max_element

Maximal number of off-diagonal elements of all basis state.

ScalarType danceq::internal::Operator::diagonal_const

Diagonal shift.

std::vector<state_class> danceq::internal::Operator::state_list

A sorted list of all states.

The vector stores a list of \(\textbf{Q}^{\textbf{Nbody_max}}\) sorted states that are used to apply a tensor product acting on Nbody_max sites (Q = 2, Nbody_max = 3):

\(\vert\Psi_0 \rangle = \vert 0;0;0\rangle\)

\(\vert\Psi_1 \rangle = \vert 0;0;1\rangle\)

\(\vert\Psi_2 \rangle = \vert 0;1;0\rangle\)

\(\vert\Psi_3 \rangle = \vert 0;1;1\rangle\)

\(\vert\Psi_4 \rangle = \vert 1;0;0\rangle\)

\(\vert\Psi_5 \rangle = \vert 1;0;1\rangle\)

\(\vert\Psi_6 \rangle = \vert 1;1;0\rangle\)

\(\vert\Psi_7 \rangle = \vert 1;1;1\rangle\)

std::map<std::string, danceq::internal::SparseMatrix<ScalarType>> danceq::internal::Operator::available_operators

Available local operators.

Dictionary maps names to local operators acting on single site, e.g.:

\[\langle m^\prime \vert S^x \vert m \rangle = \left( \delta_{m^\prime,m+1} + \delta_{m^\prime,m+1}\right)\frac{1}{2}\sqrt{S(S+1)-m^\prime m}\]

Default operators can be found here. New local operators can be added with define_operator(…).

std::vector<std::tuple<ScalarType, std::vector<uint64_t>, std::vector<std::string>, OperatorType>> danceq::internal::Operator::operator_list

Operator list for bookkeeping.

This is only used for bookkeeping and not for computation. The first element of the tuple contains the overall coefficient. The second element stores the sites in form of std::vector on which each term acts. The third element, std::vector of std::string, is of the same size as the second element and contains the operators that are listed in available_operators. The last element refers to the OperatorType.

For example, the operator string \(3\cdot S^x_5S^x_6\) as a term of the Hamiltonian is stored as:

std::tuple<ScalarType,std::vector<uint64_t>, std::vector<std::string>, danceq::OperatorType> = std::make_tuple(3.,{5,6},{"Sx","Sx"},Hamiltonian)

An example for a jump operator is:

std::tuple<ScalarType,std::vector<uint64_t>, std::vector<std::string>, danceq::OperatorType> = std::make_tuple(.1,{0},{"Sx"},Lindbladian)

std::vector<std::tuple<std::vector<uint64_t>, std::vector<uint64_t>, std::vector<std::pair<state_class, ScalarType>>, state_class>> danceq::internal::Operator::sparse_matrices_for_computation

Tensor matrices for computation.

The tuples are used to compute the action of the Operator to a State in the apply(…) function. The first element of each std::tuple contains the cluster on which each non-local tensor product acts. Similar to the SparseMatrix, the second element contains the range and the third element contains the data with the correct mask used to immetetly generate the new State. The last element is the mask that cuts out states defined by the cluster.

It is set up by merge_terms(…) which is called within add_operator(…).

bool danceq::internal::Operator::bool_is_hermitian

Boolean to check if the input is hermitian.

bool danceq::internal::Operator::bool_is_diagonal

Boolean to check if the input is diagonal.