Struct CanonicalizeOptions

Inheritance Relationships

Derived Type

Struct Documentation

struct CanonicalizeOptions

options that control behavior of canonicalize()

Subclassed by sequant::SimplifyOptions

Public Types

enum class IgnoreNamedIndexLabel : bool

Values:

enumerator Yes
enumerator No

Public Functions

CanonicalizeOptions copy_and_set(CanonicalizationMethod) const
CanonicalizeOptions copy_and_set(std::optional<container::set<Index>>) const
CanonicalizeOptions copy_and_set(IgnoreNamedIndexLabel) const

Public Members

CanonicalizationMethod method = CanonicalizationMethod::Complete

TN canonicalization method

std::optional<container::set<Index>> named_indices = std::nullopt

specifies named indices; by default all indices that appear only once are deduced to be named, but this may be misleading if e.g. single summed-over dummy index appears in an expression

IgnoreNamedIndexLabel ignore_named_index_labels = IgnoreNamedIndexLabel::Yes

whether to ignore the labels of named indices. Setting to false will cause named indices to be treated as equivalent slots, which the result to be independent of their labels. This does not make sense in contexts where labels are meaningful, e.g. when canonicalizing sum of tensor networks and will be therefore ignored.

Public Static Functions

static CanonicalizeOptions default_options()

Friends

inline friend constexpr bool operator==(const CanonicalizeOptions &a, const CanonicalizeOptions &b)