示例#1
0
 def covDeriv(self, scalarField, gaugeField, cpt):
     scalarFieldShifted = self.shiftScalarField(scalarField, cpt, +1)
     lieAlgField = scalarField * FieldTools.pauliMatrix(3)
     lieAlgFieldShifted = scalarFieldShifted * FieldTools.pauliMatrix(3)
     covDeriv = gaugeField[:,:,:,cpt,:,:] @ lieAlgFieldShifted @\
         tf.linalg.adjoint(gaugeField[:,:,:,cpt,:,:]) - lieAlgField
     return covDeriv
    def shiftGaugeField(self, gaugeField, cpt, sign):
        gaugeFieldShifted = tf.roll(gaugeField, -sign, cpt)

        pauliMatNum = self.boundaryConditions[cpt]

        if pauliMatNum == 0:
            return gaugeFieldShifted

        latShape = tf.shape(gaugeField)[0:3]
        indices = FieldTools.boundaryIndices(latShape, cpt, sign)

        updates = tf.gather_nd(gaugeFieldShifted, indices)
        updates = FieldTools.pauliMatrix(pauliMatNum) @\
            updates @ FieldTools.pauliMatrix(pauliMatNum)

        gaugeFieldShifted = tf.tensor_scatter_nd_update(
            gaugeFieldShifted, indices, updates)
        return gaugeFieldShifted
    def covDerivTerm(self, higgsField, isospinField, hyperchargeField):
        energyDensity = tf.zeros(tf.shape(higgsField)[0:3], dtype=tf.float64)
        higgsMagnitude = tf.linalg.trace(
            self.higgsMagnitude(tf.math.real(higgsField)))
        numDims = 3

        # This is only valid in the unitary gauge, but it keeps the isospin
        # gradients symmetric which is good for convergence to the saddle
        for ii in range(numDims):
            higgsFieldShifted = self.shiftHiggsField(higgsField, ii, +1)
            higgsMagnitudeShifted = tf.linalg.trace(
                self.higgsMagnitude(tf.math.real(higgsFieldShifted)))
            energyDensity += higgsMagnitude**2
            energyDensity += higgsMagnitudeShifted**2
            energyDensity -= higgsMagnitude * higgsMagnitudeShifted *\
                tf.math.real(tf.linalg.trace(isospinField[:,:,:,ii,:,:])) *\
                tf.math.real(tf.linalg.trace(hyperchargeField[:,:,:,ii,:,:]))
            energyDensity += higgsMagnitude * higgsMagnitudeShifted *\
                tf.math.imag(tf.linalg.trace(isospinField[:,:,:,ii,:,:] @\
                FieldTools.pauliMatrix(3))) *\
                tf.math.imag(tf.linalg.trace(hyperchargeField[:,:,:,ii,:,:]))

        return energyDensity