Constructors with std::vector

danceq::internal::State::State(const std::vector<IntType> &state_vector)

Constructor from std::vector<IntType>.

Initializes a State instance from an input vector: \(\vert \sigma_i\rangle = \textbf{state_vector}[i]\).

Parameters:

state_vector – State vector

danceq::internal::State::State(const std::vector<IntType> &state_vector, const uint64_t start)

Constructor with std::vector<IntType> with an offset.

Initializes a State instance from an input vector with an offset start: \(\vert \sigma_{i+\textbf{start}}\rangle = \textbf{state_vector}[i]\).

Parameters:
  • state_vector – State vector

  • start – Offset to initialize the state

danceq::internal::State::State(const std::vector<IntType> &state_vector, const std::vector<uint64_t> &index_vector)

Constructor with std::vector<IntType> with an additional index vector.

Initializes a State instance from an input vector and an indexing vector: \(\vert \sigma_{i+\textbf{index_vector}[i]}\rangle =\textbf{state_vector}[i]\).

Parameters:
  • state_vector – State vector

  • index_vector – Index vector