def compute_mp2_amplitudes(self) -> ClosedShellAmplitudes:
    '\n\n        Compute closed-shell mp2 amplitudes\n\n        .. math::\n            t(a,i,b,j) = 0.25 * g(a,i,b,j)/(e(i) + e(j) -a(i) - b(j) )\n\n        :return:\n\n        Parameters\n        ----------\n\n        Returns\n        -------\n\n        '
    g = self.molecule.two_body_integrals
    fij = self.molecule.orbital_energies
    nocc = (self.molecule.n_electrons // 2)
    ei = fij[:nocc]
    ai = fij[nocc:]
    abgij = g[nocc:, nocc:, :nocc, :nocc]
    amplitudes = ((abgij * 1.0) / (((ei.reshape(1, 1, (- 1), 1) + ei.reshape(1, 1, 1, (- 1))) - ai.reshape((- 1), 1, 1, 1)) - ai.reshape(1, (- 1), 1, 1)))
    E = ((2.0 * numpy.einsum('abij,abij->', amplitudes, abgij)) - numpy.einsum('abji,abij', amplitudes, abgij, optimize='greedy'))
    self.molecule.mp2_energy = (E + self.molecule.hf_energy)
    return ClosedShellAmplitudes(tIjAb=numpy.einsum('abij -> ijab', amplitudes, optimize='greedy'))
Compute closed-shell mp2 amplitudes

.. math::
    t(a,i,b,j) = 0.25 * g(a,i,b,j)/(e(i) + e(j) -a(i) - b(j) )

:return:

Parameters
----------

Returns
-------
def compute_mp2_amplitudes(self) -> ClosedShellAmplitudes:
    '\n\n        Compute closed-shell mp2 amplitudes\n\n        .. math::\n            t(a,i,b,j) = 0.25 * g(a,i,b,j)/(e(i) + e(j) -a(i) - b(j) )\n\n        :return:\n\n        Parameters\n        ----------\n\n        Returns\n        -------\n\n        '
    g = self.molecule.two_body_integrals
    fij = self.molecule.orbital_energies
    nocc = (self.molecule.n_electrons // 2)
    ei = fij[:nocc]
    ai = fij[nocc:]
    abgij = g[nocc:, nocc:, :nocc, :nocc]
    amplitudes = ((abgij * 1.0) / (((ei.reshape(1, 1, (- 1), 1) + ei.reshape(1, 1, 1, (- 1))) - ai.reshape((- 1), 1, 1, 1)) - ai.reshape(1, (- 1), 1, 1)))
    E = ((2.0 * numpy.einsum('abij,abij->', amplitudes, abgij)) - numpy.einsum('abji,abij', amplitudes, abgij, optimize='greedy'))
    self.molecule.mp2_energy = (E + self.molecule.hf_energy)
    return ClosedShellAmplitudes(tIjAb=numpy.einsum('abij -> ijab', amplitudes, optimize='greedy'))