def apply_diff_op(self, operator_sum): """ Apply the diff. op. (D_mu D_nu - D^2 eta_{munu})/M^2. The index mu is to be contracted with the first free index of the operator sum J_mu provided as an argument. """ n = self.num_of_inds inds_1 = [0] + list(range(-2, -n - 1, -1)) inds_2 = list(range(-1, -n - 1, -1)) generic_1 = Op(generic(*inds_1)) generic_2 = Op(generic(*inds_2)) generic_der_1 = apply_derivatives([0, -1], generic_1) generic_der_2 = apply_derivatives([0, 0], generic_2) structure = ( OpSum(self.free_inv_mass_sq) * generic_der_1 + OpSum(number_op(-1) * self.free_inv_mass_sq) * generic_der_2) return structure.replace_all({"generic": operator_sum}, 6)
def quadratic_terms(self): n = self.num_of_inds f1 = Op( Tensor(self.name, list(range(n)), is_field=True, dimension=1, statistics=boson)) f2 = Op( Tensor(self.name, [n] + list(range(1, n)), is_field=True, dimension=1, statistics=boson)) half = OpSum(number_op(Fraction(1, 2))) kin1 = -half * f1.derivative(n) * f1.derivative(n) kin2 = half * f2.derivative(0) * f1.derivative(n) mass_term = half * OpSum(self.mass_sq * f1 * f1) return kin1 + kin2 + mass_term
def quadratic_terms(self): """Construct the quadratic terms DSc DS + M^2 Sc S.""" n = self.num_of_inds f = Tensor(self.name, list(range(n)), is_field=True, dimension=1, statistics=boson) c_f = Tensor(self.c_name, list(range(n)), is_field=True, dimension=1, statistics=boson) f_op = Op(f) c_f_op = Op(c_f) kinetic_term = Op(c_f).derivative(n + 1) * Op(f).derivative(n + 1) mass_term = number_op(-1) * self.mass_sq * c_f_op * f_op return kinetic_term + OpSum(mass_term)
def collect_numbers(operator): """ Collect all the tensors representing numbers into a single one. A tensor is understood to represent a number when its name is ``"$number"`` or ``$i``. """ new_tensors = [] number = 1 i_count = 0 is_complex = False for tensor in operator.tensors: if tensor.name == "$number": if tensor.content.imag != 0: is_complex = True number *= tensor.content elif tensor.name == "$i": i_count += 1 else: new_tensors.append(tensor) result = Operator(new_tensors) if is_complex: number *= {0: 1, 1: 1j, 2: -1, 3: -1j}[i_count % 4] else: number, result = { 0: (number, result), 1: (number, i_op * result), 2: (-number, result), 3: (-number, i_op * result) }[i_count % 4] # Remove coefficients 1 if number == 1: return result return number_op(number) * result
Op(kappa(), Xi(0), phic(1), sigma(0, 1, 2), phi(2)), Op(lamb(), Xi(0), Xi(0), phic(1), phi(1))) # Integration heavy_Xi = RealScalar("Xi", 1, has_flavor=False) heavy_fields = [heavy_Xi] max_dim = 6 effective_lagrangian = integrate(heavy_fields, interaction_lagrangian, max_dim) # Transformations of the effective Lgrangian fierz_rule = (Op(sigma(0, -1, -2), sigma(0, -3, -4)), OpSum( number_op(2) * Op(kdelta(-1, -4), kdelta(-3, -2)), -Op(kdelta(-1, -2), kdelta(-3, -4)))) Ophi6 = tensor_op("Ophi6") Ophi4 = tensor_op("Ophi4") O1phi = tensor_op("O1phi") O3phi = tensor_op("O3phi") ODphi = tensor_op("ODphi") ODphic = tensor_op("ODphic") definition_rules = [ (Op(phic(0), phi(0), phic(1), phi(1), phic(2), phi(2)), OpSum(Ophi6)), (Op(phic(0), phi(0), phic(1), phi(1)), OpSum(Ophi4)), (Op(D(2, phic(0)), D(2, phi(0)), phic(1), phi(1)), OpSum(O1phi)), (Op(phic(0), D(2, phi(0)), D(2, phic(1)), phi(1)), OpSum(O3phi)), (Op(phic(0), D(2, phi(0)), phic(1), D(2, phi(1))), OpSum(ODphi)),
# Integration heavy_D = VectorLikeFermion("D", "DL", "DR", "DLc", "DRc", 3) heavy_DY = VectorLikeFermion("DY", "DYL", "DYR", "DYLc", "DYRc", 4) heavy_fields = [heavy_D, heavy_DY] effective_lagrangian = integrate(heavy_fields, interaction_lagrangian, 6) # Transformations of the effective Lgrangian extra_SU2_identities = [(Op(phi(0), epsSU2(0, 1), phi(1)), OpSum()), (Op(phic(0), epsSU2(0, 1), phic(1)), OpSum()), (Op(qLc(0, 5, 1, -1), sigma4bar(2, 0, 3), qL(3, 5, 4, -2), phic(4), D(2, phi(1))), OpSum( number_op(-0.5j) * basis.O3phiq(-1, -2), number_op(-0.5j) * basis.O1phiq(-1, -2))), (Op(qLc(0, 5, 1, -2), sigma4bar(2, 0, 3), qL(3, 5, 4, -1), D(2, phic(4)), phi(1)), OpSum( number_op(0.5j) * basis.O3phiqc(-1, -2), number_op(0.5j) * basis.O1phiqc(-1, -2)))] rules = (rules_SU2 + eoms_SM + extra_SU2_identities + basis.rules_basis_definitions) transf_eff_lag = apply_rules(effective_lagrangian, rules, 2) # Output if __name__ == "__main__":
uRc = FieldBuilder("uRc", 1.5, fermion) r"""Conjugate of the up quark right-handed doublet""" bFS = FieldBuilder("bFS", 2, boson) r""":math:`U(1)` gauge field strength :math:`B_{\mu\nu}`""" wFS = FieldBuilder("wFS", 2, boson) r""":math:`SU(2)` gauge field strength :math:`W^a_{\mu\nu}`""" gFS = FieldBuilder("gFS", 2, boson) r""":math:`SU(3)` gauge field strength :math:`G^A_{\mu\nu}`""" # Equations of motion eom_phi = ( Op(D(0, D(0, phi(-1)))), OpSum(Op(mu2phi(), phi(-1)), -number_op(2) * Op(lambdaphi(), phic(0), phi(0), phi(-1)), -Op(yec(0, 1), eRc(2, 1), lL(2, -1, 0)), -Op(ydc(0, 1), dRc(2, 3, 1), qL(2, 3, -1, 0)), -Op(Vc(0, 1), yu(0, 2), qLc(3, 4, 5, 1), uR(3, 4, 2), epsSU2(5, -1)))) r""" Rule using the Higgs doublet equation of motion. Substitute :math:`D^2\phi` by .. math:: \mu^2_\phi \phi- 2\lambda_\phi (\phi^\dagger\phi) \phi - y^{e*}_{ij} \bar{e}_{Rj} l_{Li} - y^{d*}_{ij} \bar{d}_{Rj} q_{Li} + V^*_{ki} y^u_{kj} i\sigma^2 \bar{q}^T_{Li} u_{Rj} """ eom_phic = ( Op(D(0, D(0, phic(-1)))),
""" TSU3 = TensorBuilder("TSU3") r""" :math:`SU(3)` generators :math:`(T_A)_{BC}` (half of the Gell-Mann matrices). """ fSU3 = TensorBuilder("fSU3") r""" :math:`SU(3)` structure constants :math:`f_{ABC}`. """ rule_SU3_eps = (Op(epsSU3(0, -1, -2), epsSU3(0, -3, -4)), OpSum(-Op(kdelta(-1, -4), kdelta(-3, -2)), Op(kdelta(-1, -3), kdelta(-2, -4)))) rule_fierz_SU3 = (Op(TSU3(0, -1, -2), TSU3(0, -3, -4)), OpSum( number_op(Fraction(1, 2)) * Op(kdelta(-1, -4), kdelta(-3, -2)), -number_op(Fraction(1, 6)) * Op(kdelta(-1, -2), kdelta(-3, -4)))) rules_SU3 = [rule_SU3_eps, rule_fierz_SU3] latex_SU3 = { "epsSU3": r"\epsilon_{{{}{}{}}}", "TSU3": r"(T_{})_{{{}{}}}", "fSU3": r"f_{{{}{}{}}}" }
Totally antisymmetric tensor with four Lorentz vector indices :math:`\epsilon_{\mu\nu\rho\sigma}` where :math:`\epsilon_{0123}=1`. """ sigmaTensor = TensorBuilder("sigmaTensor") r""" Lorentz tensor :math:`\sigma^{\mu\nu}=\frac{i}{4}\left( \sigma^\mu_{\alpha\dot{\gamma}}\bar{\sigma}^{\nu\dot{\gamma}\beta}- \sigma^\nu_{\alpha\dot{\gamma}}\bar{\sigma}^{\mu\dot{\gamma}\beta} \right)`. """ rule_Lorentz_free_epsUp = ( Op(epsUp(-1, -2), epsUpDot(-3, -4)), OpSum(number_op(Fraction(1, 2)) * Op( sigma4bar(0, -3, -1), sigma4bar(0, -4, -2)))) r""" Substitute :math:`\epsilon^{\alpha\beta}\epsilon^{\dot{\alpha}\dot{\beta}}` by .. math:: -\frac{1}{2} \bar{\sigma}^{\mu,\dot{\alpha}\alpha} \bar{\sigma}^{\dot{\beta}\beta}_\mu """ rule_Lorentz_free_epsDown = ( Op(epsDown(-1, -2), epsDownDot(-3, -4)), OpSum(number_op(Fraction(1, 2)) * Op( sigma4(0, -1, -3), sigma4(0, -2, -4)))) r"""
# Auxiliary operators for intermediate calculations O5aux = flavor_tensor_op("O5aux") O5auxc = flavor_tensor_op("O5auxc") Olqqqaux = flavor_tensor_op("Olqqqaux") Olqqqauxc = flavor_tensor_op("Olqqqauxc") rules_basis_defs_dim_6_5 = [ # Standard Model dimension 6 four-fermion operators # LLLL type (Op(lLc(0, 1, -1), sigma4bar(2, 0, 3), lL(3, 1, -2), lLc(4, 5, -3), sigma4bar(2, 4, 6), lL(6, 5, -4)), OpSum(number_op(2) * O1ll(-1, -2, -3, -4))), (Op(qLc(0, 1, 2, -1), sigma4bar(3, 0, 4), qL(4, 1, 2, -2), qLc(5, 6, 7, -3), sigma4bar(3, 5, 8), qL(8, 6, 7, -4)), OpSum(number_op(2) * O1qq(-1, -2, -3, -4))), (Op(qLc(0, 1, 2, -1), sigma4bar(3, 0, 4), TSU3(5, 1, 6), qL(4, 6, 2, -2), qLc(7, 8, 9, -3), sigma4bar(3, 7, 10), TSU3(5, 8, 11), qL(10, 11, 9, -4)), OpSum(number_op(2) * O8qq(-1, -2, -3, -4))), (Op(lLc(0, 1, -1), sigma4bar(2, 0, 3), lL(3, 1, -2), qLc(4, 5, 6, -3), sigma4bar(2, 4, 7), qL(7, 5, 6, -4)), OpSum(O1lq(-1, -2, -3, -4))), (Op(lLc(0, 1, -1), sigma4bar(2, 0, 3), sigmaSU2(4, 1, 5), lL(3, 5, -2), qLc(6, 7, 8, -3), sigma4bar(2, 6, 9), sigmaSU2(4, 8, 10), qL(9, 7, 10, -4)), OpSum(O3lq(-1, -2, -3, -4))), # RRRR type (Op(eRc(0, -1), sigma4(1, 0, 2), eR(2, -2), eRc(3, -3), sigma4(1, 3, 4),
epsSU2quadruplets = TensorBuilder("epsSU2quadruplets") r""" Two-index that gives a singlet when contracted with two :math:`SU(2)` quadruplets. """ fSU2 = TensorBuilder("fSU2") r""" Totally antisymmetric tensor with three :math:`SU(2)` triplet indices given by :math:`f_{abc}=\frac{i}{\sqrt{2}}\epsilon_{abc}` with :math:`\epsilon_{123}=1`. """ rule_SU2_fierz = ((Op(sigmaSU2(0, -1, -2), sigmaSU2(0, -3, -4)), OpSum( number_op(2) * Op(kdelta(-1, -4), kdelta(-3, -2)), -Op(kdelta(-1, -2), kdelta(-3, -4))))) r""" Subtitute :math:`\sigma^a_{ij} \sigma^a_{kl}` by :math:`2\delta_{il}\delta_{kj} - \delta_{ij}\delta{kl}`. """ rule_SU2_product_sigmas = ((Op(sigmaSU2(0, -1, 1), sigmaSU2(0, 1, -2)), OpSum(number_op(3) * Op(kdelta(-1, -2))))) r""" Subtitute :math:`\sigma^a_{ij}\sigma^a_{jk}` by :math:`3\delta_{ik}`. """ rule_SU2_free_eps = ((Op(epsSU2(-1, -2), epsSU2(-3, -4)), OpSum(Op(kdelta(-1, -3), kdelta(-2, -4)),