def make_dhdu(ham, controls, derivative_fn):
    """
    Computes the partial of the hamiltonian w.r.t control variables.

    :param ham: Hamiltonian function.
    :param controls: A list of each control variable.
    :param derivative_fn: Total derivative function.
    :return: :math:`dH/du`
    """
    dHdu = []
    for ctrl in controls:
        dHdu.append(derivative_fn(ham, ctrl['symbol']))
    return dHdu
