示例#1
0
 def __init__(self,
              name,
              c_name,
              num_of_inds,
              has_flavor=True,
              order=2,
              max_dim=4):
     """
     Args:
         name (string): name identifier of the corresponding tensor
         c_name (string): name identifier of the conjugate tensor
         num_of_inds (int): number of indices of the corr. tensor
         has_flavor (bool): specifies if there are several generations
         order (int): maximum order in the derivatives for the propagator
     """
     self.name = name
     self.c_name = c_name
     self.num_of_inds = num_of_inds
     mass = "M" + self.name
     free_mass_inds = [-num_of_inds] if has_flavor else None
     self.free_inv_mass_sq = power_op(mass, -2, indices=free_mass_inds)
     mass_inds = [num_of_inds - 1] if has_flavor else None
     self.mass_sq = power_op(mass, 2, indices=mass_inds)
     self.order = order
     self.max_dim = max_dim
示例#2
0
 def __init__(self,
              name,
              L_name,
              R_name,
              Lc_name,
              Rc_name,
              num_of_inds,
              has_flavor=True):
     """
     Args:
         name (string): name of the field
         L_name (string): name of the left-handed part
         R_name (string): name of the right-handed part
         Lc_name (string): name of the conjugate of the left-handed part
         Rc_name (string): name of the conjugate of the right-handed part
         num_of_inds (int): number of indices of the corresponding tensor
         has_flavor (bool): specifies if there are several generations
     """
     self.name = name
     self.L_name = L_name
     self.R_name = R_name
     self.Lc_name = Lc_name
     self.Rc_name = Rc_name
     self.num_of_inds = num_of_inds
     mass = "M" + self.name
     free_mass_inds = [-num_of_inds] if has_flavor else None
     self.free_inv_mass = power_op(mass, -1, indices=free_mass_inds)
     mass_inds = [num_of_inds - 1] if has_flavor else None
     self.mass = power_op(mass, 1, indices=mass_inds)
示例#3
0
def collect_powers(operator):
    """
    Collect all the tensors that are equal and return the correspondin
    powers.
    """
    new_tensors = []
    symbols = {}
    for tensor in operator.tensors:
        if tensor.is_field or tensor.name[0] == "$" or tensor.exponent is None:
            new_tensors.append(tensor)
        else:
            # Previusly collected exponent for same base and indices
            prev_exponent = symbols.get((tensor.name, tuple(tensor.indices)),
                                        0)

            # The exponents of a product are added
            symbols[(tensor.name, tuple(tensor.indices))] = (tensor.exponent +
                                                             prev_exponent)

    # Remove tensors with exponent 0
    new_op = Operator([])
    for (name, inds), exponent in symbols.items():
        if exponent != 0:
            new_op *= power_op(name, exponent, indices=inds)

    return new_op * Op(*new_tensors)
示例#4
0
 def __init__(self, name, c_name, num_of_inds, has_flavor=True):
     """
     Args:
         name (string): name identifier of the corresponding tensor
         c_name (string): name identifier of the conjugate tensor
         num_of_inds (int): number of indices of the corresponding tensor
         has_flavor (bool): specifies if there are several generations
     """
     self.name = name
     self.c_name = c_name
     self.num_of_inds = num_of_inds
     mass = "M" + self.name
     free_mass_inds = [-num_of_inds] if has_flavor else None
     self.free_inv_mass = power_op(mass, -1, indices=free_mass_inds)
     mass_inds = [num_of_inds - 1] if has_flavor else None
     self.mass = power_op(mass, 1, indices=mass_inds)
示例#5
0
     OpSum(-number_op(Fraction(4, 3)) * Op(kdelta(-1, -2), kdelta(-3, -4)),
           number_op(Fraction(8, 3)) * Op(kdelta(-1, -4), kdelta(-3, -2))))
]
r"""
Substitute 
:math:`C^I_{ap}\epsilon_{pm}\sigma^a_{ij}
C^{I*}_{bq}\epsilon_{qn}\sigma^b_{kl}` by the equivalent
:math:`-\frac{2}{3}\delta_{mn}\delta_{ij}\delta_{kl}
+\frac{4}{3}\delta_{mn}\delta_{il}\delta_{kj}
+\frac{2}{3}\delta_{ml}\delta_{in}\delta_{kj}
-\frac{2}{3}\delta_{mj}\delta_{il}\delta_{kn}`.
"""

rules_f_sigmas = [
    (Op(fSU2(0, 1, 2), sigmaSU2(0, -1, -2), sigmaSU2(1, -3, -4),
        sigmaSU2(2, -5, -6)), OpSum(power_op("sqrt(2)", 1)) *
     OpSum(Op(kdelta(-1, -2), kdelta(-3, -4), kdelta(
         -5, -6)), -Op(kdelta(-1, -2), kdelta(-3, -6), kdelta(-5, -4)),
           -Op(kdelta(-1, -4), kdelta(-3, -2), kdelta(-5, -6)),
           number_op(2) * Op(kdelta(-1, -4), kdelta(-3, -6), kdelta(-5, -2)),
           -Op(kdelta(-1, -6), kdelta(-3, -4), kdelta(-5, -2)))),
    (Op(fSU2(-1, 0, 1), sigmaSU2(0, -2, 2), sigmaSU2(1, 2, -3)),
     OpSum(-power_op("sqrt(2)", 1) * Op(sigmaSU2(-1, -2, -3)))),
    (Op(fSU2(1, -1, 0), sigmaSU2(0, -2, 2), sigmaSU2(1, 2, -3)),
     OpSum(-power_op("sqrt(2)", 1) * Op(sigmaSU2(-1, -2, -3)))),
    (Op(fSU2(0, 1, -1), sigmaSU2(0, -2, 2), sigmaSU2(1, 2, -3)),
     OpSum(-power_op("sqrt(2)", 1) * Op(sigmaSU2(-1, -2, -3)))),
    (Op(fSU2(0, -1, 1), sigmaSU2(0, -2, 2), sigmaSU2(1, 2, -3)),
     OpSum(power_op("sqrt(2)", 1) * Op(sigmaSU2(-1, -2, -3))))
]