Template Class OpMakerΒΆ
Defined in File op.hpp
Class DocumentationΒΆ
-
template<Statistics S>
class OpMakerΒΆ makes a tensor-level many-body operator
A many-body operator has the following generic form:
where are number of bra/ket indices of or, equivalently, the number of creators/annihilators of normal-ordered (w.r.t. the default vacuum) operator . Hence / are (quasi)particle creation/annihilation indices. For example, for fermionic operators relative to Fermi vacuum these are: (pure) excitation: (active) unoccupied/occupied, respectively;
(pure) deexcitation: occupied/unoccupied, respectively; For generic operators (neither excitation nor deexcitation) complete basis indices are assumed by default.
is the βnormalizationβ factor and depends on the vacuum used to define , and indices / .
Note
The choice of computational basis can be controlled by the default Context. See
SeQuant/core/context.hpp
andSeQuant/mbpt/context.hpp
Warning
Tensor
will be antisymmetrized if get_default_context().spbasis() == SPBasis::spinorbital
, else it will be particle-symmetric; the latter is only valid if # of bra and ket indices coincide.Public Types
Public Functions
-
template<typename IndexSpaceTypeRange1, typename IndexSpaceTypeRange2>
inline OpMaker(OpType op, const cre<IndexSpaceTypeRange1> &cre_list, const ann<IndexSpaceTypeRange2> &ann_list)ΒΆ - Parameters:
op β [in] the operator type
cre_list β [in] list of creator indices
ann_list β [in] list of annihilator indices
-
OpMaker(OpType op, ncre nc, nann na)ΒΆ
- Parameters:
op β [in] the operator type
nc β [in] number of bra indices/creators
na β [in] number of ket indices/annihilators
-
OpMaker(OpType op, std::size_t rank)ΒΆ
creates a particle-conserving replacement operator
- Parameters:
op β [in] the operator type
rank β [in] particle rank of the operator (# of creators = # of annihilators =
rank
)
-
OpMaker(OpType op, ncre nc, nann na, const cre<IndexSpace> &cre_space, const ann<IndexSpace> &ann_space)ΒΆ
- Parameters:
op β [in] the operator type
nc β [in] number of bra indices/creators
na β [in] number of ket indices/annihilators
cre_space β [in] IndexSpace referred to be the creator
ann_space β [in] IndexSpace referred to be the annihilators
-
ExprPtr operator()(std::optional<UseDepIdx> dep_opt = {}, std::optional<Symmetry> opsymm_opt = {}) constΒΆ
- Parameters:
dep_opt β [in] if given, controls whether bra (
*dep_opt == UseDepIdx::Bra
) / ket (*dep_opt == UseDepIdx::Ket
) indices are dependent on the, respectively, ket/bra indices (i.e., use them as protoindices); if (*dep_opt == UseDepIdx::None
) then plain indices are used; ifdep_opt
is not given then the default is determined by the MBPT context.opsymm_opt β [in] if given, controls whether (anti)symmetric tensor is returned; if
opsymm_opt
is not given then the default is determined by the MBPT context.
Public Static Functions
-
template<typename TensorGenerator>
static inline ExprPtr make(const container::svector<IndexSpace> &creators, const container::svector<IndexSpace> &annihilators, TensorGenerator &&tensor_generator, UseDepIdx dep = UseDepIdx::None)ΒΆ - Template Parameters:
TensorGenerator β callable with signature
TensorGenerator(range<Index>, range<Index>, Symmetry)
that returns a Tensor with the respective bra/cre and ket/ann indices and of the given symmetry- Parameters:
creators β [in] creator indices
annihilators β [in] annihilator indices
tensor_generator β [in] the callable that generates the tensor
dep β [in] whether to use dependent indices
-
template<typename TensorGenerator>
static inline ExprPtr make(std::initializer_list<IndexSpace::Type> creators, std::initializer_list<IndexSpace::Type> annihilators, TensorGenerator &&tensor_generator, UseDepIdx csv = UseDepIdx::None)ΒΆ
Protected Attributes
-
container::svector<IndexSpace> cre_spaces_ΒΆ
-
container::svector<IndexSpace> ann_spaces_ΒΆ