Documentation of MARTY
A Modern ARtificial Theoretical phYsicist
Public Member Functions | Protected Attributes | Friends
mty::QuantumField Class Reference

Class deriving from csl::TensorFieldElement, may enter expressions. In contrary to QuantumFieldParent, it is not a inherited from any class. More...

#include <quantumField.h>

Inheritance diagram for mty::QuantumField:
[legend]

Public Member Functions

 QuantumField (const csl::Tensor &t_vector, const csl::Parent &t_parent)
 Constructor with two parameters. More...
 
 QuantumField (const csl::Tensor &t_vector, const csl::Parent &t_parent, const std::vector< csl::Index > &indices)
 Constructor with three parameters. More...
 
 QuantumField (const csl::Tensor &t_vector, const csl::Parent &t_parent, const csl::IndexStructure &indices)
 Constructor with three parameters. More...
 
 QuantumField ()
 Default constructor. Initializes no parent and no space-time point. More...
 
 QuantumField (QuantumField const &)=default
 Default Copy constructor.
 
 QuantumField (QuantumField &&)=default
 Default Move constructor.
 
QuantumFieldoperator= (const QuantumField &other)=default
 Default copy assignement operator.
 
QuantumFieldoperator= (QuantumField &&)=default
 Default move assignement operator.
 
QuantumFieldParentgetQuantumParent () const
 Returns a pointer to the QuantumFieldParent of the field. More...
 
Particle getParticle () const
 Returns a mty::Particle, pointer to the parent of the field. More...
 
auto getGaugeIrrep () const
 
auto getFlavorIrrep () const
 
template<class GroupType >
auto getGroupIrrep (GroupType &&group) const
 
template<class FlavorGroupType >
auto getFlavorIrrep (FlavorGroupType &&group) const
 
int getSpinDimension () const
 See QuantumFieldParent::getSpinDimension(). More...
 
csl::Expr getEnergyDimension () const
 See QuantumFieldParent::getEnergyDimension(). More...
 
csl::Expr getMass () const
 See QuantumFieldParent::getMass(). More...
 
csl::Expr getWidth () const
 See QuantumFieldParent::getWidth(). More...
 
PartnerShip getPartnerShip () const
 
bool isChiral () const
 See QuantumFieldParent::isChiral(). More...
 
Chirality getChirality () const
 See QuantumFieldParent::getChirality(). More...
 
void setChirality (Chirality chirality)
 Sets the chirality of the particle. More...
 
bool isGaugeBoson () const
 See QuantumFieldParent::isGaugeBoson(). More...
 
csl::Expr getXiGauge () const
 See QuantumFieldParent::getXiGauge(). More...
 
csl::Expr getSquaredMass () const
 Returns the mass squared of the field. More...
 
bool getConjugated () const
 Tells if the field is complex conjugated. More...
 
bool isExternal () const
 Tells if the field is an external field. More...
 
bool isOnShell () const
 
bool isBosonic () const
 See QuantumFieldParent::isBosonic(). More...
 
bool isFermionic () const
 See QuantumFieldParent::isFermionic(). More...
 
bool isAntiCommuting () const
 See QuantumFieldParent::isAntiCommuting(). More...
 
bool isSelfConjugate () const
 See QuantumFieldParent::isSelfConjugate(). More...
 
bool isReal () const override
 
bool isPhysical () const
 Tells if the field is physical, i.e. may appear in external legs. More...
 
bool isContractibleWith (const QuantumField &other) const
 See QuantumFieldParent::isContractibleWith(). More...
 
bool isExactlyContractiblewith (const QuantumField &other) const
 Tests if the the field is exactly contractible with the other one. More...
 
void addDerivative (const csl::Index &index)
 Adds a derivative index to the the field. More...
 
bool hasDerivative () const
 Tells if the field has derivative indices. More...
 
csl::IndexStructure getDerivativeStructure () const
 Returns the derivative structure of the field. More...
 
csl::Expr getPropagator (const QuantumField &other, csl::Tensor &vertex) const
 Returns the propagator with another QuantumField. More...
 
csl::Expr getLSZInsertion (const csl::Tensor &momentum, bool ruleMode=false, bool lock=false) const
 Returns the expression of the LSZ insertion corresponding to the field. More...
 
QuantumField getConjugatedField () const
 Copies the field in a new new one and conjugates it before returning it. More...
 
csl::Expr contraction (csl::Expr_info other) const override
 
virtual csl::Expr matrixChargeConjugation (csl::Expr_info other) const
 
std::optional< csl::ExprgetComplexConjugate () const override
 Returns the complex conjugate expression of the field. More...
 
