Template Class NormalOperatorSequence

Inheritance Relationships

Base Types

  • public container::svector< NormalOperator< Statistics::FermiDirac > >

  • public sequant::Expr (Class Expr)

  • public sequant::detail::VectorExprAccess< NormalOperatorSequence< Statistics::FermiDirac >, container::svector< NormalOperator< Statistics::FermiDirac > > > (Template Class VectorExprAccess)

Class Documentation

template<Statistics S = Statistics::FermiDirac>
class NormalOperatorSequence : public container::svector<NormalOperator<Statistics::FermiDirac>>, public sequant::Expr, public sequant::detail::VectorExprAccess<NormalOperatorSequence<Statistics::FermiDirac>, container::svector<NormalOperator<Statistics::FermiDirac>>>

NormalOperatorSequence is a sequence NormalOperator objects, all ordered with respect to same vacuum.

Template Parameters:

S – specifies the particle statistics

Public Types

using base_type = container::svector<NormalOperator<S>>

Public Functions

inline NormalOperatorSequence()

constructs an empty sequence

template<typename ...NOps, typename = std::enable_if_t<(std::is_convertible_v<NOps, NormalOperator<S>> && ...)>>
inline NormalOperatorSequence(NOps&&... operators)

constructs from a parameter pack

inline NormalOperatorSequence(std::initializer_list<NormalOperator<S>> operators)

constructs from an initializer list of normal operators

inline NormalOperatorSequence(std::initializer_list<Op<S>> operators)

constructs from an initializer list of Ops

inline Vacuum vacuum() const
inline void push_back(const NormalOperator<S> &nop)

appends nop; an empty sequence adopts its vacuum

Throws:

Exception – if nop does not use the vacuum of the operators of this

inline void push_back(NormalOperator<S> &&nop)
template<typename ...Args>
inline NormalOperator<S> &emplace_back(Args&&... args)

constructs a NormalOperator from args and push_back’s it

inline operator const base_type&() const &
inline operator base_type&&() &&
inline auto opsize() const

Warning

not to be confused with NormalOperatorSequence<S>::size() that returns the number of NormalOperator<S> objects

Returns:

the total number of Op<S> objects in this

inline virtual void adjoint() override

adjoint of a NormalOperatorSequence is a reversed sequence of adjoints

inline virtual std::wstring to_latex() const override
Returns:

the string representation of this in the LaTeX format

inline virtual Expr::type_id_type type_id() const override

Computes and returns the derived type identifier

Returns:

the hash value for this Expr

inline virtual ExprPtr clone() const override
Returns:

a clone of this object, i.e. an object that is equal to this

Public Static Functions

static inline constexpr std::string static_type_name(std::type_identity<NormalOperatorSequence> = {})

Public Static Attributes

static constexpr Statistics statistics = S
static constexpr Expr::type_rank_type type_rank = Expr::default_type_rank

Friends

inline friend bool operator==(const NormalOperatorSequence &nopseq1, const NormalOperatorSequence &nopseq2)