braket.ir.annealing.problem module¶
-
class
braket.ir.annealing.problem.
ProblemType
[source]¶ Bases:
str
,enum.Enum
The type of annealing problem.
QUBO: Quadratic Unconstrained Binary Optimization, with values 1 and 0 ISING: Ising model, with values +/-1
-
QUBO
= 'QUBO'¶
-
ISING
= 'ISING'¶
-
-
class
braket.ir.annealing.problem.
Problem
[source]¶ Bases:
pydantic.main.BaseModel
Specifies a quantum annealing problem.
-
- type
The type of problem; can be either “QUBO” or “ISING”
-
- linear
Linear terms of the model.
-
- quadratic
Quadratic terms of the model, keyed on comma-separated variables as strings
Examples
>>> Problem(type=ProblemType.QUBO, linear={0: 0.3, 4: -0.3}, quadratic={"0,5": 0.667})
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
-
type
: ProblemType = None¶
-
linear
: Dict[conint(ge=0), float] = None¶
-
quadratic
: Dict[str, float] = None¶
-