void conjugate ()
 Conjugates the field and changes its particle number. More...
 
void setExternal (bool t_external)
 Sets the external property of the particle. More...
 
void setOnShell (bool t_onShell)
 
virtual void setIncoming (bool t_incoming)
 Sets the incoming property of the particle. More...
 
virtual void setParticle (bool t_particle)
 Sets the particle property of the particle. More...
 
void setPartnerShip (PartnerShip const &t_partnerShip)
 
void setDerivativeStructure (const csl::IndexStructure &structure)
 Sets the derivative structure of the field. More...
 
bool getCommutable () const override
 Tells if the field is a commutable object in products. More...
 
bool commutesWith (csl::Expr_info other, int sign=-1) const override
 Tells if the field commutes with another expression. More...
 
bool hasContractionProperty (csl::Expr_info expr) const override
 Tells if the field has an indicial contraction property with another expression. More...
 
csl::unique_Expr copy_unique () const override
 Returns a copy of the field in a std::unique_ptr. More...
 
bool isIndexed () const override
 Tells if the field is indexed. More...
 
bool operator== (csl::Expr_info other) const override
 Compares the field with another expression. More...
 
bool compareWithDummy (csl::Expr_info other, std::map< csl::Index, csl::Index > &constraints, bool keepAllCosntraints=false) const override
 Compares the field with another expression. More...
 
bool operator< (const QuantumField &other) const
 Compares the simplicity of the field with another. More...
 
bool operator== (const QuantumField &other) const
 Compares the field with another. More...
 
bool operator!= (const QuantumField &other) const
 Compares the field with another. More...
 
bool isParticle () const
 Tells if the (external) field is a particle or anti particle. More...
 
bool isIncoming () const
 Tells if the (external) field is incoming or outgoing. More...
 
bool isIncomingParticle () const
 Tells if the (external) field is an incoming particle. More...
 
bool isOutgoingParticle () const
 Tells if the (external) field is an outgoing particle. More...
 
bool isIncomingAntiParticle () const
 Tells if the (external) field is an incoming anti-particle. More...
 
bool isOutgoingAntiParticle () const
 Tells if the (external) field is an outgoing an anti-particle. More...
 
- Public Member Functions inherited from csl::TensorFieldElement
csl::PrimaryType getPrimaryType () const override
 
csl::Type getType () const override
 
void print (int mode=0, std::ostream &out=std::cout, bool lib=false) const override
 
std::string printLaTeX (int mode=0) const override
 
std::optional< Exprevaluate (csl::eval::mode user_mode=csl::eval::base) const override
 
bool commutesWith (Expr_info expr, int sign=-1) const override
 
bool dependsOn (Expr_info expr) const override
 
bool dependsExplicitlyOn (Expr_info expr) const override
 
bool compareWithDummy (Expr_info other, std::map< Index, Index > &constraints, bool keepAllCosntraints=false) const override
 
bool operator== (Expr_info expr) const override
 
- Public Member Functions inherited from csl::TensorElement
 TensorElement (const Index &t_index, const Parent &t_parent)
 
 TensorElement (const std::vector< Index > &indices, const Parent &t_parent)
 
 TensorElement (const IndexStructure &indices, const Parent &t_parent)
 
 TensorElement (const Abstract *&expression)
 
 TensorElement (const Expr &expression)
 
int getNIndices () const override
 
IndexStructure getIndexStructure () const override
 
Index getIndex (int i) const override
 
bool askTerm (Expr_info expr, bool exact=false) const override
 
const std::vector< Equation *> & getProperties () const override
 
void addProperty (Equation *property) override
 
void removeProperty (Equation *property) override
 
bool checkIndexStructure (const std::vector< Index > &t_index) const override
 
std::optional< ExprreplaceIndex (const Index &indexToReplace, const Index &newIndex, bool refresh=true) const override
 
void setIndexStructure (const IndexStructure &t_index) override
 
bool hasContractionProperty (Expr_info B) const override
 
Expr contraction (Expr_info B) const override
 
Expr applyPermutation (const Permutation &permutations) const
 
csl::vector_expr getPermutations (bool optimize=true) const override
 
csl::vector_expr getAlternateForms () const override
 
std::optional< Exprderive (Expr_info expr) const override
 
- Public Member Functions inherited from csl::AbstractElement
 AbstractElement (const std::shared_ptr< AbstractParent > &t_parent)
 
Parent getParent () const override
 
std::string const & getName () const override
 
void setParent (const Parent &t_parent) override
 
void setName (const std::string &t_name) override
 
