Struct TensorSymmetries

Struct Documentation

struct TensorSymmetries

named-parameter pack of a Tensor’s symmetry attributes

Passed to the Tensor constructors as a single argument (the named-parameter idiom via designated initializers) instead of the order-sensitive positional Symmetry/BraKetSymmetry/ColumnSymmetry arguments. Each field is optional; an unset one falls back to the fixed library default (see Tensor::resolve_symmetries). This makes it easy to define one symmetry pack for a translation unit (e.g. constexpr TensorSymmetries particle_symmetric{.column = ColumnSymmetry::Symm};) and reuse it at every construction site.

Note

braket and hermiticity are two ways to specify the same underlying trait: if braket is set it is used directly (and, unless hermiticity is also set, the Hermiticity is back-filled from it); otherwise the braket symmetry is derived from hermiticity and the tensor’s base field. Prefer hermiticity for field-agnostic physical facts.

Public Members

std::optional<Symmetry> perm = std::nullopt

bra/ket permutational symmetry

std::optional<BraKetSymmetry> braket = std::nullopt

bra<->ket exchange symmetry (an alternative to hermiticity; see note)

std::optional<Hermiticity> hermiticity = std::nullopt

abstract (field-agnostic) adjoint symmetry

std::optional<ColumnSymmetry> column = std::nullopt

particle (column) permutation symmetry