Documentation of MARTY
A Modern ARtificial Theoretical phYsicist
Public Member Functions | Protected Attributes | Private Member Functions | Static Private Member Functions
mty::Wick Class Reference

csl compatible expression representing the operator <> of correlators in quantum field theory. Applies only on QuantumField, and uses WickCalculator to evaluate to expression (applying wick theorem). More...

#include <wick.h>

Inheritance diagram for mty::Wick:
[legend]

Public Member Functions

 Wick ()
 Default constructor.
 
 Wick (const csl::Expr &expr)
 Constructor with one parameter. More...
 
 ~Wick ()
 Destructor.
 
csl::Type getType () const override
 
void print (int mode=0, std::ostream &out=std::cout, bool lib=false) const override
 
void printCode (int mode=0, std::ostream &out=std::cout) const override
 
std::string printLaTeX (int mode=0) const override
 
std::optional< csl::Exprevaluate (csl::eval::mode user_mode=csl::eval::base) const override
 
bool operatorAppliesOn (csl::Expr_info expr) const override
 Wick applies on an expression if and only of it contains quantum fields. More...
 
csl::Expr getOperand () const override
 
void setOperand (const csl::Expr &operand) override
 
bool operator== (csl::Expr_info other) const override
 
csl::unique_Expr copy_unique () const override
 
csl::Expr deepCopy () const override
 
csl::Expr refresh () const override
 
csl::Expr deepRefresh () const override
 

Protected Attributes

bool rightForm = false
 Boolean that tells if the argument of the operator has the right form to be contracted (see checkRightForm()).
 

Private Member Functions

bool checkEvenNumberOfFields () const
 Counts the total number of fields in the (possible) product, and replaces the argument by CSL_0 if the number is odd.
 
void checkRightForm ()
 Checks if the argument contains only quantum fields or powers of quantum fields in a product (Prod). If no, the member rightForm is set to false and further evaluation of wick contraction cannot be performed.
 
void expandToRightForm ()
 

Static Private Member Functions

static int numberOfFields (const csl::Expr &expr)
 Counts the number of quantum fields in an expression. Counts also when fields appear to an integer power. More...
 

Detailed Description

csl compatible expression representing the operator <> of correlators in quantum field theory. Applies only on QuantumField, and uses WickCalculator to evaluate to expression (applying wick theorem).

Inherits from Operator<AbstractFunc>, i.e. Wick is an Operator (see operator.h) that contains a single argument.

Constructor & Destructor Documentation

◆ Wick()

mty::Wick::Wick ( const csl::Expr expr)
explicit

Constructor with one parameter.

Parameters
exprcsl::Expr initializing the argument of the operator.

Member Function Documentation

◆ numberOfFields()

int mty::Wick::numberOfFields ( const csl::Expr expr)
staticprivate

Counts the number of quantum fields in an expression. Counts also when fields appear to an integer power.

Parameters
exprcsl::Expr in which we search quantum fields. Must be a single field or a power of field.
Returns
The number of quantum fields in expr if it is a field or power of fields.
-1 else.

◆ operatorAppliesOn()

bool mty::Wick::operatorAppliesOn ( csl::Expr_info  expr) const
override

Wick applies on an expression if and only of it contains quantum fields.

Parameters
exprcsl::Expr from which we check the dependancy.
Returns
True if expr contains quantum fields.
False else.

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