void setCommutable (bool t_commutable) override
 
int isPolynomial (Expr_info variable) const override
 
std::optional< ExprgetPolynomialTerm (Expr_info variable, int order) const override
 
- Public Member Functions inherited from csl::Complexified
std::optional< ExprgetRealPart () const override
 
Expr getImaginaryPart () const override
 
- Public Member Functions inherited from csl::AbstractBuildingBlock
bool isBuildingBlock () const override
 
std::optional< Exprexpand (bool full=false, bool inplace=false) const override
 
std::optional< Exprfactor (bool full=false) const override
 
std::optional< Exprfactor (Expr_info expr, bool full=false) const override
 
std::optional< ExprgetTerm () const override
 
std::optional< ExprgetComplexModulus () const override
 
std::optional< ExprfindSubExpression (Expr_info subExpression, const Expr &newExpression) const override
 
- Public Member Functions inherited from csl::Abstract
void printExplicit (int mode=0) const
 
virtual int getDim () const
 
virtual bool isInteger () const
 
virtual bool getValued () const
 
virtual long double getValue () const
 
virtual long long int getNum () const
 
virtual long long int getDenom () const
 
virtual int getNArgs (int axis=0) const
 
virtual csl::vector_expr::iterator begin ()
 
virtual csl::vector_expr::iterator end ()
 
virtual csl::vector_expr::const_iterator begin () const
 
virtual csl::vector_expr::const_iterator end () const
 
virtual Expr const & getArgument (int iArg=0) const
 
virtual Expr const & getArgument (const std::vector< int > &indices) const
 
virtual const csl::vector_expr & getVectorArgument () const
 
virtual Expr getVariable () const
 
virtual int getOrder () const
 
virtual int getSign () const
 
virtual bool isAnOperator () const
 
virtual bool isEmpty () const
 
virtual Expr getOperand () const
 
virtual std::vector< int > getShape () const
 
virtual IndexStructure getFreeIndexStructure () const
 
virtual int getNContractedPairs () const
 
virtual std::set< std::pair< int, int > > getContractedPair () const
 
virtual void setValue (long double t_value)
 
virtual void setArgument (const Expr &expr, int iArg=0)
 
virtual void setArgument (const Expr &expr, const std::vector< int > &indices)
 
virtual void setOperand (const Expr &operand)
 
virtual void setOperandPrivate (const Expr &operand, bool leaveEmpty)
 
virtual void setVectorArgument (const csl::vector_expr &t_argument)
 
virtual void insert (const Expr &expr, bool side=1)
 
virtual void setFullySymmetric ()
 
virtual void setFullyAntiSymmetric ()
 
virtual void addSymmetry (int i1, int i2)
 
virtual void addAntiSymmetry (int i1, int i2)
 
virtual int permut (int i1, int i2)
 
virtual Expr getNumericalFactor () const
 
virtual int getNFactor () const
 
virtual csl::vector_expr getFactors () const
 
virtual void getExponents (std::vector< Expr > const &factors, std::vector< Expr > &exponents) const
 
virtual bool checkIndexStructure (const std::initializer_list< Index > &index) const
 
virtual int getParity (Expr_info t_variable) const
 
virtual bool matchShape (Expr_info expr, bool exact=false) const
 
virtual long double evaluateScalar () const
 
virtual std::optional< Exprcollect (std::vector< Expr > const &factors, bool full=false) const
 
virtual Expr suppressTerm (Expr_info expr) const
 
virtual std::optional< ExprsuppressExponent (Expr const &factor, Expr const &exponent) const
 
virtual std::optional< Exprexpand_if (std::function< bool(Expr const &)> const &f, bool full=false, bool inPlace=false) const
 
virtual std::optional< ExprgetComplexArgument () const
 
virtual Expr applyOperator (const Expr &operand, bool leaveEmpty=false) const
 
virtual Expr addition_own (const Expr &expr) const
 
virtual Expr multiplication_own (const Expr &expr, bool side=1) const
 
virtual Expr division_own (const Expr &expr) const
 
virtual Expr exponentiation_own (const Expr &expr) const
 
virtual Expr getRegularExpression () const
 
virtual Expr tensordot (const Expr &expr) const
 
virtual Expr dot (const Expr &expr) const
 
virtual Expr getSum () const
 
virtual Expr getProduct () const
 
virtual Expr getVectorialModulus () const
 
virtual Expr getSubVectorial (int iExcept) const
 
virtual Expr getSubVectorial (int iExcept, int jExcept) const
 
virtual Expr getSubVectorial (const std::vector< int > &exceptions) const
 
