def c_qbounds(model, m):
    """
    Constraint rule for upper bound for absolute difference:
        |Q[m]-QEST[m]| < exp_precision*QEST[m].

    Parameters
    ----------
    model : InvPBaseModel
    m : int
        photocounting number.

    """

    return (0, abs(model.QEST[m] - model.Q[m]),
            model.exp_precision * model.Q[m])