Esempio n. 1
0
 def _compute_joint_eigen_distribution(self, beta):
     """
     Helper function to compute the joint distribution of phases
     of the complex eigen values of matrices belonging to any
     circular ensembles.
     """
     n = self.dimension
     Zbn = ((2*pi)**n)*(gamma(beta*n/2 + 1)/S(gamma(beta/2 + 1))**n)
     t = IndexedBase('t')
     i, j, k = (Dummy('i', integer=True), Dummy('j', integer=True),
                Dummy('k', integer=True))
     syms = ArrayComprehension(t[i], (i, 1, n)).doit()
     f = Product(Product(Abs(exp(I*t[k]) - exp(I*t[j]))**beta, (j, k + 1, n)).doit(),
                 (k, 1, n - 1)).doit()
     return Lambda(tuple(syms), f/Zbn)
Esempio n. 2
0
 def _compute_joint_eigen_dsitribution(self, beta):
     """
     Helper function for computing the joint
     probability distribution of eigen values
     of the random matrix.
     """
     n = self.dimension
     Zbn = self._compute_normalization_constant(beta, n)
     l = IndexedBase('l')
     i = Dummy('i', integer=True, positive=True)
     j = Dummy('j', integer=True, positive=True)
     k = Dummy('k', integer=True, positive=True)
     term1 = exp((-S(n) / 2) * Sum(l[k]**2, (k, 1, n)).doit())
     sub_term = Lambda(i, Product(Abs(l[j] - l[i])**beta, (j, i + 1, n)))
     term2 = Product(sub_term(i).doit(), (i, 1, n - 1)).doit()
     syms = ArrayComprehension(l[k], (k, 1, n)).doit()
     return Lambda(syms, (term1 * term2) / Zbn)