virtual Expr determinant () const
 
virtual Expr trace () const
 
virtual Expr trace (int axis1, int axis2) const
 
virtual Expr transpose () const
 
virtual Expr symmetrise () const
 
virtual Expr antisymmetrise () const
 
virtual Expr inverseMatrix () const
 
virtual void operator= (double t_value)
 
virtual bool operator== (int t_value) const
 
virtual bool operator== (double t_value) const
 
virtual bool operator!= (int t_value) const
 
virtual bool operator!= (double t_value) const
 
bool operator!= (const Expr_c &expr) const
 
virtual Expr const & operator[] (int iArg) const
 
virtual Exproperator[] (int iArg)
 
virtual bool operator< (Expr_info expr) const=0
 
bool operator< (const Expr_c &expr) const
 
bool operator> (Expr_info expr) const
 
bool operator>= (Expr_info expr) const
 
bool operator<= (const Expr_c &expr) const
 

Protected Attributes

bool particle = true
 Tells if the QuantumField, if external, is a particle or an anti-particle. More...
 
bool external = false
 Tells if the field is external (initial of final state in computations) or not. More...
 
bool onShell = false
 
bool incoming = true
 Tells if the QuantumField, if external, is a incoming or outgoing. More...
 
csl::IndexStructure derivativeIndices {}
 csl::IndexStructure allowing to store derivative indices, to keep track of terms in \( \partial _\mu \) in computations while having only QuantumField objects. More...
 
PartnerShip partnerShip {}
 Wanted partner for fermion ordering in amplitude results, together with the number defining the fermion. More...
 
- Protected Attributes inherited from csl::TensorElement
IndexStructure index
 
- Protected Attributes inherited from csl::AbstractElement
std::shared_ptr< AbstractParentparent
 

Friends

template<typename ... Args>
csl::Expr quantumfield_s (Args &&...args)
 Creates and returns an expression corresponding to a QuantumField. More...
 

Detailed Description

Class deriving from csl::TensorFieldElement, may enter expressions. In contrary to QuantumFieldParent, it is not a inherited from any class.

Any quantum field (boson, fermion, gauge ...) will have QuantumField instances. This simplifies the use of a generic instance, QuantumField, that will ask its parent to know its own properties (contractions, commutation, spin, mass, ...). All physical information is contained in QuantumFieldParent and its derived classes, except the few attributes of QuantumField that are instance-specific. QuantumField objects will not be in general directly created by the user. Giving a QuantumFieldParent or a Particle, one should used their operator()() to create a QuantumField instance, as an actual expression that may enter in mathematical expressions.

See also
QuantumFieldParent, Particle, csl::Expr, TensorFieldElement, Particle::operator()().

Constructor & Destructor Documentation

◆ QuantumField() [1/4]

mty::QuantumField::QuantumField ( const csl::Tensor t_vector,
const csl::Parent t_parent 
)

Constructor with two parameters.

This constructor takes no index and concerns then scalar fields.

Parameters
t_vectorSpace_time point of the field.
t_parentParent (must be derived from QuantumFieldParent) of the field.

◆ QuantumField() [2/4]

mty::QuantumField::QuantumField ( const csl::Tensor t_vector,
const csl::Parent t_parent,
const std::vector< csl::Index > &  indices 
)

Constructor with three parameters.

Parameters
t_vectorSpace_time point of the field.
t_parentParent (must be derived from QuantumFieldParent) of the field.
indicesSet of indices of the tensor.

◆ QuantumField() [3/4]

mty::QuantumField::QuantumField ( const csl::Tensor t_vector,
const csl::Parent t_parent,
const csl::IndexStructure indices 
)

Constructor with three parameters.

Parameters
t_vectorSpace_time point of the field.
t_parentParent (must be derived from QuantumFieldParent) of the field.
indicesSet of indices of the tensor.

◆ QuantumField() [4/4]

mty::QuantumField::QuantumField ( )

Default constructor. Initializes no parent and no space-time point.

May be useful in some situations but keep in mind that a non initialized QuantumField is an invalid state and may cause problems.

Member Function Documentation

◆ addDerivative()

void mty::QuantumField::addDerivative ( const csl::Index index)

Adds a derivative index to the the field.

Parameters
indexDerivative index to add.
See also
derivativeIndices, hasDerivative(), getDerivativeStructure(), setDerivativeStructure().

◆ commutesWith()

bool mty::QuantumField::commutesWith ( csl::Expr_info  other,
int  sign = -1 
) const
override

Tells if the field commutes with another expression.

