quantum-flows 0.1.11__py3-none-any.whl → 0.1.12__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- quantum_flows/quantum_flows.py +9 -0
- {quantum_flows-0.1.11.dist-info → quantum_flows-0.1.12.dist-info}/METADATA +1 -1
- quantum_flows-0.1.12.dist-info/RECORD +6 -0
- quantum_flows-0.1.11.dist-info/RECORD +0 -6
- {quantum_flows-0.1.11.dist-info → quantum_flows-0.1.12.dist-info}/LICENSE +0 -0
- {quantum_flows-0.1.11.dist-info → quantum_flows-0.1.12.dist-info}/WHEEL +0 -0
quantum_flows/quantum_flows.py
CHANGED
|
@@ -348,10 +348,15 @@ class InputData:
|
|
|
348
348
|
"Each dictionary in the list of inference data points must contain a 'data-point' key."
|
|
349
349
|
)
|
|
350
350
|
vector = data["data-point"]
|
|
351
|
+
data_tags = data["data-tags"] if "data-tags" in data else None
|
|
351
352
|
if not isinstance(vector, list):
|
|
352
353
|
raise Exception(
|
|
353
354
|
"The 'data-point' value must be a list of numeric values."
|
|
354
355
|
)
|
|
356
|
+
if data_tags is not None and not isinstance(data_tags, list):
|
|
357
|
+
raise Exception(
|
|
358
|
+
"The optional 'data-tags' value must be a list of strings."
|
|
359
|
+
)
|
|
355
360
|
if not all(isinstance(item, (int, float)) for item in vector):
|
|
356
361
|
raise Exception(
|
|
357
362
|
"The 'data-point' value must be a list of numeric values (int or float)."
|
|
@@ -362,6 +367,10 @@ class InputData:
|
|
|
362
367
|
raise Exception(
|
|
363
368
|
"All 'data-point' vectors in inference data entries must have the same length."
|
|
364
369
|
)
|
|
370
|
+
if data_tags is not None and len(data_tags) != vector_size:
|
|
371
|
+
raise Exception(
|
|
372
|
+
"If provided, the 'data-tags' list must have the same length as the 'data-point' vector."
|
|
373
|
+
)
|
|
365
374
|
|
|
366
375
|
def validate_quadratic_program(self, qp):
|
|
367
376
|
if not isinstance(qp, QuadraticProgram):
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
quantum_flows/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
quantum_flows/quantum_flows.py,sha256=ak5TNi4uCzuUPJn_GAQpPoH_XfaVvp85C844d8xeFbA,39179
|
|
3
|
+
quantum_flows-0.1.12.dist-info/LICENSE,sha256=IMxjvLtrzufAKrJSQ5u9vkcL3LbqJnOU8He5HXDet3Q,1077
|
|
4
|
+
quantum_flows-0.1.12.dist-info/METADATA,sha256=vp1VQxo11QKBTgwVKfPmzt60o0rR-yxS7lRQ-x8_O6c,1063
|
|
5
|
+
quantum_flows-0.1.12.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
6
|
+
quantum_flows-0.1.12.dist-info/RECORD,,
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
quantum_flows/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
quantum_flows/quantum_flows.py,sha256=hlshJvhWb8ZVQg_UPGyE5JutrQ_NKf_uwpx1ILmAtoM,38666
|
|
3
|
-
quantum_flows-0.1.11.dist-info/LICENSE,sha256=IMxjvLtrzufAKrJSQ5u9vkcL3LbqJnOU8He5HXDet3Q,1077
|
|
4
|
-
quantum_flows-0.1.11.dist-info/METADATA,sha256=7C5iNTQ7WNcxGDoykmX2rqFGCBJsjNiu5vcclddzcpg,1063
|
|
5
|
-
quantum_flows-0.1.11.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
6
|
-
quantum_flows-0.1.11.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|