braket.ir.annealing.problem_v1 module¶
-
class
braket.ir.annealing.problem_v1.
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_v1.
Problem
[source]¶ Bases:
braket.schema_common.schema_base.BraketSchemaBase
Specifies a quantum annealing problem.
-
braketSchemaHeader
¶ Schema header. Users do not need to set this value. Only default is allowed.
- Type
-
type
¶ The type of problem; can be either “QUBO” or “ISING”
- Type
-
linear
¶ Linear terms of the model.
- Type
Dict[int, float]
-
quadratic
¶ Quadratic terms of the model, keyed on comma-separated variables as strings
- Type
Dict[str, float]
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.
-
braketSchemaHeader
: BraketSchemaHeader = None
-
type
: ProblemType = None
-
linear
: Dict[conint(ge=0), float] = None
-
quadratic
: Dict[str, float] = None
-