def compute_jaccard_similarity(site_a, site_b):
    """
    Compute the Jaccard similarity between two given ActiveSite instances.

    Input: two ActiveSite instances
    Output: the similarity between them (a floating point number)
    """
    a = [i.type for i in site_a.residues]
    b = [i.type for i in site_b.residues]

    similarity = 0.0
    intersection = len(set(a) & set(b))
    union = len(set(a) | set(b))
    similarity = float(intersection)/float(union)
    return similarity