Autodocs - Container Dictionary

template<class State = danceq::internal::State<128, 2, uint64_t>>
class ContainerDict

The class uses a dictionary to enumerate states for a small subsystem.

Template parameters

  • class State: The only template parameter is the State class

    Default: danceq::internal:: State <128,2,uint64_t>

Things to know

  • The class enumerates a subsystems of length \(L_P\) with a maximal number of particle number \(n_P = \max \left(L_P\cdot(Q-1),n\right)\) where \(n\) is the total particle number of the entire system.

  • More information can be found here.

  • The underlying State class can be accessed via Container::state_class.

  • The debugging level can be adjusted from 0 (no debugging) to 10 (maximal debugging):

    #define dbug_level 10; // 10 maximal debugging, 0 is no debugging
    
  • There is no length restriction to the subsystem.

Public Static Attributes

static const bool is_State = false

Needed for specification.

Protected Types

using state_class = State

State class.

State class can be retrieved from the BasisU1:

// Definition of classes
using State = danceq::internal::State<256,4>;
using Container = danceq::internal::ContainerTable<State> ;
using Basis = danceq::internal::BasisU1<Container>;

// This equivalent to: State state;
Container::state_class state;  

Protected Functions

ContainerDict(uint64_t L_, uint64_t n_max_ = -1UL)

Constructor.

Constructs an instance with a given length L_ and maximal particle number n_max_. Default particle number of -1 sets n_max to L_ (Q-1).

Parameters:
  • L_ – System size

  • n_max_ – Particle number

int32_t info(void) const

Prints Information about the class.

Prints information about the class such as basics parameters and current memory usage.

Returns:

error_code

int32_t get_number_of_bytes(uint64_t *number_of_bytes) const

Returns the memory usages in bytes.

Parameters:

number_of_bytes – Pointer for output

Returns:

error_code

int32_t get_index(uint64_t *output, const State &state, uint64_t start, uint64_t end) const

Returns the index of a specific state within start to end.

Parameters:
  • output – Pointer for output

  • state – State

  • start – Start of interval

  • end – End of interval

Returns:

error_code

int32_t is_maximal(bool *output, State &state, uint64_t start, uint64_t end, typename State::integer_type n_ = -1) const

Check if a specific state is maximal within start to end.

Default value of n_=-1 means that the particle number is calculated within the function.

Parameters:
  • output – Pointer for output

  • state – State

  • start – Start of interval

  • end – End of interval

  • n_ – Particle number within the interval

Returns:

error_code

int32_t is_minimal(bool *output, State &state, uint64_t start, uint64_t end, typename State::integer_type n_ = -1) const

Check if a specific state is minimal within start to end.

Default value of n_=-1 means that the particle number is calculated within the function.

Parameters:
  • output – Pointer for output

  • state – State

  • start – Start of interval

  • end – End of interval

  • n_ – Particle number within the interval

Returns:

error_code

Private Members

const uint64_t L

Length of subsystem.

const uint64_t n_max

Length of subsystem.

std::map<State, uint64_t> map

Dictionary for lookup.

The index of each state truncated to the subsystem, \(\vert\Psi_i\rangle\), can be accessed by its instance: \(\textbf{i} = \textbf{map} \left[\vert\Psi_i\rangle\right]\). The comparison is done on integer level using the data array of the State class.

std::vector<State> maximal_state_per_n

Defines the maximal state per allowed particle number.

Maximal state per allowed particle number \(n_P\in[0,\textbf{n_max}]\) in form of IntType defined by the state class.

std::vector<State> minimal_state_per_n

Defines the minimal state per allowed particle number.

Minimal state per allowed particle number \(n_P\in[0,\textbf{n_max}]\) in form of IntType defined by the state class.