State Output

template<uint64_t Nmax, uint64_t Q, class IntType>
std::ostream &operator<<(std::ostream &stream, const danceq::internal::State<Nmax, Q, IntType> state_instance)

std::ofstream for the State class.

Usage:

State state();
std::cout << state: << state << std::endl;

Note that the full state from site 0 to MaxSites is printed. To limit the output you can use get_string(start,end):

std::cout << state from start to end: << state.get_string(start,end) << std::endl;

Parameters:
  • stream – std::ofstream

  • state_instance – Output state

Returns:

std::ostream&

int32_t danceq::internal::State::info(void) const

Prints information about the State.

Prints the following information: MaxSites, Q, sizeof(IntType), Nbits, NInt, dbug_level, and states_per_IntType.

Returns:

error_code

std::string danceq::internal::State::get_string(const uint64_t start = 0, const uint64_t end = MaxSites) const

Generates an output string.

Returns an output string with states on sites start to end-1:

\[\vert \sigma_{\textbf{start}};\sigma_{\textbf{start}+1};\dots;\sigma_{\textbf{end}-1}\rangle\]

Parameters:
  • start – Start of range

  • end – End of range

Returns:

Output string

std::string danceq::internal::State::get_string(const std::vector<uint64_t> &pos) const

Generates an output string.

Returns an output string with states given by pos:

\[\vert \sigma_{\textbf{pos}[0]};\sigma_{\textbf{pos}[0]};\dots;\sigma_{\textbf{pos}[\textbf{pos}.\texttt{size}()-1]}\rangle\]

Parameters:

pos – Vector containing the sites

Returns:

error_code