def serialize_quantity(quantity):
    """Serializes a propertyestimator.unit.Quantity into a dictionary of the form
    `{'value': quantity.value_in_unit(quantity.unit), 'unit': quantity.unit}`

    Parameters
    ----------
    quantity : unit.Quantity
        The quantity to serialize

    Returns
    -------
    dict of str and str
        A dictionary representation of a propertyestimator.unit.Quantity
        with keys of {"value", "unit"}
    """

    value = quantity.magnitude
    return {'value': value, 'unit': str(quantity.units)}