This function assumes only that for two anti-commuting fields \( \psi _1 \) and \( \psi _2 \) we have \(\{\psi _1, \psi _2\}=0\). This function returns in this case true iif sign = +1 (anticommutation). For all other cases, this function returns true if sign = -1. In particular, beware that anti-commuting fields embedded in more complicated expressions are not taken into account for now. This means that \( \{\psi_ 1, \psi _2+\psi _3\}\neq 0 \)

Parameters
otherExpression with which we test the commutation.
signSign of the commutation. +1 means anticommutation, -1 (default) means commutation.
Returns
True if the field commutes with other.
False else.

◆ compareWithDummy()

bool mty::QuantumField::compareWithDummy ( csl::Expr_info  other,
std::map< csl::Index, csl::Index > &  constraints,
bool  keepAllCosntraints = false 
) const
override

Compares the field with another expression.

Uses TensorFieldElement::compareWithDummy() and takes care of comparing the derivative structures of two fields if the other expression is another field (otherwise this function returns false). Dummy indices may compare succesfully with each other with different names. Only the abstract index structure is compared. Free indices must match exactly.

Parameters
otherExpression to compare.
constraintsMapping constraints between already compared dummy indices.
keepAllCosntraintsTell if constraints must be relaxed once pairs of indices are matched (default = false, the user should not need that).
Returns
True if the other expression is the same field, with the same structure (allowing different dummy indices) and space-time point.
False else.
See also
TensorFieldElement::compareWithDummy(), derivativeIndices.

◆ conjugate()

void mty::QuantumField::conjugate ( )

Conjugates the field and changes its particle number.

For example, a particle \( \phi (X) \) as insertion is an outgoing particle (otherwise it would be complex conjugated). Conjugating the particle, we get \( \phi ^*(X) \) an outgoing antiparticle.

See also
particle, getConjugatedField().

◆ copy_unique()

csl::unique_Expr mty::QuantumField::copy_unique ( ) const
override

Returns a copy of the field in a std::unique_ptr.

Returns
A std::unique_ptr<Abstract>, copy of the field.

◆ getChirality()

Chirality mty::QuantumField::getChirality ( ) const

See QuantumFieldParent::getChirality().

Returns
The chirality of the particle.

◆ getCommutable()

bool mty::QuantumField::getCommutable ( ) const
overridevirtual

Tells if the field is a commutable object in products.

Returns
True if the field is not anti commuting.
False else.
See also
#bosonic, isBosonic(), isFermionic(), isAntiCommuting().

Reimplemented from csl::AbstractElement.

◆ getComplexConjugate()

optional< csl::Expr > mty::QuantumField::getComplexConjugate ( ) const
overridevirtual

Returns the complex conjugate expression of the field.

Returns
The complex conjugate expression of the field.
See also
conjugate(), getConjugatedField().

Reimplemented from csl::TensorElement.

◆ getConjugated()

bool mty::QuantumField::getConjugated ( ) const

Tells if the field is complex conjugated.

Returns
True if the field is complex conjugated.
False else.
See also
Complexified::conjugated.

◆ getConjugatedField()

QuantumField mty::QuantumField::getConjugatedField ( ) const

Copies the field in a new new one and conjugates it before returning it.

Returns
The conjugated field.
See also
conjugate().

◆ getDerivativeStructure()

csl::IndexStructure mty::QuantumField::getDerivativeStructure ( ) const

Returns the derivative structure of the field.

Returns
The derivative structure of the field.
See also
derivativeIndices, addDerivative(), hasDerivative(), setDerivativeStructure().

◆ getEnergyDimension()

csl::Expr mty::QuantumField::getEnergyDimension ( ) const

See QuantumFieldParent::getEnergyDimension().

Returns
The energy dimension of the particle.

◆ getLSZInsertion()

csl::Expr mty::QuantumField::getLSZInsertion ( const csl::Tensor momentum,
bool  ruleMode = false,
bool  lock = false 
) const

Returns the expression of the LSZ insertion corresponding to the field.

Parameters
momentumMomentum of the insertion.
ruleModeBoolean that is true if we want to determine the feynman rule (in this case the insertion is not the same).
Returns
The expressoin of the LSZ insertion.

◆ getMass()

csl::Expr mty::QuantumField::getMass ( ) const

See QuantumFieldParent::getMass().

Returns
The mass of the particle.

◆ getParticle()

Particle mty::QuantumField::getParticle ( ) const
inline

Returns a mty::Particle, pointer to the parent of the field.

As QuantumField inherits from csl::TensorFieldElement, its parent is in the form of a csl::Parent. This function then makes a conversion to a mty::Particle before returning the pointer.

