-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathd-wave-cqm-model-schema.json
More file actions
50 lines (50 loc) · 1.76 KB
/
Copy pathd-wave-cqm-model-schema.json
File metadata and controls
50 lines (50 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/api-evangelist/d-wave/main/json-schema/d-wave-cqm-model-schema.json",
"title": "D-Wave Constrained Quadratic Model (CQM)",
"description": "Logical representation of a dimod ConstrainedQuadraticModel for submission to LeapHybridCQMSampler.",
"type": "object",
"required": ["objective"],
"properties": {
"objective": {
"type": "object",
"properties": {
"linear": {"type": "object", "additionalProperties": {"type": "number"}},
"quadratic": {"type": "object", "additionalProperties": {"type": "number"}},
"offset": {"type": "number"}
}
},
"constraints": {
"type": "array",
"items": {
"type": "object",
"required": ["sense", "rhs", "lhs"],
"properties": {
"label": {"type": "string"},
"sense": {"type": "string", "enum": ["==", "<=", ">="]},
"rhs": {"type": "number"},
"lhs": {
"type": "object",
"properties": {
"linear": {"type": "object", "additionalProperties": {"type": "number"}},
"quadratic": {"type": "object", "additionalProperties": {"type": "number"}}
}
},
"weight": {"type": "number", "description": "Penalty weight when soft."},
"penalty": {"type": "string", "enum": ["linear", "quadratic"]}
}
}
},
"variables": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"vartype": {"type": "string", "enum": ["BINARY", "SPIN", "INTEGER", "REAL"]},
"lower_bound": {"type": "number"},
"upper_bound": {"type": "number"}
}
}
}
}
}