Returns: True if gates are almost identical.

    Closeness is measured with the gate angle.

def gates_close(gate0: Gate, gate1: Gate,
                tolerance: float = TOLERANCE) -> bool:
    """Returns: True if gates are almost identical.

    Closeness is measured with the gate angle.
    """
    return vectors_close(gate0.vec, gate1.vec, tolerance)