Returns
A shared pointer to the QuantumFieldParent (i.e. mty::Particle) of the field.

◆ getPropagator()

csl::Expr mty::QuantumField::getPropagator ( const QuantumField other,
csl::Tensor vertex 
) const

Returns the propagator with another QuantumField.

This function checks if the propagator is non null with isExactlyContractiblewith(). Then, it ensure that if the field is not self-conjugate the conjugated field is on the right of the contraction (and adds a minus sign if the field is anti-commuting).

Parameters
otherOther field in the contraction.
vertexMomentum integrated in the propagator.
Returns
The expression of the propagator.
See also
isExactlyContractiblewith(), isAntiCommuting(), isSelfConjugate(), QuantumFieldParent::getPropagator(), QuantumFieldParent::getInvPropagator(), , QuantumFieldParent::propagator, Propagator_func, quantumFieldTheory.h.

◆ getQuantumParent()

QuantumFieldParent* mty::QuantumField::getQuantumParent ( ) const
inline

Returns a pointer to the QuantumFieldParent of the field.

As QuantumField inherits from csl::TensorFieldElement, its parent is in the form of a csl::Parent. This function then makes a conversion to a mty::QuantumFieldParent before returning the pointer.

Returns
A pointer to the QuantumFieldParent of the field.

◆ getSpinDimension()

int mty::QuantumField::getSpinDimension ( ) const

See QuantumFieldParent::getSpinDimension().

Returns
Twice the spin of the particle.

◆ getSquaredMass()

csl::Expr mty::QuantumField::getSquaredMass ( ) const

Returns the mass squared of the field.

Equivalent to pow_s(getMass(), 2).

Returns
The squared mass of the particle.

◆ getWidth()

csl::Expr mty::QuantumField::getWidth ( ) const

See QuantumFieldParent::getWidth().

Returns
The width of the particle.

◆ getXiGauge()

csl::Expr mty::QuantumField::getXiGauge ( ) const

See QuantumFieldParent::getXiGauge().

Returns
The expression of the \( \xi \) parameter of a gauge boson.

◆ hasContractionProperty()

bool mty::QuantumField::hasContractionProperty ( csl::Expr_info  expr) const
override

Tells if the field has an indicial contraction property with another expression.

This functoin overrides the one of csl::TensorFieldElement and make sure to return false each time.

Parameters
exprOther expression.
Returns
False.

◆ hasDerivative()

bool mty::QuantumField::hasDerivative ( ) const

Tells if the field has derivative indices.

Returns
True if the derivative structure derivativeIndices is not empty.
False else.
See also
derivativeIndices, addDerivative(), getDerivativeStructure(), setDerivativeStructure().

◆ isAntiCommuting()

bool mty::QuantumField::isAntiCommuting ( ) const

See QuantumFieldParent::isAntiCommuting().

Returns
True if the field is anti-commuting (fermion or ghost).
False else.

◆ isBosonic()

bool mty::QuantumField::isBosonic ( ) const

See QuantumFieldParent::isBosonic().

Returns
True if the field is bosonic.
False else.

◆ isChiral()

bool mty::QuantumField::isChiral ( ) const

See QuantumFieldParent::isChiral().

Returns
True if the particle is chiral.
False else.

◆ isContractibleWith()

bool mty::QuantumField::isContractibleWith ( const QuantumField other) const

See QuantumFieldParent::isContractibleWith().

Parameters
otherField to test if there is a contraction.
Returns
True if the field is contractible with the other field.
False else.

◆ isExactlyContractiblewith()

bool mty::QuantumField::isExactlyContractiblewith ( const QuantumField other) const

Tests if the the field is exactly contractible with the other one.

The condition that does not appear in isContractibleWith() is the complex conjugation of the field. In the first function, we test only that a propagator exists between the two abstract fields. Here, we test also if either the field is self-conjugate or one an only one of the two fields is complex conjugated. Other wise, even if a propagator exists, the contraction gives zero and this function returns false.

Parameters
otherField with which we test the contraction.
Returns
True if the actual contraction of the two fields is not zero.
False else.

◆ isExternal()

bool mty::QuantumField::isExternal ( ) const

Tells if the field is an external field.

Returns
True if the field is external.
False else.
See also
external, setExternal(), Insertion.

◆ isFermionic()

bool mty::QuantumField::isFermionic ( ) const

See QuantumFieldParent::isFermionic().

Returns
True if the field is fermionic.
False else.

◆ isGaugeBoson()

