Skip to content

Sample Qubo

qubo_problem(qubo, constant)

Convert the coefficients of a QUBO represented as a dictionary to a JijModeling Problem object.

  • qubo: A dictionary representing a QUBO problem, where the keys are tuples of integers or strings representing the indices of the decision variables, and the values are floats representing the coefficients of the quadratic terms of the QUBO.
  • constant: A float representing the constant energy offset in the QUBO problem.
  • A tuple containing:
    • The QUBO problem as a JijModeling Problem object.
    • The instance data as a dictionary containing the values of the placeholders of the problem.
    • A dictionary mapping the indices of the decision variables to their corresponding labels (if the indices are represented as strings).
    • A dictionary containing the decision variables as JijModeling Binary objects.

sample_qubo(client, solver, queue_name, qubo, constant, max_wait_time, sync, **kwargs)

Sample QUBO problem using the specified solver.

  • client: A JijZeptClient object representing the client used to submit the problem.
  • solver: A string representing the name of the solver used to solve the problem.
  • queue_name: A string representing the name of the queue to use for the problem.
  • qubo: A dictionary representing a QUBO problem, where the keys are tuples of integers representing the indices of the decision variables, and the values are floats representing the coefficients of the quadratic terms of the QUBO.
  • constant: A float representing the constant energy offset in the QUBO problem.
  • max_wait_time: An integer or float representing the maximum time to wait for the problem to complete (in seconds). If None, wait indefinitely.
  • sync: A boolean representing whether to wait for the problem to complete before returning the results.
  • **kwargs: Additional arguments to pass to the sample_model function.
  • A SampleSet object: Stores minimum energy samples and other information.

Last update: 2023年5月24日