Class TensorPower¶
Defined in File tensor_power.hpp
Inheritance Relationships¶
Base Types¶
public sequant::Expr(Class Expr)public sequant::AbstractTensor(Class AbstractTensor)
Class Documentation¶
-
class TensorPower : public sequant::Expr, public sequant::AbstractTensor¶
Represents the element-wise rational power of a c-number tensor leaf, e.g.
D^{-1}for a perturbation-theory denominator.The power is taken element by element, hence the indices, and so the bra/ket/aux structure, are those of the base.
Public Functions
-
TensorPower() = delete¶
-
virtual ~TensorPower() = default¶
-
TensorPower(const TensorPower &other)¶
deep-clones the base
-
TensorPower(TensorPower&&) = default¶
-
TensorPower &operator=(const TensorPower &other)¶
deep-clones the base
-
TensorPower &operator=(TensorPower&&) = default¶
-
TensorPower(ExprPtr base, exponent_type exponent)¶
- Parameters:
base – [in] a c-number AbstractTensor Expr that is not a TensorPower; cloned
exponent – [in] any rational; a non-integer exponent requires the symmetry of
baseto not be Symmetry::Antisymm
- Throws:
Exception – if a precondition is violated (via SEQUANT_ENFORCE)
-
const AbstractTensor &base_tensor() const¶
- Returns:
the base as an AbstractTensor
-
const exponent_type &exponent() const¶
- Returns:
the rational exponent
-
virtual type_id_type type_id() const override¶
Computes and returns the derived type identifier
See also
- Returns:
the hash value for this Expr
-
virtual bool is_scalar() const override¶
Reports if this is a pure scalar (number-like) expression.
Note
This is distinct from is_cnumber()
Warning
this returns false for all leaves by default, hence must be overridden for scalar leaf types.
- Returns:
true if this is a scalar
-
virtual ExprPtr clone() const override¶
- Returns:
a clone of this object, i.e. an object that is equal to
this
-
virtual void adjoint() override¶
adjoint of the power is the power of the adjoint
-
virtual ExprPtr canonicalize(CanonicalizeOptions opts = CanonicalizeOptions::default_options()) override¶
canonicalizes the slots like Tensor::canonicalize; the byproduct, the phase of the base raised to the exponent, follows from _symmetry()
-
virtual std::wstring to_latex() const override¶
- Returns:
the string representation of
thisin the LaTeX format
-
virtual bool operator<(const AbstractTensor &that) const override¶
Public Static Functions
-
static inline constexpr std::string static_type_name(std::type_identity<TensorPower> = {})¶
Public Static Attributes
-
static constexpr type_rank_type type_rank = expr_type_rank::tensor_power¶
-
TensorPower() = delete¶