Struct WickTheorem::NontensorWickState¶
Defined in File wick.hpp
Nested Relationships¶
This struct is a nested type of Template Class WickTheorem.
Struct Documentation¶
-
struct NontensorWickState¶
carries state down the stack of recursive calls
Public Functions
-
inline NontensorWickState(const WickTheorem<S> &wt, const NormalOperatorSequence<S> &nopseq)¶
-
NontensorWickState(const NontensorWickState&) = delete¶
-
NontensorWickState(NontensorWickState&&) = delete¶
-
NontensorWickState &operator=(const NontensorWickState&) = delete¶
-
NontensorWickState &operator=(NontensorWickState&&) = delete¶
-
inline auto make_target_partner_indices() const¶
“applies” this->contractions to the partner index pairs from this->wick.input_partner_indices_ to produce the current target list of partner indices
- Returns:
std::pair
{target_partner_indices, ncycles}
, wheretarget_partner_indices
is the current target list of partner indices andncycles
is the number of contraction cycles
-
inline void init_topological_partitions()¶
-
template<typename Cursor>
inline bool connect(const container::svector<std::bitset<max_input_size>> &target_nop_connections, const Cursor &op1_cursor, const Cursor &op2_cursor)¶ Updates connectivity if contraction satisfies target connectivity.
If the target connectivity will be violated by this contraction, keep the state unchanged and return false
Public Members
-
const WickTheorem<S> &wick¶
the WickTheorem object using this
-
NormalOperatorSequence<S> nopseq¶
current state of operator sequence
-
std::size_t nopseq_size¶
current size of nopseq
-
container::svector<std::pair<Op<S>, Op<S>>> contractions¶
current list of indices of contracted {qpann,qpcre} ops
-
int level¶
level in recursive wick call stack
-
size_t left_op_offset¶
where to start looking for contractions (ordinal in the current state of nopseq)
-
bool count_only¶
if true, only track the total number of summands in the result (i.e. 1 (the normal product) + the number of contractions (if normal wick result is wanted) or the number of complete constractions (if want complete contractions only)
-
std::atomic<size_t> count¶
if count_only is true, will count the total number of terms
-
container::svector<std::bitset<max_input_size>> nop_connections¶
bitmask of connections for each nop (1 = connected)
-
container::svector<size_t> nop_adjacency_matrix¶
number of connections between each nop, only lower triangle is kept
-
container::svector<size_t> nop_nconnections¶
for each NormalOperator specifies how many connections it currently has
Note
exists to avoid the need to traverse nop_adjacency_matrix
-
container::svector<container::set<size_t>> nop_partitions¶
current state of nop partitions (will only match contents of nop_to_partition before any contractions have occurred)
when a normal operator is connected it’s removed from the partition
when it is disconnected fully it’s re-added to the partition
-
inline NontensorWickState(const WickTheorem<S> &wt, const NormalOperatorSequence<S> &nopseq)¶