code: def sample_qubo(self, Q, **kwargs):
          
          variables = set().union(*Q)
          try:
              active_variables = sorted(variables)
          except TypeError:
              active_variables = list(variables)
          num_variables = len(active_variables)
  
          future = self.solver.sample_qubo(Q, **kwargs)
  
          return dimod.SampleSet.from_future(future, _result_to_response_hook(active_variables, dimod.BINARY))
docs: Sample from the specified QUBO.
  
          Args:
              Q (dict):
                  Coefficients of a quadratic unconstrained binary optimization (QUBO) model.
  
              **kwargs:
                  Optional keyword arguments for the sampling method, specified per solver in
                  :attr:`.DWaveSampler.parameters`
  
          Returns:
              :class:`dimod.SampleSet`: A `dimod` :obj:`~dimod.SampleSet` object.
  
          Examples:
              This example submits a two-variable Ising problem mapped directly to qubits
              0 and 4 on a D-Wave system selected by the user's default
              :std:doc:`D-Wave Cloud Client configuration file <cloud-client:intro>`.
  
              >>> from dwave.system.samplers import DWaveSampler
              >>> sampler = DWaveSampler()
              >>> Q = {(0, 0): -1, (4, 4): -1, (0, 4): 2}
              >>> response = sampler.sample_qubo(Q)
              >>> for sample in response.samples():    # doctest: +SKIP
              ...    print(sample)
              ...
              {0: 0, 4: 1}
  
          See `Ocean Glossary <https://docs.ocean.dwavesys.com/en/latest/glossary.html>`_
          for explanations of technical terms in descriptions of Ocean tools.