def count_amplitudes(n_spinorbitals, n_electrons):
    """Count the number of singles and doubles amplitudes for a given UCCSD-VQE run
    Args:
        n_spinorbitals(int): integer representing the number of spinorbitals (qubits) for
                             a given molecule and basis set
        n_electrons(int):    integer representing the number of electrons for a given molecule
    Returns:
        n_amplitudes(int):   integer representing the total number of amplitudes (MO basis)
    """
    n_MO = n_spinorbitals // 2
    n_occ = n_electrons // 2
    n_virt = n_MO - n_occ
    n_singles = n_occ * n_virt
    n_doubles = n_singles * (n_singles + 1) // 2
    return n_singles + n_doubles
