def compute_cis_amplitudes(self):
    '\n        Compute the CIS amplitudes of the molecule\n        '

    @dataclass
    class ResultCIS():
        ' '
        omegas: typing.List[numbers.Real]
        amplitudes: typing.List[ClosedShellAmplitudes]

        def __getitem__(self, item):
            return (self.omegas[item], self.amplitudes[item])

        def __len__(self):
            return len(self.omegas)
    g = self.molecule.two_body_integrals
    fij = self.molecule.orbital_energies
    nocc = self.n_alpha_electrons
    nvirt = (self.n_orbitals - nocc)
    pairs = []
    for i in range(nocc):
        for a in range(nocc, (nocc + nvirt)):
            pairs.append((a, i))
    M = numpy.ndarray(shape=[len(pairs), len(pairs)])
    for (xx, x) in enumerate(pairs):
        eia = (fij[x[0]] - fij[x[1]])
        (a, i) = x
        for (yy, y) in enumerate(pairs):
            (b, j) = y
            delta = float((y == x))
            gpart = ((2.0 * g[(a, i, b, j)]) - g[(a, i, j, b)])
            M[(xx, yy)] = ((eia * delta) + gpart)
    (omega, xvecs) = numpy.linalg.eigh(M)
    nex = len(omega)
    amplitudes = []
    for ex in range(nex):
        t = numpy.ndarray(shape=[nvirt, nocc])
        exvec = xvecs[ex]
        for (xx, x) in enumerate(pairs):
            (a, i) = x
            t[((a - nocc), i)] = exvec[xx]
        amplitudes.append(ClosedShellAmplitudes(tIA=t))
    return ResultCIS(omegas=list(omega), amplitudes=amplitudes)
Compute the CIS amplitudes of the molecule
def compute_cis_amplitudes(self):
    '\n        \n        '

    @dataclass
    class ResultCIS():
        ' '
        omegas: typing.List[numbers.Real]
        amplitudes: typing.List[ClosedShellAmplitudes]

        def __getitem__(self, item):
            return (self.omegas[item], self.amplitudes[item])

        def __len__(self):
            return len(self.omegas)
    g = self.molecule.two_body_integrals
    fij = self.molecule.orbital_energies
    nocc = self.n_alpha_electrons
    nvirt = (self.n_orbitals - nocc)
    pairs = []
    for i in range(nocc):
        for a in range(nocc, (nocc + nvirt)):
            pairs.append((a, i))
    M = numpy.ndarray(shape=[len(pairs), len(pairs)])
    for (xx, x) in enumerate(pairs):
        eia = (fij[x[0]] - fij[x[1]])
        (a, i) = x
        for (yy, y) in enumerate(pairs):
            (b, j) = y
            delta = float((y == x))
            gpart = ((2.0 * g[(a, i, b, j)]) - g[(a, i, j, b)])
            M[(xx, yy)] = ((eia * delta) + gpart)
    (omega, xvecs) = numpy.linalg.eigh(M)
    nex = len(omega)
    amplitudes = []
    for ex in range(nex):
        t = numpy.ndarray(shape=[nvirt, nocc])
        exvec = xvecs[ex]
        for (xx, x) in enumerate(pairs):
            (a, i) = x
            t[((a - nocc), i)] = exvec[xx]
        amplitudes.append(ClosedShellAmplitudes(tIA=t))
    return ResultCIS(omegas=list(omega), amplitudes=amplitudes)