bool mty::QuantumField::isGaugeBoson ( ) const

See QuantumFieldParent::isGaugeBoson().

Returns
True if the particle is a gauge boson.
False else.

◆ isIncoming()

bool mty::QuantumField::isIncoming ( ) const

Tells if the (external) field is incoming or outgoing.

Returns
True if the field is incoming.
False else.
See also
incoming, setIncoming(), isIncoming(), isIncomingParticle(), isIncomingAntiParticle(), isOutgoingParticle(), isOutgoingAntiParticle().

◆ isIncomingAntiParticle()

bool mty::QuantumField::isIncomingAntiParticle ( ) const

Tells if the (external) field is an incoming anti-particle.

Returns
True if the field is incoming and is an anti-particle.
False else.
See also
isIncoming(), isParticle(), isIncomingParticle(), isOutgoingParticle(), isOutgoingAntiParticle().

◆ isIncomingParticle()

bool mty::QuantumField::isIncomingParticle ( ) const

Tells if the (external) field is an incoming particle.

Returns
True if the field is incoming and is a particle.
False else.
See also
isIncoming(), isParticle(), isIncomingAntiParticle(), isOutgoingParticle(), isOutgoingAntiParticle().

◆ isIndexed()

bool mty::QuantumField::isIndexed ( ) const
overridevirtual

Tells if the field is indexed.

Returns
True if the field has proper indices or derivative indices.
False else.

Reimplemented from csl::TensorFieldElement.

◆ isOutgoingAntiParticle()

bool mty::QuantumField::isOutgoingAntiParticle ( ) const

Tells if the (external) field is an outgoing an anti-particle.

Returns
True if the field is outgoing and is an anti-particle.
False else.
See also
isIncoming(), isParticle(), isIncomingAntiParticle(), isIncomingParticle(), isOutgoingParticle().

◆ isOutgoingParticle()

bool mty::QuantumField::isOutgoingParticle ( ) const

Tells if the (external) field is an outgoing particle.

Returns
True if the field is outgoing and is a particle.
False else.
See also
isIncoming(), isParticle(), isIncomingAntiParticle(), isIncomingParticle(), isOutgoingAntiParticle().

◆ isParticle()

bool mty::QuantumField::isParticle ( ) const

Tells if the (external) field is a particle or anti particle.

Returns
True if the field is a particle.
False else.
See also
particle, setParticle(), isIncoming(), isIncomingParticle(), isIncomingAntiParticle(), isOutgoingParticle(), isOutgoingAntiParticle().

◆ isPhysical()

bool mty::QuantumField::isPhysical ( ) const

Tells if the field is physical, i.e. may appear in external legs.

If the field is not physical, it will be forbidden in external legs. In particular, the function setExternal() will yield an error. For example, ghosts and goldstone bosons are not physical.

See also
#physical, isExternal(), setExternal(), setPhysical(), Insertion.
Returns
True if the field is physical.
False else.

◆ isSelfConjugate()

bool mty::QuantumField::isSelfConjugate ( ) const

See QuantumFieldParent::isSelfConjugate().

Returns
True if the field is real.
False else.

◆ operator!=()

bool mty::QuantumField::operator!= ( const QuantumField other) const

Compares the field with another.

Parameters
otherOther field.
Returns
True if the field is equal to other.
False else.
See also
operator==(csl::Expr_info).

◆ operator<()

bool mty::QuantumField::operator< ( const QuantumField other) const

Compares the simplicity of the field with another.

Parameters
otherOther field.
Returns
True if the field is simpler than other.
False else.
See also
TensorFieldElement::operator<().

◆ operator==() [1/2]

bool mty::QuantumField::operator== ( csl::Expr_info  other) const
override

Compares the field with another expression.

Uses TensorFieldElement::operator==() and takes care of comparing the derivative structures of two fields if the other expression is another field (otherwise this function returns false).

Parameters
otherExpression to compare.
Returns
True if the other expression is the same field, with the same structure and space-time point.
False else.
See also
TensorFieldElement::operator==(), derivativeIndices.

◆ operator==() [2/2]

bool mty::QuantumField::operator== ( const QuantumField other) const

Compares the field with another.

Parameters
otherOther field.
Returns
True if the field is equal to other.
False else.
See also
operator==(csl::Expr_info).

◆ setChirality()

void mty::QuantumField::setChirality ( Chirality  chirality)

Sets the chirality of the particle.

This function should be called wisely. If the chirality is not consistent, it will raise an error. In particular, it should be used only for fermions that are linked (one DiracFermion and two WeylFermion). In this case, setting the chirality of the particle is equivalent to change its parent. chirality may be left or right (a WeylFermion takes the place of the parent) or none (a DiracFermion takes the place of the parent).

