# Sample Hubo¶

## `hubo_problem(hubo, constant)`

¶

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

- hubo: A dictionary representing a HUBO 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 high-order terms of the HUBO.
- constant: A float representing the constant energy offset in the HUBO problem.

- A tuple containing:
- The HUBO 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_hubo(client, solver, queue_name, polynomial, constant, max_wait_time, sync, **kwargs)`

¶

Sample HUBO 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.
- polynomial: A dictionary representing a HUBO 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 high-order terms of the HUBO.
- constant: A float representing the constant energy offset in the HUBO 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日