classiq 0.88.0__py3-none-any.whl → 0.89.0__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.
Potentially problematic release.
This version of classiq might be problematic. Click here for more details.
- classiq/_internals/config.py +1 -1
- classiq/evaluators/qmod_annotated_expression.py +7 -8
- classiq/evaluators/qmod_expression_visitors/qmod_expression_evaluator.py +2 -2
- classiq/evaluators/qmod_expression_visitors/qmod_expression_renamer.py +1 -1
- classiq/evaluators/qmod_node_evaluators/attribute_evaluation.py +66 -5
- classiq/interface/_version.py +1 -1
- classiq/interface/analyzer/analysis_params.py +1 -1
- classiq/interface/backend/backend_preferences.py +1 -1
- classiq/interface/generator/arith/register_user_input.py +1 -1
- classiq/interface/generator/functions/classical_type.py +24 -3
- classiq/interface/generator/functions/function_declaration.py +0 -4
- classiq/interface/generator/functions/type_name.py +25 -0
- classiq/interface/generator/hardware_efficient_ansatz.py +1 -1
- classiq/interface/generator/quantum_function_call.py +3 -3
- classiq/interface/generator/user_defined_function_params.py +0 -3
- classiq/interface/ide/ide_data.py +1 -1
- classiq/interface/ide/visual_model.py +2 -2
- classiq/interface/model/block.py +5 -1
- classiq/interface/model/handle_binding.py +1 -1
- classiq/interface/model/quantum_lambda_function.py +1 -1
- classiq/interface/model/quantum_statement.py +2 -4
- classiq/interface/model/quantum_type.py +46 -3
- classiq/open_library/functions/__init__.py +2 -0
- classiq/open_library/functions/state_preparation.py +137 -2
- classiq/qmod/qmod_variable.py +47 -1
- {classiq-0.88.0.dist-info → classiq-0.89.0.dist-info}/METADATA +2 -2
- {classiq-0.88.0.dist-info → classiq-0.89.0.dist-info}/RECORD +28 -28
- {classiq-0.88.0.dist-info → classiq-0.89.0.dist-info}/WHEEL +0 -0
classiq/_internals/config.py
CHANGED
|
@@ -24,7 +24,7 @@ class Configuration(BaseModel):
|
|
|
24
24
|
|
|
25
25
|
host: pydantic.AnyHttpUrl = pydantic.Field(..., description="Classiq backend URI.")
|
|
26
26
|
ide: pydantic.AnyHttpUrl = pydantic.Field(
|
|
27
|
-
default=DEFAULT_IDE_FE_APP, description="Classiq IDE URI."
|
|
27
|
+
default=pydantic.AnyHttpUrl(DEFAULT_IDE_FE_APP), description="Classiq IDE URI."
|
|
28
28
|
)
|
|
29
29
|
should_check_host: bool = pydantic.Field(
|
|
30
30
|
default=True, description="Should check backend URI and version."
|
|
@@ -30,7 +30,7 @@ class QuantumSubscriptAnnotation:
|
|
|
30
30
|
|
|
31
31
|
@dataclass(frozen=True)
|
|
32
32
|
class QuantumTypeAttributeAnnotation:
|
|
33
|
-
value:
|
|
33
|
+
value: HandleBinding
|
|
34
34
|
attr: str
|
|
35
35
|
|
|
36
36
|
|
|
@@ -84,8 +84,11 @@ class QmodAnnotatedExpression:
|
|
|
84
84
|
self._concatenations: dict[QmodExprNodeId, ConcatenationAnnotation] = {}
|
|
85
85
|
self._locked = False
|
|
86
86
|
|
|
87
|
+
def print_by_node(self, node: ast.AST) -> str:
|
|
88
|
+
return ast.unparse(_ExprInliner(self).visit(node))
|
|
89
|
+
|
|
87
90
|
def __str__(self) -> str:
|
|
88
|
-
return
|
|
91
|
+
return self.print_by_node(self.root)
|
|
89
92
|
|
|
90
93
|
def has_node(self, node_id: QmodExprNodeId) -> bool:
|
|
91
94
|
return node_id in self._node_mapping
|
|
@@ -212,15 +215,13 @@ class QmodAnnotatedExpression:
|
|
|
212
215
|
def set_quantum_type_attr(
|
|
213
216
|
self,
|
|
214
217
|
node: Union[ast.AST, QmodExprNodeId],
|
|
215
|
-
value:
|
|
218
|
+
value: HandleBinding,
|
|
216
219
|
attr: str,
|
|
217
220
|
) -> None:
|
|
218
221
|
if self._locked:
|
|
219
222
|
raise ClassiqInternalExpansionError("QAE is locked")
|
|
220
223
|
if isinstance(node, ast.AST):
|
|
221
224
|
node = id(node)
|
|
222
|
-
if isinstance(value, ast.AST):
|
|
223
|
-
value = id(value)
|
|
224
225
|
self._quantum_type_attrs[node] = QuantumTypeAttributeAnnotation(
|
|
225
226
|
value=value, attr=attr
|
|
226
227
|
)
|
|
@@ -280,9 +281,7 @@ class QmodAnnotatedExpression:
|
|
|
280
281
|
if qs is not None:
|
|
281
282
|
self.clear_node_data(qs.value)
|
|
282
283
|
self.clear_node_data(qs.index)
|
|
283
|
-
|
|
284
|
-
if qta is not None:
|
|
285
|
-
self.clear_node_data(qta.value)
|
|
284
|
+
self._quantum_type_attrs.pop(node, None)
|
|
286
285
|
cnct = self._concatenations.pop(node, None)
|
|
287
286
|
if cnct is not None:
|
|
288
287
|
for element in cnct.elements:
|
|
@@ -85,7 +85,7 @@ class QmodExpressionEvaluator(ast.NodeVisitor):
|
|
|
85
85
|
Sequence[ClassicalFunctionDeclaration]
|
|
86
86
|
] = None,
|
|
87
87
|
classical_function_callables: Optional[Mapping[str, Callable]] = None,
|
|
88
|
-
scope: Optional[
|
|
88
|
+
scope: Optional[Mapping[str, Any]] = None,
|
|
89
89
|
) -> None:
|
|
90
90
|
self._expr_val = expr_val
|
|
91
91
|
self._treat_qnum_as_float = treat_qnum_as_float
|
|
@@ -264,7 +264,7 @@ def evaluate_qmod_expression(
|
|
|
264
264
|
Sequence[ClassicalFunctionDeclaration]
|
|
265
265
|
] = None,
|
|
266
266
|
classical_function_callables: Optional[Mapping[str, Callable]] = None,
|
|
267
|
-
scope: Optional[
|
|
267
|
+
scope: Optional[Mapping[str, Any]] = None,
|
|
268
268
|
) -> QmodAnnotatedExpression:
|
|
269
269
|
expr_ast = ast.parse(expr, mode="eval").body
|
|
270
270
|
expr_value = QmodAnnotatedExpression(expr_ast)
|
|
@@ -40,7 +40,7 @@ def replace_expression_type_attrs(
|
|
|
40
40
|
return expr_val
|
|
41
41
|
type_attrs = dict(expr_val.get_quantum_type_attributes())
|
|
42
42
|
for node_id, ta in type_attrs.items():
|
|
43
|
-
var =
|
|
43
|
+
var = ta.value
|
|
44
44
|
renamed_var = var
|
|
45
45
|
renamed_attr = ta.attr
|
|
46
46
|
for (source, attr), target in renaming.items():
|
|
@@ -5,6 +5,7 @@ from classiq.interface.exceptions import (
|
|
|
5
5
|
ClassiqExpansionError,
|
|
6
6
|
ClassiqInternalExpansionError,
|
|
7
7
|
)
|
|
8
|
+
from classiq.interface.generator.expressions.expression import Expression
|
|
8
9
|
from classiq.interface.generator.expressions.proxies.classical.qmod_struct_instance import (
|
|
9
10
|
QmodStructInstance,
|
|
10
11
|
)
|
|
@@ -15,7 +16,12 @@ from classiq.interface.generator.functions.classical_type import (
|
|
|
15
16
|
Integer,
|
|
16
17
|
)
|
|
17
18
|
from classiq.interface.generator.functions.type_name import TypeName
|
|
18
|
-
from classiq.interface.model.handle_binding import
|
|
19
|
+
from classiq.interface.model.handle_binding import (
|
|
20
|
+
FieldHandleBinding,
|
|
21
|
+
HandleBinding,
|
|
22
|
+
SlicedHandleBinding,
|
|
23
|
+
SubscriptHandleBinding,
|
|
24
|
+
)
|
|
19
25
|
from classiq.interface.model.quantum_type import (
|
|
20
26
|
QuantumBitvector,
|
|
21
27
|
QuantumNumeric,
|
|
@@ -26,6 +32,46 @@ from classiq.evaluators.qmod_annotated_expression import QmodAnnotatedExpression
|
|
|
26
32
|
from classiq.evaluators.qmod_node_evaluators.utils import QmodType
|
|
27
33
|
|
|
28
34
|
|
|
35
|
+
def _get_symbolic_quantum_var(
|
|
36
|
+
expr_val: QmodAnnotatedExpression, node: ast.AST
|
|
37
|
+
) -> HandleBinding:
|
|
38
|
+
if expr_val.has_quantum_var(node):
|
|
39
|
+
var = expr_val.get_var(node)
|
|
40
|
+
expr_val.remove_var(node)
|
|
41
|
+
return var
|
|
42
|
+
if isinstance(node, ast.Attribute):
|
|
43
|
+
return FieldHandleBinding(
|
|
44
|
+
base_handle=_get_symbolic_quantum_var(expr_val, node.value),
|
|
45
|
+
field=node.attr,
|
|
46
|
+
)
|
|
47
|
+
if isinstance(node, ast.Subscript):
|
|
48
|
+
base_var = _get_symbolic_quantum_var(expr_val, node.value)
|
|
49
|
+
slice_ = node.slice
|
|
50
|
+
if isinstance(slice_, ast.Slice):
|
|
51
|
+
if slice_.lower is None or slice_.upper is None or slice_.step is not None:
|
|
52
|
+
raise ClassiqInternalExpansionError("Illegal slice")
|
|
53
|
+
return SlicedHandleBinding(
|
|
54
|
+
base_handle=base_var,
|
|
55
|
+
start=Expression(expr=expr_val.print_by_node(slice_.lower)),
|
|
56
|
+
end=Expression(expr=expr_val.print_by_node(slice_.upper)),
|
|
57
|
+
)
|
|
58
|
+
else:
|
|
59
|
+
return SubscriptHandleBinding(
|
|
60
|
+
base_handle=base_var,
|
|
61
|
+
index=Expression(expr=expr_val.print_by_node(slice_)),
|
|
62
|
+
)
|
|
63
|
+
raise ClassiqInternalExpansionError("Symbolic variable construction failed")
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def _remove_quantum_var(expr_val: QmodAnnotatedExpression, node: ast.AST) -> None:
|
|
67
|
+
if expr_val.has_quantum_var(node):
|
|
68
|
+
expr_val.remove_var(node)
|
|
69
|
+
elif isinstance(node, (ast.Attribute, ast.Subscript)):
|
|
70
|
+
_remove_quantum_var(expr_val, node.value)
|
|
71
|
+
else:
|
|
72
|
+
raise ClassiqInternalExpansionError("Failed to remove quantum var")
|
|
73
|
+
|
|
74
|
+
|
|
29
75
|
def _eval_type_attribute(
|
|
30
76
|
expr_val: QmodAnnotatedExpression, node: ast.Attribute
|
|
31
77
|
) -> None:
|
|
@@ -37,15 +83,22 @@ def _eval_type_attribute(
|
|
|
37
83
|
expr_val.set_type(node, Integer())
|
|
38
84
|
if subject_type.has_size_in_bits:
|
|
39
85
|
expr_val.set_value(node, subject_type.size_in_bits)
|
|
86
|
+
_remove_quantum_var(expr_val, subject)
|
|
40
87
|
else:
|
|
41
|
-
expr_val.set_quantum_type_attr(
|
|
88
|
+
expr_val.set_quantum_type_attr(
|
|
89
|
+
node, _get_symbolic_quantum_var(expr_val, subject), attr
|
|
90
|
+
)
|
|
42
91
|
return
|
|
43
92
|
if isinstance(subject_type, (ClassicalArray, QuantumBitvector)) and attr == "len":
|
|
44
93
|
expr_val.set_type(node, Integer())
|
|
45
94
|
if subject_type.has_constant_length:
|
|
46
95
|
expr_val.set_value(node, subject_type.length_value)
|
|
96
|
+
if isinstance(subject_type, QuantumBitvector):
|
|
97
|
+
_remove_quantum_var(expr_val, subject)
|
|
47
98
|
elif isinstance(subject_type, QuantumType):
|
|
48
|
-
expr_val.set_quantum_type_attr(
|
|
99
|
+
expr_val.set_quantum_type_attr(
|
|
100
|
+
node, _get_symbolic_quantum_var(expr_val, subject), attr
|
|
101
|
+
)
|
|
49
102
|
return
|
|
50
103
|
if isinstance(subject_type, ClassicalTuple) and attr == "len":
|
|
51
104
|
expr_val.set_type(node, Integer())
|
|
@@ -56,19 +109,27 @@ def _eval_type_attribute(
|
|
|
56
109
|
expr_val.set_type(node, Bool())
|
|
57
110
|
if subject_type.has_sign:
|
|
58
111
|
expr_val.set_value(node, subject_type.sign_value)
|
|
112
|
+
_remove_quantum_var(expr_val, subject)
|
|
59
113
|
elif subject_type.has_size_in_bits:
|
|
60
114
|
expr_val.set_value(node, False)
|
|
115
|
+
_remove_quantum_var(expr_val, subject)
|
|
61
116
|
else:
|
|
62
|
-
expr_val.set_quantum_type_attr(
|
|
117
|
+
expr_val.set_quantum_type_attr(
|
|
118
|
+
node, _get_symbolic_quantum_var(expr_val, subject), attr
|
|
119
|
+
)
|
|
63
120
|
return
|
|
64
121
|
if attr == "fraction_digits":
|
|
65
122
|
expr_val.set_type(node, Integer())
|
|
66
123
|
if subject_type.has_fraction_digits:
|
|
67
124
|
expr_val.set_value(node, subject_type.fraction_digits_value)
|
|
125
|
+
_remove_quantum_var(expr_val, subject)
|
|
68
126
|
elif subject_type.has_size_in_bits:
|
|
69
127
|
expr_val.set_value(node, 0)
|
|
128
|
+
_remove_quantum_var(expr_val, subject)
|
|
70
129
|
else:
|
|
71
|
-
expr_val.set_quantum_type_attr(
|
|
130
|
+
expr_val.set_quantum_type_attr(
|
|
131
|
+
node, _get_symbolic_quantum_var(expr_val, subject), attr
|
|
132
|
+
)
|
|
72
133
|
return
|
|
73
134
|
raise ClassiqExpansionError(
|
|
74
135
|
f"{subject_type.raw_qmod_type_name} has no attribute {attr!r}"
|
classiq/interface/_version.py
CHANGED
|
@@ -80,7 +80,7 @@ class AnalysisHardwareListParams(AnalysisParams, HardwareListParams):
|
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
class HardwareParams(pydantic.BaseModel):
|
|
83
|
-
device: PydanticNonEmptyString = pydantic.Field(default=None, description="Devices")
|
|
83
|
+
device: PydanticNonEmptyString = pydantic.Field(default=None, description="Devices") # type: ignore[assignment]
|
|
84
84
|
provider: AnalyzerProviderVendor
|
|
85
85
|
|
|
86
86
|
|
|
@@ -274,7 +274,7 @@ class AzureCredential(BaseSettings):
|
|
|
274
274
|
|
|
275
275
|
def __init__(self, **data: Any) -> None:
|
|
276
276
|
initial_data = {
|
|
277
|
-
field: data[field] for field in data if field in self.model_fields
|
|
277
|
+
field: data[field] for field in data if field in self.__class__.model_fields
|
|
278
278
|
}
|
|
279
279
|
super().__init__(**data)
|
|
280
280
|
for field, value in initial_data.items():
|
|
@@ -19,7 +19,7 @@ class RegisterArithmeticInfo(HashablePydanticBaseModel):
|
|
|
19
19
|
is_signed: bool = pydantic.Field(default=False)
|
|
20
20
|
fraction_places: pydantic.NonNegativeInt = pydantic.Field(default=0)
|
|
21
21
|
bypass_bounds_validation: bool = pydantic.Field(default=False)
|
|
22
|
-
bounds: PydanticFloatTuple = pydantic.Field(
|
|
22
|
+
bounds: PydanticFloatTuple = pydantic.Field( # type: ignore[assignment]
|
|
23
23
|
default=None,
|
|
24
24
|
validate_default=True,
|
|
25
25
|
)
|
|
@@ -2,7 +2,7 @@ from itertools import chain
|
|
|
2
2
|
from typing import TYPE_CHECKING, Any, Literal, Optional
|
|
3
3
|
|
|
4
4
|
import pydantic
|
|
5
|
-
from pydantic import
|
|
5
|
+
from pydantic import PrivateAttr
|
|
6
6
|
from typing_extensions import Self
|
|
7
7
|
|
|
8
8
|
from classiq.interface.ast_node import HashableASTNode
|
|
@@ -34,8 +34,6 @@ if TYPE_CHECKING:
|
|
|
34
34
|
class ClassicalType(HashableASTNode):
|
|
35
35
|
_is_generative: bool = PrivateAttr(default=False)
|
|
36
36
|
|
|
37
|
-
model_config = ConfigDict(extra="forbid")
|
|
38
|
-
|
|
39
37
|
def __str__(self) -> str:
|
|
40
38
|
return str(type(self).__name__)
|
|
41
39
|
|
|
@@ -78,6 +76,9 @@ class ClassicalType(HashableASTNode):
|
|
|
78
76
|
def get_raw_type(self) -> "ConcreteClassicalType":
|
|
79
77
|
return self # type:ignore[return-value]
|
|
80
78
|
|
|
79
|
+
def without_symbolic_attributes(self) -> Self:
|
|
80
|
+
return self
|
|
81
|
+
|
|
81
82
|
|
|
82
83
|
class Integer(ClassicalType):
|
|
83
84
|
kind: Literal["int"]
|
|
@@ -203,6 +204,18 @@ class ClassicalArray(ClassicalType):
|
|
|
203
204
|
def raw_qmod_type_name(self) -> str:
|
|
204
205
|
return "CArray"
|
|
205
206
|
|
|
207
|
+
def without_symbolic_attributes(self) -> "ClassicalArray":
|
|
208
|
+
length = (
|
|
209
|
+
None
|
|
210
|
+
if self.length is None
|
|
211
|
+
or not self.length.is_evaluated()
|
|
212
|
+
or not self.length.is_constant()
|
|
213
|
+
else self.length
|
|
214
|
+
)
|
|
215
|
+
return ClassicalArray(
|
|
216
|
+
element_type=self.element_type.without_symbolic_attributes(), length=length
|
|
217
|
+
)
|
|
218
|
+
|
|
206
219
|
|
|
207
220
|
class ClassicalTuple(ClassicalType):
|
|
208
221
|
kind: Literal["tuple"]
|
|
@@ -273,6 +286,14 @@ class ClassicalTuple(ClassicalType):
|
|
|
273
286
|
def raw_qmod_type_name(self) -> str:
|
|
274
287
|
return "CArray"
|
|
275
288
|
|
|
289
|
+
def without_symbolic_attributes(self) -> "ClassicalTuple":
|
|
290
|
+
return ClassicalTuple(
|
|
291
|
+
element_types=[
|
|
292
|
+
element_type.without_symbolic_attributes()
|
|
293
|
+
for element_type in self.element_types
|
|
294
|
+
]
|
|
295
|
+
)
|
|
296
|
+
|
|
276
297
|
|
|
277
298
|
class OpaqueHandle(ClassicalType):
|
|
278
299
|
pass
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import abc
|
|
2
2
|
from collections.abc import Sequence
|
|
3
3
|
|
|
4
|
-
from pydantic import ConfigDict
|
|
5
|
-
|
|
6
4
|
from classiq.interface.model.classical_parameter_declaration import (
|
|
7
5
|
AnonClassicalParameterDeclaration,
|
|
8
6
|
)
|
|
@@ -19,7 +17,5 @@ class FunctionDeclaration(Parameter, abc.ABC):
|
|
|
19
17
|
def param_decls(self) -> Sequence["AnonClassicalParameterDeclaration"]:
|
|
20
18
|
pass
|
|
21
19
|
|
|
22
|
-
model_config = ConfigDict(extra="forbid")
|
|
23
|
-
|
|
24
20
|
|
|
25
21
|
FunctionDeclaration.model_rebuild()
|
|
@@ -189,6 +189,31 @@ class TypeName(ClassicalType, QuantumType):
|
|
|
189
189
|
field_type.minimal_size_in_bits for field_type in self.fields.values()
|
|
190
190
|
)
|
|
191
191
|
|
|
192
|
+
def without_symbolic_attributes(self) -> "TypeName":
|
|
193
|
+
if self.has_fields:
|
|
194
|
+
type_name = TypeName(name=self.name)
|
|
195
|
+
type_name.set_fields(
|
|
196
|
+
{
|
|
197
|
+
field_name: field_type.without_symbolic_attributes()
|
|
198
|
+
for field_name, field_type in self.fields.items()
|
|
199
|
+
}
|
|
200
|
+
)
|
|
201
|
+
return type_name
|
|
202
|
+
if self.has_classical_struct_decl:
|
|
203
|
+
type_name = TypeName(name=self.name)
|
|
204
|
+
type_name.set_classical_struct_decl(
|
|
205
|
+
self.classical_struct_decl.model_copy(
|
|
206
|
+
update=dict(
|
|
207
|
+
variables={
|
|
208
|
+
field_name: field_type.without_symbolic_attributes()
|
|
209
|
+
for field_name, field_type in self.classical_struct_decl.variables.items()
|
|
210
|
+
}
|
|
211
|
+
)
|
|
212
|
+
)
|
|
213
|
+
)
|
|
214
|
+
return type_name
|
|
215
|
+
return self
|
|
216
|
+
|
|
192
217
|
|
|
193
218
|
class Enum(TypeName):
|
|
194
219
|
pass
|
|
@@ -42,7 +42,7 @@ class HardwareEfficientAnsatz(function_params.FunctionParams):
|
|
|
42
42
|
"If none specified - use connectivity map from the model hardware settings. "
|
|
43
43
|
"If none specified as well, all qubit pairs will be connected.",
|
|
44
44
|
)
|
|
45
|
-
num_qubits: pydantic.PositiveInt = pydantic.Field(
|
|
45
|
+
num_qubits: pydantic.PositiveInt = pydantic.Field( # type: ignore[assignment]
|
|
46
46
|
default=None,
|
|
47
47
|
description="Number of qubits in the ansatz.",
|
|
48
48
|
validate_default=True,
|
|
@@ -130,7 +130,7 @@ class SynthesisQuantumFunctionCall(BaseModel):
|
|
|
130
130
|
default=True,
|
|
131
131
|
description="False value indicates this call shouldn't be controlled even if the flow is controlled.",
|
|
132
132
|
)
|
|
133
|
-
inputs: IOType = pydantic.Field(
|
|
133
|
+
inputs: IOType = pydantic.Field( # type: ignore[assignment]
|
|
134
134
|
default_factory=dict,
|
|
135
135
|
description="A mapping from the input name to the wire it connects to",
|
|
136
136
|
)
|
|
@@ -138,14 +138,14 @@ class SynthesisQuantumFunctionCall(BaseModel):
|
|
|
138
138
|
default_factory=dict,
|
|
139
139
|
description="A mapping from in/out name to the wires that connect to it",
|
|
140
140
|
)
|
|
141
|
-
outputs: IOType = pydantic.Field(
|
|
141
|
+
outputs: IOType = pydantic.Field( # type: ignore[assignment]
|
|
142
142
|
default_factory=dict,
|
|
143
143
|
description="A mapping from the output name to the wire it connects to",
|
|
144
144
|
)
|
|
145
145
|
power: PydanticPowerType = pydantic.Field(
|
|
146
146
|
default=1, description="Number of successive calls to the operation"
|
|
147
147
|
)
|
|
148
|
-
name: PydanticNonEmptyString = pydantic.Field(
|
|
148
|
+
name: PydanticNonEmptyString = pydantic.Field( # type: ignore[assignment]
|
|
149
149
|
default=None,
|
|
150
150
|
validate_default=True,
|
|
151
151
|
description="The name of the function instance. "
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
from collections.abc import Mapping
|
|
2
2
|
|
|
3
3
|
import pydantic
|
|
4
|
-
from pydantic import ConfigDict
|
|
5
4
|
|
|
6
5
|
from classiq.interface.generator.arith.register_user_input import RegisterArithmeticInfo
|
|
7
6
|
from classiq.interface.generator.function_params import ArithmeticIODict, FunctionParams
|
|
@@ -12,8 +11,6 @@ class CustomFunction(FunctionParams):
|
|
|
12
11
|
A user-defined custom function parameters object.
|
|
13
12
|
"""
|
|
14
13
|
|
|
15
|
-
model_config = ConfigDict(frozen=True, extra="forbid")
|
|
16
|
-
|
|
17
14
|
_name: str = pydantic.PrivateAttr(default="")
|
|
18
15
|
|
|
19
16
|
input_decls: ArithmeticIODict = pydantic.Field(
|
|
@@ -59,7 +59,7 @@ class IDEDataOperation(pydantic.BaseModel):
|
|
|
59
59
|
_qubits: list = pydantic.PrivateAttr() # list[Qubit]
|
|
60
60
|
|
|
61
61
|
displayArgs: str = ""
|
|
62
|
-
targets: Union[list[IDEQubitDef], list[IDEClassicalBitDef]] = pydantic.Field(
|
|
62
|
+
targets: Union[list[IDEQubitDef], list[IDEClassicalBitDef]] = pydantic.Field( # type: ignore[assignment]
|
|
63
63
|
default_factory=list
|
|
64
64
|
)
|
|
65
65
|
controls: list[IDEQubitDef] = list()
|
|
@@ -207,9 +207,9 @@ class Operation(pydantic.BaseModel):
|
|
|
207
207
|
|
|
208
208
|
|
|
209
209
|
class ProgramVisualModel(VersionedModel):
|
|
210
|
-
main_operation: Operation = pydantic.Field(default=None)
|
|
210
|
+
main_operation: Operation = pydantic.Field(default=None) # type: ignore[assignment]
|
|
211
211
|
id_to_operations: dict[int, Operation] = pydantic.Field(default_factory=dict)
|
|
212
|
-
main_operation_id: int = pydantic.Field(default=None)
|
|
212
|
+
main_operation_id: int = pydantic.Field(default=None) # type: ignore[assignment]
|
|
213
213
|
program_data: ProgramData
|
|
214
214
|
|
|
215
215
|
@property
|
classiq/interface/model/block.py
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
from typing import TYPE_CHECKING, Literal
|
|
1
|
+
from typing import TYPE_CHECKING, Literal, Optional
|
|
2
|
+
|
|
3
|
+
import pydantic
|
|
2
4
|
|
|
3
5
|
from classiq.interface.model.quantum_statement import QuantumOperation
|
|
4
6
|
|
|
@@ -10,3 +12,5 @@ class Block(QuantumOperation):
|
|
|
10
12
|
kind: Literal["Block"]
|
|
11
13
|
|
|
12
14
|
statements: "StatementBlock"
|
|
15
|
+
|
|
16
|
+
label: Optional[str] = pydantic.Field(default=None)
|
|
@@ -19,7 +19,7 @@ def _get_expr_id(expr: Expression) -> str:
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
class HandleBinding(ASTNode):
|
|
22
|
-
name: str = Field(default=None)
|
|
22
|
+
name: str = Field(default=None) # type: ignore[assignment]
|
|
23
23
|
model_config = ConfigDict(frozen=True, extra="forbid")
|
|
24
24
|
|
|
25
25
|
def __str__(self) -> str:
|
|
@@ -32,7 +32,7 @@ class QuantumLambdaFunction(ASTNode):
|
|
|
32
32
|
default=None
|
|
33
33
|
)
|
|
34
34
|
|
|
35
|
-
_py_callable: Callable = pydantic.PrivateAttr(default=None)
|
|
35
|
+
_py_callable: Callable = pydantic.PrivateAttr(default=None) # type: ignore[assignment]
|
|
36
36
|
|
|
37
37
|
@property
|
|
38
38
|
def py_callable(self) -> Callable:
|
|
@@ -4,7 +4,6 @@ from typing import Any, Callable, Optional
|
|
|
4
4
|
from uuid import UUID, uuid4
|
|
5
5
|
|
|
6
6
|
import pydantic
|
|
7
|
-
from pydantic import ConfigDict
|
|
8
7
|
from typing_extensions import Self
|
|
9
8
|
|
|
10
9
|
from classiq.interface.ast_node import ASTNode
|
|
@@ -21,7 +20,6 @@ from classiq.interface.model.handle_binding import (
|
|
|
21
20
|
|
|
22
21
|
class QuantumStatement(ASTNode):
|
|
23
22
|
kind: str
|
|
24
|
-
model_config = ConfigDict(extra="forbid")
|
|
25
23
|
uuid: UUID = pydantic.Field(
|
|
26
24
|
description="A unique identifier for this operation", default_factory=uuid4
|
|
27
25
|
)
|
|
@@ -29,12 +27,12 @@ class QuantumStatement(ASTNode):
|
|
|
29
27
|
def model_copy(
|
|
30
28
|
self,
|
|
31
29
|
*,
|
|
32
|
-
update: Optional[
|
|
30
|
+
update: Optional[Mapping[str, Any]] = None,
|
|
33
31
|
deep: bool = False,
|
|
34
32
|
keep_uuid: bool = False,
|
|
35
33
|
) -> Self:
|
|
36
34
|
if not keep_uuid:
|
|
37
|
-
update = update
|
|
35
|
+
update = dict(update) if update is not None else dict()
|
|
38
36
|
update.setdefault("uuid", uuid4())
|
|
39
37
|
return super().model_copy(update=update, deep=deep)
|
|
40
38
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from typing import TYPE_CHECKING, Any, Literal, Optional
|
|
2
2
|
|
|
3
3
|
import pydantic
|
|
4
|
-
from pydantic import BaseModel,
|
|
4
|
+
from pydantic import BaseModel, Field
|
|
5
5
|
from typing_extensions import Self
|
|
6
6
|
|
|
7
7
|
from classiq.interface.ast_node import HashableASTNode
|
|
@@ -35,8 +35,6 @@ if TYPE_CHECKING:
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
class QuantumType(HashableASTNode):
|
|
38
|
-
model_config = ConfigDict(extra="forbid")
|
|
39
|
-
|
|
40
38
|
_size_in_bits: Optional[int] = pydantic.PrivateAttr(default=None)
|
|
41
39
|
|
|
42
40
|
def _update_size_in_bits_from_declaration(self) -> None:
|
|
@@ -92,6 +90,9 @@ class QuantumType(HashableASTNode):
|
|
|
92
90
|
def expressions(self) -> list[Expression]:
|
|
93
91
|
return []
|
|
94
92
|
|
|
93
|
+
def without_symbolic_attributes(self) -> Self:
|
|
94
|
+
return self
|
|
95
|
+
|
|
95
96
|
|
|
96
97
|
class QuantumScalar(QuantumType):
|
|
97
98
|
def get_proxy(self, handle: "HandleBinding") -> QmodQScalarProxy:
|
|
@@ -292,6 +293,18 @@ class QuantumBitvector(QuantumType):
|
|
|
292
293
|
length = 1
|
|
293
294
|
return length * self.element_type.minimal_size_in_bits
|
|
294
295
|
|
|
296
|
+
def without_symbolic_attributes(self) -> "QuantumBitvector":
|
|
297
|
+
length = (
|
|
298
|
+
None
|
|
299
|
+
if self.length is None
|
|
300
|
+
or not self.length.is_evaluated()
|
|
301
|
+
or not self.length.is_constant()
|
|
302
|
+
else self.length
|
|
303
|
+
)
|
|
304
|
+
return QuantumBitvector(
|
|
305
|
+
element_type=self.element_type.without_symbolic_attributes(), length=length
|
|
306
|
+
)
|
|
307
|
+
|
|
295
308
|
|
|
296
309
|
class QuantumNumeric(QuantumScalar):
|
|
297
310
|
kind: Literal["qnum"]
|
|
@@ -487,6 +500,36 @@ class QuantumNumeric(QuantumScalar):
|
|
|
487
500
|
def minimal_size_in_bits(self) -> int:
|
|
488
501
|
return self.size_in_bits if self.has_size_in_bits else 1
|
|
489
502
|
|
|
503
|
+
def without_symbolic_attributes(self) -> "QuantumNumeric":
|
|
504
|
+
size = (
|
|
505
|
+
None
|
|
506
|
+
if self.size is None
|
|
507
|
+
or not self.size.is_evaluated()
|
|
508
|
+
or not self.size.is_constant()
|
|
509
|
+
else self.size
|
|
510
|
+
)
|
|
511
|
+
is_signed = (
|
|
512
|
+
None
|
|
513
|
+
if self.is_signed is None
|
|
514
|
+
or not self.is_signed.is_evaluated()
|
|
515
|
+
or not self.is_signed.is_constant()
|
|
516
|
+
else self.is_signed
|
|
517
|
+
)
|
|
518
|
+
fraction_digits = (
|
|
519
|
+
None
|
|
520
|
+
if self.fraction_digits is None
|
|
521
|
+
or not self.fraction_digits.is_evaluated()
|
|
522
|
+
or not self.fraction_digits.is_constant()
|
|
523
|
+
else self.fraction_digits
|
|
524
|
+
)
|
|
525
|
+
if size is None or is_signed is None or fraction_digits is None:
|
|
526
|
+
is_signed = fraction_digits = None
|
|
527
|
+
qnum = QuantumNumeric(
|
|
528
|
+
size=size, is_signed=is_signed, fraction_digits=fraction_digits
|
|
529
|
+
)
|
|
530
|
+
qnum.set_bounds(self.get_bounds())
|
|
531
|
+
return qnum
|
|
532
|
+
|
|
490
533
|
|
|
491
534
|
class RegisterQuantumType(BaseModel):
|
|
492
535
|
quantum_types: "ConcreteQuantumType"
|
|
@@ -101,6 +101,7 @@ __all__ = [
|
|
|
101
101
|
"inplace_c_modular_multiply",
|
|
102
102
|
"inplace_prepare_complex_amplitudes",
|
|
103
103
|
"inplace_prepare_int",
|
|
104
|
+
"inplace_prepare_sparse_amplitudes",
|
|
104
105
|
"lcu",
|
|
105
106
|
"lcu_pauli",
|
|
106
107
|
"linear_pauli_rotations",
|
|
@@ -117,6 +118,7 @@ __all__ = [
|
|
|
117
118
|
"prepare_ghz_state",
|
|
118
119
|
"prepare_int",
|
|
119
120
|
"prepare_linear_amplitudes",
|
|
121
|
+
"prepare_sparse_amplitudes",
|
|
120
122
|
"prepare_uniform_interval_state",
|
|
121
123
|
"prepare_uniform_trimmed_state",
|
|
122
124
|
"projector_controlled_double_phase",
|
|
@@ -24,6 +24,7 @@ from classiq.qmod.builtins.operations import (
|
|
|
24
24
|
control,
|
|
25
25
|
if_,
|
|
26
26
|
inplace_add,
|
|
27
|
+
inplace_xor,
|
|
27
28
|
repeat,
|
|
28
29
|
within_apply,
|
|
29
30
|
)
|
|
@@ -358,7 +359,8 @@ def inplace_prepare_complex_amplitudes(
|
|
|
358
359
|
target: The quantum variable to act upon.
|
|
359
360
|
"""
|
|
360
361
|
inplace_prepare_amplitudes(magnitudes, 0, target)
|
|
361
|
-
|
|
362
|
+
if not np.allclose(phases, 0, atol=1e-12):
|
|
363
|
+
apply_phase_table(phases, target)
|
|
362
364
|
|
|
363
365
|
|
|
364
366
|
@qfunc
|
|
@@ -486,7 +488,7 @@ def _zero_ctrl_rot(ctrl: QNum, target: QBit, theta: CReal) -> None:
|
|
|
486
488
|
|
|
487
489
|
@qfunc
|
|
488
490
|
def prepare_linear_amplitudes(x: QArray) -> None:
|
|
489
|
-
"""
|
|
491
|
+
"""
|
|
490
492
|
[Qmod Classiq-library function]
|
|
491
493
|
|
|
492
494
|
Initializes a quantum variable in a state with linear amplitudes:
|
|
@@ -511,3 +513,136 @@ def prepare_linear_amplitudes(x: QArray) -> None:
|
|
|
511
513
|
_zero_ctrl_rot(x[0:k], x[k], thetas[k])
|
|
512
514
|
|
|
513
515
|
hadamard_transform(x)
|
|
516
|
+
|
|
517
|
+
|
|
518
|
+
@qfunc
|
|
519
|
+
def swap_states(a: int, b: int, target: QArray) -> None:
|
|
520
|
+
"""
|
|
521
|
+
Swap 2 computational basis states a and b, leave all other states untouched.
|
|
522
|
+
|
|
523
|
+
Args:
|
|
524
|
+
a: 1st state number.
|
|
525
|
+
b: 2nd state number.
|
|
526
|
+
target: The quantum variable to act upon.
|
|
527
|
+
"""
|
|
528
|
+
assert a != b, "a and b should be different"
|
|
529
|
+
diff = a ^ b
|
|
530
|
+
diff_indices = [i for i in range(target.len) if (diff >> i) & 1]
|
|
531
|
+
anchor = diff_indices[0]
|
|
532
|
+
anchor_bit = (a >> anchor) & 1
|
|
533
|
+
|
|
534
|
+
# a hack for the binding (should be improved after we have cast
|
|
535
|
+
target_without_anchor = []
|
|
536
|
+
if anchor > 0:
|
|
537
|
+
target_without_anchor.append(target[0:anchor])
|
|
538
|
+
if anchor < target.len - 1:
|
|
539
|
+
target_without_anchor.append(target[anchor + 1 : target.len])
|
|
540
|
+
|
|
541
|
+
@qfunc
|
|
542
|
+
def _xor_if_equal(n: CInt, ctrl: QNum, target: QBit) -> None:
|
|
543
|
+
target ^= ctrl == n
|
|
544
|
+
|
|
545
|
+
def _remove_bit(x: int, j: int) -> int:
|
|
546
|
+
"""
|
|
547
|
+
Remove bit j from integer x (0 = least significant bit)
|
|
548
|
+
and shift higher bits down.
|
|
549
|
+
"""
|
|
550
|
+
low = x & ((1 << j) - 1) # bits below j
|
|
551
|
+
high = x >> (j + 1) # bits above j
|
|
552
|
+
return low | (high << j)
|
|
553
|
+
|
|
554
|
+
within_apply(
|
|
555
|
+
# make the states equal except the anchor qubit
|
|
556
|
+
lambda: [
|
|
557
|
+
inplace_xor(target[anchor] != anchor_bit, target[i])
|
|
558
|
+
for i in diff_indices[1:]
|
|
559
|
+
],
|
|
560
|
+
# do the actual swapping
|
|
561
|
+
lambda: _xor_if_equal(
|
|
562
|
+
_remove_bit(a, anchor), target_without_anchor, target[anchor]
|
|
563
|
+
),
|
|
564
|
+
)
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
@qfunc
|
|
568
|
+
def inplace_prepare_sparse_amplitudes(
|
|
569
|
+
states: list[int], amplitudes: list[complex], target: QArray
|
|
570
|
+
) -> None:
|
|
571
|
+
"""
|
|
572
|
+
[Qmod Classiq-library function]
|
|
573
|
+
|
|
574
|
+
Prepares a quantum state with the given (complex) amplitudes. The input is given sparse format, as a list of non-zero states and their corresponding amplitudes.
|
|
575
|
+
Notice that the function is only suitable sparse states. Inspired by https://arxiv.org/abs/2310.19309.
|
|
576
|
+
|
|
577
|
+
For example, `inplace_prepare_sparse_amplitudes([1, 8], [np.sqrt(0.5), np.sqrt(0.5)], target)` will prepare the state sqrt(0.5)|1> + sqrt(0.5)|8>
|
|
578
|
+
on the target variable, assuming it starts in the |0> state.
|
|
579
|
+
|
|
580
|
+
Complexity: Asymptotic gate complexity is $O(dn)$ where d is the number of states and n is the target number of qubits.
|
|
581
|
+
|
|
582
|
+
Args:
|
|
583
|
+
states: A list of distinct computational basis indices to populate. Each integer corresponds to the basis state in the computational basis.
|
|
584
|
+
amplitudes: A list of complex amplitudes for the corresponding entries in `states`. Must have the same length as `states`.
|
|
585
|
+
target: The quantum variable on which the state is to be prepared. Its size must be sufficient to represent all states in `states`.
|
|
586
|
+
"""
|
|
587
|
+
assert len(amplitudes) == len(
|
|
588
|
+
states
|
|
589
|
+
), "amplitudes and states should have the same size"
|
|
590
|
+
assert (
|
|
591
|
+
max(list(states)) <= 2**target.len
|
|
592
|
+
), "the target quantum variable is not large enough to populate all states"
|
|
593
|
+
assert len(set(states)) == len(states), "all states should be distinct"
|
|
594
|
+
|
|
595
|
+
# prepare a dense state
|
|
596
|
+
dense_size = max(int(np.ceil(np.log2(len(states)))), 1)
|
|
597
|
+
dense_amplitudes = np.zeros(2**dense_size, dtype=complex)
|
|
598
|
+
|
|
599
|
+
## make sure the states with number smaller than the dense state size are located in their place already
|
|
600
|
+
for i, state in enumerate(states):
|
|
601
|
+
if state < len(dense_amplitudes):
|
|
602
|
+
dense_amplitudes[state] = amplitudes[i]
|
|
603
|
+
|
|
604
|
+
## make a swap list for all other states
|
|
605
|
+
swap_list = []
|
|
606
|
+
free_index = 0
|
|
607
|
+
for i, state in enumerate(states):
|
|
608
|
+
if state < len(dense_amplitudes):
|
|
609
|
+
continue # already populated
|
|
610
|
+
while dense_amplitudes[free_index]:
|
|
611
|
+
free_index += 1 # index is not free
|
|
612
|
+
|
|
613
|
+
dense_amplitudes[free_index] = amplitudes[i]
|
|
614
|
+
swap_list.append((free_index, state))
|
|
615
|
+
free_index += 1
|
|
616
|
+
|
|
617
|
+
inplace_prepare_complex_amplitudes(
|
|
618
|
+
np.abs(dense_amplitudes), np.angle(dense_amplitudes), target[0:dense_size]
|
|
619
|
+
)
|
|
620
|
+
|
|
621
|
+
# swap all required states
|
|
622
|
+
sparse_size = max(int(np.ceil(np.log2(max(list(states) + [1])))), 1)
|
|
623
|
+
for a, b in swap_list:
|
|
624
|
+
swap_states(a, b, target[0:sparse_size])
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
@qfunc
|
|
628
|
+
def prepare_sparse_amplitudes(
|
|
629
|
+
states: list[int], amplitudes: list[complex], out: Output[QArray]
|
|
630
|
+
) -> None:
|
|
631
|
+
"""
|
|
632
|
+
[Qmod Classiq-library function]
|
|
633
|
+
|
|
634
|
+
Initializes and prepares a quantum state with the given (complex) amplitudes. The input is given sparse format, as a list of non-zero states and their corresponding amplitudes.
|
|
635
|
+
Notice that the function is only suitable sparse states. Inspired by https://arxiv.org/abs/2310.19309.
|
|
636
|
+
|
|
637
|
+
For example, `prepare_sparse_amplitudes([1, 8], [np.sqrt(0.5), np.sqrt(0.5)], out)` will and allocate it to be of size 4 qubits, and
|
|
638
|
+
prepare it in the state sqrt(0.5)|1> + sqrt(0.5)|8>.
|
|
639
|
+
|
|
640
|
+
Complexity: Asymptotic gate complexity is $O(dn)$ where d is the number of states and n is the required number of qubits.
|
|
641
|
+
|
|
642
|
+
Args:
|
|
643
|
+
states: A list of distinct computational basis indices to populate. Each integer corresponds to the basis state in the computational basis.
|
|
644
|
+
amplitudes: A list of complex amplitudes for the corresponding entries in `states`. Must have the same length as `states`.
|
|
645
|
+
out: The allocated quantum variable.
|
|
646
|
+
"""
|
|
647
|
+
allocate(max(int(np.ceil(np.log2(max(states)))), 1), out)
|
|
648
|
+
inplace_prepare_sparse_amplitudes(states, amplitudes, out)
|
classiq/qmod/qmod_variable.py
CHANGED
|
@@ -9,6 +9,7 @@ from typing import ( # type: ignore[attr-defined]
|
|
|
9
9
|
ForwardRef,
|
|
10
10
|
Generic,
|
|
11
11
|
Literal,
|
|
12
|
+
NoReturn,
|
|
12
13
|
Optional,
|
|
13
14
|
Protocol,
|
|
14
15
|
TypeVar,
|
|
@@ -268,6 +269,51 @@ class QScalar(QVar, SymbolicExpr):
|
|
|
268
269
|
self._insert_amplitude_loading(other, get_source_ref(sys._getframe(1)))
|
|
269
270
|
return self
|
|
270
271
|
|
|
272
|
+
def __iand__(self, other: Any) -> NoReturn:
|
|
273
|
+
raise ClassiqNotImplementedError(
|
|
274
|
+
f"{self.get_qmod_type().raw_qmod_type_name} does not support '-='"
|
|
275
|
+
)
|
|
276
|
+
|
|
277
|
+
def __ifloordiv__(self, other: Any) -> NoReturn:
|
|
278
|
+
raise ClassiqNotImplementedError(
|
|
279
|
+
f"{self.get_qmod_type().raw_qmod_type_name} does not support '//='"
|
|
280
|
+
)
|
|
281
|
+
|
|
282
|
+
def __ilshift__(self, other: Any) -> NoReturn:
|
|
283
|
+
raise ClassiqNotImplementedError(
|
|
284
|
+
f"{self.get_qmod_type().raw_qmod_type_name} does not support '<<='"
|
|
285
|
+
)
|
|
286
|
+
|
|
287
|
+
def __imod__(self, other: Any) -> NoReturn:
|
|
288
|
+
raise ClassiqNotImplementedError(
|
|
289
|
+
f"{self.get_qmod_type().raw_qmod_type_name} does not support '%='"
|
|
290
|
+
)
|
|
291
|
+
|
|
292
|
+
def __imatmul__(self, other: Any) -> NoReturn:
|
|
293
|
+
raise ClassiqNotImplementedError(
|
|
294
|
+
f"{self.get_qmod_type().raw_qmod_type_name} does not support '@='"
|
|
295
|
+
)
|
|
296
|
+
|
|
297
|
+
def __ipow__(self, other: Any) -> NoReturn:
|
|
298
|
+
raise ClassiqNotImplementedError(
|
|
299
|
+
f"{self.get_qmod_type().raw_qmod_type_name} does not support '**='"
|
|
300
|
+
)
|
|
301
|
+
|
|
302
|
+
def __irshift__(self, other: Any) -> NoReturn:
|
|
303
|
+
raise ClassiqNotImplementedError(
|
|
304
|
+
f"{self.get_qmod_type().raw_qmod_type_name} does not support '>>='"
|
|
305
|
+
)
|
|
306
|
+
|
|
307
|
+
def __isub__(self, other: Any) -> NoReturn:
|
|
308
|
+
raise ClassiqNotImplementedError(
|
|
309
|
+
f"{self.get_qmod_type().raw_qmod_type_name} does not support '-='"
|
|
310
|
+
)
|
|
311
|
+
|
|
312
|
+
def __itruediv__(self, other: Any) -> NoReturn:
|
|
313
|
+
raise ClassiqNotImplementedError(
|
|
314
|
+
f"{self.get_qmod_type().raw_qmod_type_name} does not support '/='"
|
|
315
|
+
)
|
|
316
|
+
|
|
271
317
|
|
|
272
318
|
class QBit(QScalar):
|
|
273
319
|
"""A type representing a single qubit.
|
|
@@ -480,7 +526,7 @@ class QArray(ArrayBase[_P], QVar, NonSymbolicExpr):
|
|
|
480
526
|
self,
|
|
481
527
|
name: Union[None, str, HandleBinding] = None,
|
|
482
528
|
element_type: Union[_GenericAlias, QuantumType] = QBit,
|
|
483
|
-
length: Optional[Union[int, SymbolicExpr, Expression]] = None,
|
|
529
|
+
length: Optional[Union[int, CInt, SymbolicExpr, Expression]] = None,
|
|
484
530
|
_expr_str: Optional[str] = None,
|
|
485
531
|
) -> None:
|
|
486
532
|
self._element_type = element_type
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: classiq
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.89.0
|
|
4
4
|
Summary: Classiq's Python SDK for quantum computing
|
|
5
5
|
License: Proprietary
|
|
6
6
|
Keywords: quantum computing,quantum circuits,quantum algorithms,QAD,QDL
|
|
@@ -47,7 +47,7 @@ Requires-Dist: openfermionpyscf ; extra == "chemistry"
|
|
|
47
47
|
Requires-Dist: packaging (>=23.2,<24.0)
|
|
48
48
|
Requires-Dist: pandas (>=1.4.0,<3.0.0)
|
|
49
49
|
Requires-Dist: plotly (>=5.7.0,<6.0.0)
|
|
50
|
-
Requires-Dist: pydantic (>=2.
|
|
50
|
+
Requires-Dist: pydantic (>=2.10.4,<3.0.0)
|
|
51
51
|
Requires-Dist: pydantic-settings (>=2.4.0,<3.0.0)
|
|
52
52
|
Requires-Dist: scipy (>=1.10.0,<2.0.0) ; python_version < "3.12"
|
|
53
53
|
Requires-Dist: scipy (>=1.11.0,<2.0.0) ; python_version >= "3.12"
|
|
@@ -12,7 +12,7 @@ classiq/_internals/authentication/device.py,sha256=dUii1-Z26j0NY4R6J4p0gjYSq5Goj
|
|
|
12
12
|
classiq/_internals/authentication/password_manager.py,sha256=nhJyr8IGrsq3oaGtD0UXZ_rCN4GPI-4LrTYHc1R--sQ,4464
|
|
13
13
|
classiq/_internals/authentication/token_manager.py,sha256=XStkqCPUQEqc3uj6tt_XzfUIcUlyT-94tBZ8tpQIy_s,5280
|
|
14
14
|
classiq/_internals/client.py,sha256=gHnkpKedytRAXaRasU2CkICttbQd2IsT1tAPPGd8oTU,12634
|
|
15
|
-
classiq/_internals/config.py,sha256
|
|
15
|
+
classiq/_internals/config.py,sha256=xABHFEtcW5RlPWQ7PG2BNC1DSmY62cfpOnR7qReVxF8,3555
|
|
16
16
|
classiq/_internals/help.py,sha256=9gl64Y8nKW-f-8pYt7lMozOP6uERcIIf8dotgn_WKA0,460
|
|
17
17
|
classiq/_internals/host_checker.py,sha256=D0rgnoZrHo62rYS32yCuYZSyMrMChZG5ITsJxwj0R5g,3969
|
|
18
18
|
classiq/_internals/jobs.py,sha256=Wu8FvnhqAjLghBhfrCOHj0cMSH7LV39gI-6Iit_TWOc,6329
|
|
@@ -96,16 +96,16 @@ classiq/evaluators/classical_type_inference.py,sha256=kB_nWdB1LlHNobrCCNtsv1i2_3
|
|
|
96
96
|
classiq/evaluators/control.py,sha256=rFSP5kuQZfh0OPMuf0OmiDVlX_c0stl2mKX4tnIhAHA,4110
|
|
97
97
|
classiq/evaluators/expression_evaluator.py,sha256=zMGmVvBvItaz_rX3XqFLrkDZiDkODa_dIl796rFgr1U,4790
|
|
98
98
|
classiq/evaluators/parameter_types.py,sha256=t_qcssvoSS7techLKNrumbEHuwee34igB_9jzGICIqA,12486
|
|
99
|
-
classiq/evaluators/qmod_annotated_expression.py,sha256=
|
|
99
|
+
classiq/evaluators/qmod_annotated_expression.py,sha256=0AA6o7kbEAqQxoxbJfbymINHZ0QM5NOIVQ0oUys4nXk,11200
|
|
100
100
|
classiq/evaluators/qmod_expression_visitors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
101
101
|
classiq/evaluators/qmod_expression_visitors/out_of_place_node_transformer.py,sha256=V77ZsxPvr52zSpUF3XuuP9_7khZRMIxon02I9gaayUo,682
|
|
102
102
|
classiq/evaluators/qmod_expression_visitors/qmod_expression_bwc.py,sha256=uiVbkLrPkEE8K6XA_rPTJ7ldrVvQ667NekRMX0W_73Y,5123
|
|
103
|
-
classiq/evaluators/qmod_expression_visitors/qmod_expression_evaluator.py,sha256
|
|
104
|
-
classiq/evaluators/qmod_expression_visitors/qmod_expression_renamer.py,sha256=
|
|
103
|
+
classiq/evaluators/qmod_expression_visitors/qmod_expression_evaluator.py,sha256=6_GuyifNpjqQnC7HfPPPfBfjpZBQrWkZGa561A_cECc,10345
|
|
104
|
+
classiq/evaluators/qmod_expression_visitors/qmod_expression_renamer.py,sha256=taYVqtadDdqerLewMXT2Up7-xk9eS60h8H0sObWL_CU,2268
|
|
105
105
|
classiq/evaluators/qmod_expression_visitors/qmod_expression_simplifier.py,sha256=PGjtKE30k2Xse41j94UQ0WJSouV-N2T0v-NxGhJ8cRk,10594
|
|
106
106
|
classiq/evaluators/qmod_expression_visitors/sympy_wrappers.py,sha256=ljvzVBdVm-IkzNuKVZBnvnLDuDgg7ese3sfVzNx2PZk,1524
|
|
107
107
|
classiq/evaluators/qmod_node_evaluators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
108
|
-
classiq/evaluators/qmod_node_evaluators/attribute_evaluation.py,sha256=
|
|
108
|
+
classiq/evaluators/qmod_node_evaluators/attribute_evaluation.py,sha256=NsM2uYDeZsEH6Cm3TS500jS9kroaIC0vOnmn7Kr8Im0,7017
|
|
109
109
|
classiq/evaluators/qmod_node_evaluators/binary_op_evaluation.py,sha256=oFgLX6SruvOsGfsf9L8zs8slbu_a2VblSLFEdQagT9M,9479
|
|
110
110
|
classiq/evaluators/qmod_node_evaluators/bool_op_evaluation.py,sha256=avllgdt2y3pbBbnyF6AgwhE0icYXrUmCYHbWWxrj95w,2219
|
|
111
111
|
classiq/evaluators/qmod_node_evaluators/classical_function_evaluation.py,sha256=Q16IaxIJLsR3s_-WNbue_Q-eeBGQPea6Vugppi94i2I,11518
|
|
@@ -135,9 +135,9 @@ classiq/execution/qnn.py,sha256=S7I7OK59RF9jUcfhN4zso4bF-0HnqYnZID11iquA-lM,2467
|
|
|
135
135
|
classiq/execution/user_budgets.py,sha256=aQ92T6fWMpnWUXe6WvOHHu1BdFGKjpbdPa8avoS5PaQ,2573
|
|
136
136
|
classiq/executor.py,sha256=uLr1640-DZtdPP0T6fCsmUf1Jj7QPumyoE09mJ8lVo0,2308
|
|
137
137
|
classiq/interface/__init__.py,sha256=cg7hD_XVu1_jJ1fgwmT0rMIoZHopNVeB8xtlmMx-E_A,83
|
|
138
|
-
classiq/interface/_version.py,sha256=
|
|
138
|
+
classiq/interface/_version.py,sha256=CnHe0qP_kU6v2pCHeKhtAWyckHvu_AUwWPbvKdJdtw0,197
|
|
139
139
|
classiq/interface/analyzer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
140
|
-
classiq/interface/analyzer/analysis_params.py,sha256=
|
|
140
|
+
classiq/interface/analyzer/analysis_params.py,sha256=_gFPgHJYJoJ_SOwn7f2UQDbAF6v78STJKTVn5fu5NHU,3911
|
|
141
141
|
classiq/interface/analyzer/cytoscape_graph.py,sha256=MpeRBIYS1TfwYwiFpgTO51IE0KoxhY510pmEM3S0rbw,2361
|
|
142
142
|
classiq/interface/analyzer/result.py,sha256=CJhZ7Q_VUCyKS1ivtyD9l9534efjEUY6C6Wwrb3kXak,5872
|
|
143
143
|
classiq/interface/applications/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -147,7 +147,7 @@ classiq/interface/applications/iqae/iqae_result.py,sha256=S13A_mQKRTBaqO2NKJEJlg
|
|
|
147
147
|
classiq/interface/applications/qsvm.py,sha256=4dHVSZH--sv58SvxmpDHPh9JDr4qQUZbbGCeaEv6b1I,3408
|
|
148
148
|
classiq/interface/ast_node.py,sha256=-X3lke3c2Wm0fGDupj0g4cGfuRmLv4hA4EjLsJ1dHqE,941
|
|
149
149
|
classiq/interface/backend/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
150
|
-
classiq/interface/backend/backend_preferences.py,sha256=
|
|
150
|
+
classiq/interface/backend/backend_preferences.py,sha256=uxcmn15AOi27tXkoSTT9_YrPJwpnx9zT9S0_eX26Flc,20730
|
|
151
151
|
classiq/interface/backend/ionq/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
152
152
|
classiq/interface/backend/ionq/ionq_quantum_program.py,sha256=f8w1XvgIggaM_w9TF0_wkQHB3wamXg5kHMNsgtCsH3k,1235
|
|
153
153
|
classiq/interface/backend/pydantic_backend.py,sha256=XfG1u_8ZEq382P5LTHYEhjkDH7UZYY_1sl1O-RImSmk,1610
|
|
@@ -235,7 +235,7 @@ classiq/interface/generator/arith/extremum_operations.py,sha256=SVUoZFkNZCfI2wLC
|
|
|
235
235
|
classiq/interface/generator/arith/logical_ops.py,sha256=Eso-FvZKRhPFwAuOlOVdXAySMvYVb_mZh1DYM0eKfbA,2681
|
|
236
236
|
classiq/interface/generator/arith/machine_precision.py,sha256=uh1qwWL056mSdcANKddz5G720plWvAxlXIp7a32Tdtg,68
|
|
237
237
|
classiq/interface/generator/arith/number_utils.py,sha256=UR624E5yDJrdF0FX84UWO9PVSCABNWGXGrYdBXnFa1I,4550
|
|
238
|
-
classiq/interface/generator/arith/register_user_input.py,sha256=
|
|
238
|
+
classiq/interface/generator/arith/register_user_input.py,sha256=FykQn_9QtIj3hSvxFLY2pSYWlUzxPEeDdnBegkhFy1g,5173
|
|
239
239
|
classiq/interface/generator/arith/unary_ops.py,sha256=VAX1a5S3B7bYoNeOySZzsvADceCp0F29wITO3GecPg0,5382
|
|
240
240
|
classiq/interface/generator/arith/uncomputation_methods.py,sha256=AbBAgOYTEJ2ufDyJLDew7RKCZPMS8vb7K0Ld6adInXk,136
|
|
241
241
|
classiq/interface/generator/builtin_api_builder.py,sha256=xDn-gRte0n8fNB03hwPjQE8MZhfDJyNrJrmymtahohg,418
|
|
@@ -286,13 +286,13 @@ classiq/interface/generator/functions/__init__.py,sha256=HXHq8Fw2zHG3AYuRXrDEQdJ
|
|
|
286
286
|
classiq/interface/generator/functions/builtins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
287
287
|
classiq/interface/generator/functions/builtins/internal_operators.py,sha256=12AfPkgPEw8FqFpB_m8hmaKboezqNzn0lFWMpykedxI,516
|
|
288
288
|
classiq/interface/generator/functions/classical_function_declaration.py,sha256=1Y8LNr1HzKYNpxAZ5AIi7ko0fftO5kbkYPqZsJbXXto,1168
|
|
289
|
-
classiq/interface/generator/functions/classical_type.py,sha256=
|
|
289
|
+
classiq/interface/generator/functions/classical_type.py,sha256=kYDpeWrTqyyM4CYXynzHS6Q9oaAPHEhWU6kCaWUqrOY,10352
|
|
290
290
|
classiq/interface/generator/functions/concrete_types.py,sha256=AqiHKKVtOfntok3L81LLttbz5zCKD4WBUvqPpNFI2OA,1696
|
|
291
|
-
classiq/interface/generator/functions/function_declaration.py,sha256=
|
|
291
|
+
classiq/interface/generator/functions/function_declaration.py,sha256=KSZ_q2hwAxcXIocJTttWretnI7BNzoYNAkBr1TXJcok,515
|
|
292
292
|
classiq/interface/generator/functions/port_declaration.py,sha256=ESJE_19jOg_zS1reFN5dq0xgobZ6J3C3DsIs6EME1c4,1100
|
|
293
293
|
classiq/interface/generator/functions/qmod_python_interface.py,sha256=w1Oz3bV6KS7WzVB8z0_7CnNzdRqos9xoqJzD820db1c,590
|
|
294
294
|
classiq/interface/generator/functions/type_modifier.py,sha256=m7KTKcrxN0ybUv36tLbqvf2VTwVnN8JL5HftNSPzII0,902
|
|
295
|
-
classiq/interface/generator/functions/type_name.py,sha256=
|
|
295
|
+
classiq/interface/generator/functions/type_name.py,sha256=r00qITv5TuY8MOlfWXE_IohoFAw9ZhWKashhMSYCcGA,7587
|
|
296
296
|
classiq/interface/generator/generated_circuit_data.py,sha256=4E8frDa8J90nZQNHyfXxmnfu6tRF0ICLCAiNc0Qv1K0,13398
|
|
297
297
|
classiq/interface/generator/hadamard_transform.py,sha256=NI4oZBpDCGfaw2OTb5SL3iSGI_nDtyUgElTCO4pEKnk,673
|
|
298
298
|
classiq/interface/generator/hamiltonian_evolution/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -302,7 +302,7 @@ classiq/interface/generator/hamiltonian_evolution/qdrift.py,sha256=IFF015sz0gaqX
|
|
|
302
302
|
classiq/interface/generator/hamiltonian_evolution/suzuki_trotter.py,sha256=JCYnbixIv5tZzDU4CTPW0m44Il7-NeAow4MgjAw0-K4,1957
|
|
303
303
|
classiq/interface/generator/hardware/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
304
304
|
classiq/interface/generator/hardware/hardware_data.py,sha256=W_1RWbpQ1bf2-UGUG7oWoGK9UupHpD6ikq6AHYrQYHI,8674
|
|
305
|
-
classiq/interface/generator/hardware_efficient_ansatz.py,sha256=
|
|
305
|
+
classiq/interface/generator/hardware_efficient_ansatz.py,sha256=0H8esJY2cyNTZzA4aVqCnwsH5efNW-Au1V1skkz0nh8,5129
|
|
306
306
|
classiq/interface/generator/hartree_fock.py,sha256=5oVtOi1JfICkZoFyKgcxIRgr8oTCIt95DKL_UJYxlQI,771
|
|
307
307
|
classiq/interface/generator/hva.py,sha256=WUASsN9Um_oMtoizJTCWBMOT9LifoDSAkclo_-bhxXI,594
|
|
308
308
|
classiq/interface/generator/identity.py,sha256=XDiA47DP7JirPaUMUqIQQgyahjWw7N3LGjF0LnZ5V_0,1263
|
|
@@ -324,7 +324,7 @@ classiq/interface/generator/preferences/__init__.py,sha256=47DEQpj8HBSa-_TImW-5J
|
|
|
324
324
|
classiq/interface/generator/preferences/optimization.py,sha256=7iEWWNFSxqi4XMb4JmOcfeN8KqvNMEcSjQw8P8yrdOA,1066
|
|
325
325
|
classiq/interface/generator/qft.py,sha256=SDLcPWYxshDfPl-tAfhpRFb30NpPRRFpje5Jrrkb9Gs,1184
|
|
326
326
|
classiq/interface/generator/qsvm.py,sha256=Ry2iTC2NIoh0u9BsuwVaO-ICUBbRIF7Of9scJG4sGFs,3056
|
|
327
|
-
classiq/interface/generator/quantum_function_call.py,sha256=
|
|
327
|
+
classiq/interface/generator/quantum_function_call.py,sha256=8p-JMufeq_RHRX3YRv4UyE1QyePaWEHwh5sJgdqIV1Y,24207
|
|
328
328
|
classiq/interface/generator/quantum_program.py,sha256=0of6gXJWIePCgi38nDSQeIvlWmBRWzOf_qzcJzJzdZ8,7551
|
|
329
329
|
classiq/interface/generator/randomized_benchmarking.py,sha256=D6KI_1fMF5oBydaal2WLmTSit6xSMtz0yDAIZMMO89Q,635
|
|
330
330
|
classiq/interface/generator/range_types.py,sha256=X6CtSyimlpISz9QNbCdqqQkRg1pOGHEQCXy4aEeSwA4,2044
|
|
@@ -362,7 +362,7 @@ classiq/interface/generator/types/qstruct_declaration.py,sha256=Qw6cHW_elZmrs4UO
|
|
|
362
362
|
classiq/interface/generator/types/struct_declaration.py,sha256=2qKVV-pdqeUGiwKh2-5W2Ci4z0aQG4TG91MuQ82fa_A,959
|
|
363
363
|
classiq/interface/generator/ucc.py,sha256=ZhjaEy4YJDkZwXLzlsFbjUn6k7ebyUJ_qKdLmxdxvp8,2699
|
|
364
364
|
classiq/interface/generator/unitary_gate.py,sha256=UWL1F2lX3hkazyyFJvuaFu5SOrQumAVf5392IIXVf4M,1885
|
|
365
|
-
classiq/interface/generator/user_defined_function_params.py,sha256=
|
|
365
|
+
classiq/interface/generator/user_defined_function_params.py,sha256=xq9UGKP6CcRsUEKgud9jOVnAZ3rqE2jqgdhXpE8JqiU,1459
|
|
366
366
|
classiq/interface/generator/validations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
367
367
|
classiq/interface/generator/validations/flow_graph.py,sha256=ceOodlLaDTgI8kpgLSosfGSawNowN6vB2AnYh6Wu4Vo,6203
|
|
368
368
|
classiq/interface/generator/validations/validator_functions.py,sha256=ODvbPavjxx2skGdNdgT5d9ZsZjsp9XkHBUPK7oZBElY,1418
|
|
@@ -382,20 +382,20 @@ classiq/interface/helpers/text_utils.py,sha256=T0EYCtSg6antfbvXwE5meoDHGRwNHQL7Y
|
|
|
382
382
|
classiq/interface/helpers/validation_helpers.py,sha256=Jt0xs5EZeEQZOBEZPRmKctHmAiEfp6cWhLcSycsU_8w,594
|
|
383
383
|
classiq/interface/helpers/versioned_model.py,sha256=ttIxi5oRkISFtTlVXU47gcamqE3hWr1YGSkS2ZQ8Y_o,677
|
|
384
384
|
classiq/interface/ide/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
385
|
-
classiq/interface/ide/ide_data.py,sha256=
|
|
385
|
+
classiq/interface/ide/ide_data.py,sha256=a6HlNobQy4-5zkcRRfhPp7WZ1k7cV2D5Hl4LLeSD_3U,2532
|
|
386
386
|
classiq/interface/ide/operation_registry.py,sha256=WlOrN0kIM8Tda-ix5G25uMXQM-B49mjl1YnUGCOKu_c,1585
|
|
387
|
-
classiq/interface/ide/visual_model.py,sha256=
|
|
387
|
+
classiq/interface/ide/visual_model.py,sha256=3TbjK_DfNvTlGZr1Kx1nRJtqbKwexVLuScjj_16vfI0,6213
|
|
388
388
|
classiq/interface/interface_version.py,sha256=xE-GrYxA_H8DtcmC-Uu27pU8yDRmpL7EB2LwXM8KlgQ,25
|
|
389
389
|
classiq/interface/jobs.py,sha256=i8hrBR2qtptCbxNI-PVYZedH_EDehOe2i09JbJUlD1g,2339
|
|
390
390
|
classiq/interface/model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
391
391
|
classiq/interface/model/allocate.py,sha256=sN9v5ile1oxkahpML8o1nB39odHMcHnsXDuMMhEFcgY,993
|
|
392
392
|
classiq/interface/model/bind_operation.py,sha256=J0E6u8KOSB-vRcdpsukYpk1oc8efRohyX-PwLKh98Dc,1869
|
|
393
|
-
classiq/interface/model/block.py,sha256=
|
|
393
|
+
classiq/interface/model/block.py,sha256=x-yff9PAxI4jmRGN-btCY0k-ke7sU5V2igS-szpkxlE,382
|
|
394
394
|
classiq/interface/model/bounds.py,sha256=gGIo1wW1ZliA-EJSgkpHW_0la4NUhzziDxdr3H6yHc8,723
|
|
395
395
|
classiq/interface/model/classical_if.py,sha256=CGxctbd44IaDuzYIMvAzGWte6pxEPKVc1UsbaQueeSk,2087
|
|
396
396
|
classiq/interface/model/classical_parameter_declaration.py,sha256=Xy545UrJPBL7o-2eL6vOQ1YfrKmQRDZj7eSdl7ap_lI,1363
|
|
397
397
|
classiq/interface/model/control.py,sha256=D2AxQG5Fb6uT-Bf1HYA20ESJ11Z0Nkkb6apHzD9_XOg,1534
|
|
398
|
-
classiq/interface/model/handle_binding.py,sha256=
|
|
398
|
+
classiq/interface/model/handle_binding.py,sha256=9SnlxSuUi2AmGMFbnpuC6vPKaoPYrpQL0iiaWTzCouw,12681
|
|
399
399
|
classiq/interface/model/inplace_binary_operation.py,sha256=NkQY99yXE8y7aqyAolFUXkSi7gcIuuyFMYdB8hA2KBw,1630
|
|
400
400
|
classiq/interface/model/invert.py,sha256=-NuT2Fb9sNIvS6x_14wqLSiqngRlCdmdmBqpAzZMp6M,458
|
|
401
401
|
classiq/interface/model/model.py,sha256=CDFnLG6Qv4gjzGQROzWm2Pf1_PW2gHqrZa2tWFjt3M8,7339
|
|
@@ -411,9 +411,9 @@ classiq/interface/model/quantum_expressions/arithmetic_operation.py,sha256=Itluj
|
|
|
411
411
|
classiq/interface/model/quantum_expressions/quantum_expression.py,sha256=hSWdSJmsEYaZZ62dWI8ueIl_-lqn7FBnwadsqozzZOI,2228
|
|
412
412
|
classiq/interface/model/quantum_function_call.py,sha256=dkMBc9o-ZkxfYLbdVG_ma_CYMXFwVD-7Aqgbloclu8E,8363
|
|
413
413
|
classiq/interface/model/quantum_function_declaration.py,sha256=2x4PXHE9FOTYsLpDgNdaPAmexiZ8nN_ZqkBTjMwog10,9079
|
|
414
|
-
classiq/interface/model/quantum_lambda_function.py,sha256=
|
|
415
|
-
classiq/interface/model/quantum_statement.py,sha256=
|
|
416
|
-
classiq/interface/model/quantum_type.py,sha256=
|
|
414
|
+
classiq/interface/model/quantum_lambda_function.py,sha256=4bAlG9czqRbrDSKusdy7EhTR2Mv3ZoLFeCdR8TdN-Fo,2527
|
|
415
|
+
classiq/interface/model/quantum_statement.py,sha256=u04etTX42gl7GdW4RqTdVfcOAUTiwaRHVYWh3_eVWVY,3830
|
|
416
|
+
classiq/interface/model/quantum_type.py,sha256=4re6wOnAZ63CVQADRvBNjok4o6xz0jCwuPhf8IyLkuk,17518
|
|
417
417
|
classiq/interface/model/repeat.py,sha256=1j8QBxO3swEx6-hByMeLTRSPB3Tf2aOLFUUbKqSJvCg,662
|
|
418
418
|
classiq/interface/model/statement_block.py,sha256=CWed4nDefWPK-G3vxayJ9dA13uXLfuKpPWyQkxB41G0,2260
|
|
419
419
|
classiq/interface/model/validation_handle.py,sha256=dbaY2ck5g36RkY1peYVxFXK_CFyA7L0k5flADpu9s68,1577
|
|
@@ -483,7 +483,7 @@ classiq/model_expansions/visitors/boolean_expression_transformers.py,sha256=n48t
|
|
|
483
483
|
classiq/model_expansions/visitors/symbolic_param_inference.py,sha256=9QR6aNyJU71LFgbaaffsoK0hfjeB9nUwQuwBr7XzAMw,8062
|
|
484
484
|
classiq/model_expansions/visitors/variable_references.py,sha256=0Aj1gXNV4OYZ0x41a7eoNGW2axnABMoEgWBUPxlw4kE,6631
|
|
485
485
|
classiq/open_library/__init__.py,sha256=bmg_qqXCXo85hcU7_QCce-qYGrpAVSFNwTKCClsclrg,114
|
|
486
|
-
classiq/open_library/functions/__init__.py,sha256=
|
|
486
|
+
classiq/open_library/functions/__init__.py,sha256=R0WiSt0NMqqTV8NCSjF0fiFDfApUIaHUr99sHuN-geo,3626
|
|
487
487
|
classiq/open_library/functions/amplitude_amplification.py,sha256=WH2dqYbmmWHZX7beu7-EipnC6Gzn4En4D2gmB2sXvZI,3997
|
|
488
488
|
classiq/open_library/functions/amplitude_estimation.py,sha256=iCkca5SQN_HQoJWk1_tLT56fHT72hu5QIt2pxSZQRko,1766
|
|
489
489
|
classiq/open_library/functions/discrete_sine_cosine_transform.py,sha256=mWlRIl_xHIvVclNxnIbGirPwbqTj6gE1ScjQEqnwb-M,4508
|
|
@@ -497,7 +497,7 @@ classiq/open_library/functions/qaoa_penalty.py,sha256=bnsBlnLwmjAPB4CZ9m1SVPP-eG
|
|
|
497
497
|
classiq/open_library/functions/qft_functions.py,sha256=7pdPBq48QvyQkxHrF3rEKTf0J50qUu_2bN17lfSc7I0,1382
|
|
498
498
|
classiq/open_library/functions/qpe.py,sha256=e7MBpOthBn73BdqhWpNGT0lkd6Jw3ZG7tE6n--IM0jc,2140
|
|
499
499
|
classiq/open_library/functions/qsvt.py,sha256=wpLq0P-pmhdTaRQJJWRHwbTZqRnE1M58MfQ2y1C0YUI,14271
|
|
500
|
-
classiq/open_library/functions/state_preparation.py,sha256=
|
|
500
|
+
classiq/open_library/functions/state_preparation.py,sha256=15YNJHx_wKBdJm4QnZYwChjRaYTl2ez0nWk2_z0Daqg,22806
|
|
501
501
|
classiq/open_library/functions/swap_test.py,sha256=hAjiJjZGeJP2qzEkVYmBVlEK44VcNibWZ-KqJwPEcFY,1048
|
|
502
502
|
classiq/open_library/functions/utility_functions.py,sha256=-0r7dUdh1KJa93QORRlmPFM8ZDObyreB5Q5Jx4d9RBM,2539
|
|
503
503
|
classiq/open_library/functions/variational.py,sha256=KYoqPKYRjgUXk_10RvogV0YiCG5kl7GZBHBJeeX82II,1715
|
|
@@ -539,7 +539,7 @@ classiq/qmod/python_classical_type.py,sha256=y4ow8MhaYzktzB4z461fsBrn9CfrRNASgPl
|
|
|
539
539
|
classiq/qmod/qfunc.py,sha256=DtrSlVurHzjyyD-_tC99t_EResF5GIG9kan0uVDyqH4,2593
|
|
540
540
|
classiq/qmod/qmod_constant.py,sha256=MuIAN9os3QAi7gnml-juQlIDU-Wk9phd_YwUSJlIIp0,5157
|
|
541
541
|
classiq/qmod/qmod_parameter.py,sha256=dcyZidDa4hvk_kAeogAFY9-njq2qp6gxr6qv--ANHuo,6488
|
|
542
|
-
classiq/qmod/qmod_variable.py,sha256=
|
|
542
|
+
classiq/qmod/qmod_variable.py,sha256=56IJMZ6U_4KOnLv2MIAMlv_tDq2dBUMeMG0rrxyE-bQ,32578
|
|
543
543
|
classiq/qmod/quantum_callable.py,sha256=RifbkZEmZ4COOHfluPD2jfd-qYSda2ytW173diR3tI4,2501
|
|
544
544
|
classiq/qmod/quantum_expandable.py,sha256=5zjZIO3FxjahjgBRedgwLrOs2vROGWV1SUaJB90x_Do,18874
|
|
545
545
|
classiq/qmod/quantum_function.py,sha256=wFMti9chpV2wdA9Xrc92zqKsKSmkhfZO4LTwaBWorbU,15383
|
|
@@ -568,6 +568,6 @@ classiq/qmod/write_qmod.py,sha256=rG0EFDpq13wjIuBVLocPQWyZMx8aM64eOn2k3D7Jq0g,35
|
|
|
568
568
|
classiq/quantum_program.py,sha256=q4vTnRqNr4VWjrZPJVreX3L_C3s60Nnb1GOp3Wv3SJ0,2088
|
|
569
569
|
classiq/synthesis.py,sha256=S3sBOI-msefLV97bij9j4qyLSVVW77GJnLvRfpSUTdo,8699
|
|
570
570
|
classiq/visualization.py,sha256=q-GepvUJf2-tDqof0isaNwWAlf3W3_1dxvlsak1U0ng,983
|
|
571
|
-
classiq-0.
|
|
572
|
-
classiq-0.
|
|
573
|
-
classiq-0.
|
|
571
|
+
classiq-0.89.0.dist-info/METADATA,sha256=HsEX8pkm5crKcVqWB2nGCwyzmqqFpHhDii0vgC0RViI,3505
|
|
572
|
+
classiq-0.89.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
573
|
+
classiq-0.89.0.dist-info/RECORD,,
|
|
File without changes
|