Template Function sequant::normalize

Function Documentation

template<Statistics S = Statistics::FermiDirac>
std::tuple<int, std::shared_ptr<NormalOperator<S>>> sequant::normalize(const NormalOperatorSequence<S> &opseq, const container::svector<std::pair<Index, Index>> &target_partner_indices = {})

converts NormalOperatorSequence to NormalOperator

Note

will try to ensure that Op<S> objects for each there is a pairs of Indices in target_index_columns will act on the same particle in the result

Template Parameters:

S – Statistics

Parameters:
  • opseq[in] a NormalOperatorSequence<S> object

  • target_partner_indices[in] ptr to sequence of Index pairs whose Op<S> will act on same particle, if possible; if null, will not be used

Returns:

{phase,normal_operator} , where phase is +1 or -1, and normal_operator is a NormalOperator<S> object