def get_dim_from_spin(spin):
    """ Get the dimension of the density matrix from the spin number written as a string."""
    if spin == '3/2':
        return 4
    elif spin == '5/2':
        return 6
    elif spin == '7/2':
        return 8
    elif spin == '9/2':
        return 10