Parameters
chiralityNew chirality of the particle.
See also
QuantumFieldParent::getDiracParent(), QuantumFieldParent::getWeylFermion(), QuantumFieldParent::getChiralityCounterPart(), setParent().

◆ setDerivativeStructure()

void mty::QuantumField::setDerivativeStructure ( const csl::IndexStructure structure)

Sets the derivative structure of the field.

Parameters
structureNew derivative structure.
See also
derivativeIndices, getDerivativeStructure().

◆ setExternal()

void mty::QuantumField::setExternal ( bool  t_external)

Sets the external property of the particle.

Parameters
t_externalMust be true if the field is an external leg, false otherwise.
See also
external, isExternal().

◆ setIncoming()

void mty::QuantumField::setIncoming ( bool  t_incoming)
virtual

Sets the incoming property of the particle.

Parameters
t_incomingMust be true if the field is incoming, false otherwise.
See also
incoming, isIncoming().

Reimplemented in mty::PolarizationField.

◆ setParticle()

void mty::QuantumField::setParticle ( bool  t_particle)
virtual

Sets the particle property of the particle.

Parameters
t_particleMust be true if the field is a particle, false otherwise.
See also
particle, isParticle().

Reimplemented in mty::PolarizationField.

Friends And Related Function Documentation

◆ quantumfield_s

template<typename ... Args>
csl::Expr quantumfield_s ( Args &&...  args)
friend

Creates and returns an expression corresponding to a QuantumField.

Template Parameters
ArgsVariadic template parameters.
Parameters
argsVariadic function parameters, may be anything. Forwarded to csl::make_shared().
Returns
The expression of the field.

Field Documentation

◆ derivativeIndices

csl::IndexStructure mty::QuantumField::derivativeIndices {}
protected

csl::IndexStructure allowing to store derivative indices, to keep track of terms in \( \partial _\mu \) in computations while having only QuantumField objects.

This member allows to have an internal representation of the following definition for a field \( A_\mu ^I \):

\[ \partial _\mu A_\nu ^I \equiv A^I_{\nu,\mu}. \]

The derivative disappear and indices are transfered in the structure of the field.

See also
addDerivative(), hasDerivative(), getDerivativeStructure(), wick::Graph, wick::WickCalculator, Expander, AmplitudeCalculator.

◆ external

bool mty::QuantumField::external = false
protected

Tells if the field is external (initial of final state in computations) or not.

See also
isExternal(), setExternal(), isIncomingParticle(), isIncomingAntiParticle(), isOutgoingParticle(), isOutgoingAntiParticle(), setIncoming(), setExternal(), setParticle().

◆ incoming

bool mty::QuantumField::incoming = true
protected

Tells if the QuantumField, if external, is a incoming or outgoing.

As for the attribute particle, this boolean will determine if the field must be complex conjugated or not. Depending on its spin, if it is an incoming particle, outgoing anti-particle...

See also
isIncomingParticle(), isIncomingAntiParticle(), isOutgoingParticle(), isOutgoingAntiParticle(), setIncoming(), setExternal(), setParticle().

◆ particle

bool mty::QuantumField::particle = true
protected

Tells if the QuantumField, if external, is a particle or an anti-particle.

As for the attribute incoming, this boolean will determine if the field must be complex conjugated or not. Depending on its spin, if it is an incoming particle, outgoing anti-particle...

See also
isIncomingParticle(), isIncomingAntiParticle(), isOutgoingParticle(), isOutgoingAntiParticle(), setIncoming(), setExternal(), setParticle().

◆ partnerShip

PartnerShip mty::QuantumField::partnerShip {}
protected

Wanted partner for fermion ordering in amplitude results, together with the number defining the fermion.

Fermion ordering is determined outside (possibly by the user) and the information is stored in the quantum field itself to know what fermions must be paired together during simplifications. If fermions are not paired accordingly to the defined order (if there is one), Fierz identities are applied to correct the amplitude, like in the following with external fermions notes as 1,2,3,4 and \( \Gamma^A \) are chains of \( \gamma\)-matrices:

\[ \left(\Gamma^A\right)_{14}\left(\Gamma^B\right)_{32} = \sum _{C,D} C^{AB}_{CD}\left(\Gamma^C\right)_{12}\left(\Gamma^D\right)_{34}, \]

where \( C^{AB}_{CD} \) are scalar coefficients determined by the generalized Fierz identities.


The documentation for this class was generated from the following files: