def run_on_qpu(h, J, sampler, num_reads):
    """Runs the Ising problem on the sampler provided.

    Args:
        h(dict): a representation of the linear terms of the ising problem
        J(dict): a representation of the quadratic terms of the ising problem
        sampler(dimod.Sampler): a sampler that uses the QPU
        num_reads(int): the number of reads to use in the sampler 
    """
    sample_set = sampler.sample_ising(h, J, num_reads=num_reads)
    
    return sample_set