code: def _minimum_coloring_qubo(x_vars, chi_lb, chi_ub, magnitude=1.):
      
      # if we already know the chromatic number, then we don't need to
      # disincentivize any colors.
      if chi_lb == chi_ub:
          return {}
  
      # we might need to use some of the colors, so we want to disincentivize
      # them in increasing amounts, linearly.
      scaling = magnitude / (chi_ub - chi_lb)
  
      # build the QUBO
      Q = {}
      for v in x_vars:
          for f, color in enumerate(range(chi_lb, chi_ub)):
              idx = x_vars[v][color]
              Q[(idx, idx)] = (f + 1) * scaling
  
      return Q
docs: We want to disincentivize unneeded colors. Generates the QUBO
      that does that.