def implicant2bnet(partial_state):
    """Converts a partial state dictionary to a BNet string
    e.g., {'A':1,'B':0} returns 'A & !B'

    Parameters
    ----------
    partial_state : partial state dictionary
        Partial state to convert.

    Returns
    -------
    str
        BNET representation of the partial state.

    """
    return ' & '.join(["!"+k for k in partial_state if not partial_state[k]]+[k for k in partial_state if partial_state[k]])