classiq 0.43.2__py3-none-any.whl → 0.44.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.
Files changed (112) hide show
  1. classiq/__init__.py +7 -1
  2. classiq/_internals/client.py +4 -7
  3. classiq/_internals/host_checker.py +34 -12
  4. classiq/_internals/jobs.py +2 -2
  5. classiq/applications/chemistry/chemistry_model_constructor.py +12 -6
  6. classiq/applications/combinatorial_helpers/allowed_constraints.py +4 -1
  7. classiq/applications/combinatorial_optimization/combinatorial_optimization_model_constructor.py +1 -1
  8. classiq/applications/finance/finance_model_constructor.py +3 -2
  9. classiq/applications/grover/grover_model_constructor.py +7 -5
  10. classiq/applications/hamiltonian/__init__.py +0 -0
  11. classiq/applications/hamiltonian/pauli_decomposition.py +113 -0
  12. classiq/applications/qnn/qlayer.py +1 -1
  13. classiq/exceptions.py +4 -0
  14. classiq/interface/_version.py +1 -1
  15. classiq/interface/ast_node.py +1 -18
  16. classiq/interface/backend/backend_preferences.py +15 -16
  17. classiq/interface/backend/ionq/ionq_quantum_program.py +1 -1
  18. classiq/interface/backend/pydantic_backend.py +0 -5
  19. classiq/interface/backend/quantum_backend_providers.py +3 -2
  20. classiq/interface/chemistry/operator.py +5 -1
  21. classiq/interface/debug_info/__init__.py +0 -0
  22. classiq/interface/debug_info/debug_info.py +32 -0
  23. classiq/interface/executor/execution_preferences.py +1 -45
  24. classiq/interface/executor/result.py +25 -12
  25. classiq/interface/generator/application_apis/arithmetic_declarations.py +8 -5
  26. classiq/interface/generator/application_apis/chemistry_declarations.py +78 -60
  27. classiq/interface/generator/application_apis/combinatorial_optimization_declarations.py +19 -10
  28. classiq/interface/generator/application_apis/entangler_declarations.py +11 -6
  29. classiq/interface/generator/application_apis/finance_declarations.py +36 -22
  30. classiq/interface/generator/application_apis/qsvm_declarations.py +21 -15
  31. classiq/interface/generator/arith/arithmetic_expression_abc.py +21 -1
  32. classiq/interface/generator/arith/binary_ops.py +5 -4
  33. classiq/interface/generator/arith/extremum_operations.py +43 -19
  34. classiq/interface/generator/constant.py +1 -1
  35. classiq/interface/generator/expressions/atomic_expression_functions.py +1 -0
  36. classiq/interface/generator/expressions/expression_constants.py +3 -1
  37. classiq/interface/generator/expressions/qmod_qarray_proxy.py +52 -66
  38. classiq/interface/generator/expressions/qmod_qstruct_proxy.py +35 -0
  39. classiq/interface/generator/expressions/sympy_supported_expressions.py +2 -1
  40. classiq/interface/generator/functions/builtins/core_library/__init__.py +4 -2
  41. classiq/interface/generator/functions/builtins/core_library/atomic_quantum_functions.py +41 -41
  42. classiq/interface/generator/functions/builtins/core_library/exponentiation_functions.py +52 -42
  43. classiq/interface/generator/functions/builtins/open_lib_functions.py +1095 -3347
  44. classiq/interface/generator/functions/builtins/quantum_operators.py +9 -22
  45. classiq/interface/generator/functions/classical_function_declaration.py +14 -6
  46. classiq/interface/generator/functions/classical_type.py +7 -76
  47. classiq/interface/generator/functions/concrete_types.py +55 -0
  48. classiq/interface/generator/functions/function_declaration.py +10 -10
  49. classiq/interface/generator/functions/type_name.py +104 -0
  50. classiq/interface/generator/generated_circuit_data.py +3 -3
  51. classiq/interface/generator/model/model.py +11 -0
  52. classiq/interface/generator/model/preferences/preferences.py +5 -0
  53. classiq/interface/generator/quantum_function_call.py +3 -0
  54. classiq/interface/generator/quantum_program.py +2 -2
  55. classiq/interface/generator/register_role.py +7 -1
  56. classiq/interface/generator/synthesis_metadata/synthesis_execution_data.py +1 -3
  57. classiq/interface/generator/types/builtin_struct_declarations/pauli_struct_declarations.py +1 -2
  58. classiq/interface/generator/types/qstruct_declaration.py +17 -0
  59. classiq/interface/generator/types/struct_declaration.py +1 -1
  60. classiq/interface/helpers/validation_helpers.py +1 -17
  61. classiq/interface/ide/visual_model.py +9 -2
  62. classiq/interface/interface_version.py +1 -0
  63. classiq/interface/model/bind_operation.py +25 -5
  64. classiq/interface/model/classical_parameter_declaration.py +8 -5
  65. classiq/interface/model/control.py +5 -5
  66. classiq/interface/model/handle_binding.py +185 -12
  67. classiq/interface/model/inplace_binary_operation.py +16 -4
  68. classiq/interface/model/model.py +28 -5
  69. classiq/interface/model/native_function_definition.py +8 -4
  70. classiq/interface/model/parameter.py +14 -0
  71. classiq/interface/model/port_declaration.py +20 -2
  72. classiq/interface/model/quantum_expressions/amplitude_loading_operation.py +21 -6
  73. classiq/interface/model/quantum_expressions/arithmetic_operation.py +30 -6
  74. classiq/interface/model/quantum_expressions/quantum_expression.py +4 -9
  75. classiq/interface/model/quantum_function_call.py +135 -192
  76. classiq/interface/model/quantum_function_declaration.py +147 -165
  77. classiq/interface/model/quantum_lambda_function.py +24 -6
  78. classiq/interface/model/quantum_statement.py +34 -8
  79. classiq/interface/model/quantum_type.py +61 -10
  80. classiq/interface/model/quantum_variable_declaration.py +1 -1
  81. classiq/interface/model/statement_block.py +2 -0
  82. classiq/interface/model/validation_handle.py +7 -0
  83. classiq/interface/server/global_versions.py +4 -4
  84. classiq/interface/server/routes.py +2 -0
  85. classiq/interface/source_reference.py +59 -0
  86. classiq/qmod/__init__.py +2 -3
  87. classiq/qmod/builtins/functions.py +39 -11
  88. classiq/qmod/builtins/operations.py +171 -40
  89. classiq/qmod/declaration_inferrer.py +99 -56
  90. classiq/qmod/expression_query.py +1 -1
  91. classiq/qmod/model_state_container.py +2 -0
  92. classiq/qmod/native/pretty_printer.py +71 -53
  93. classiq/qmod/pretty_print/pretty_printer.py +98 -52
  94. classiq/qmod/qfunc.py +11 -5
  95. classiq/qmod/qmod_parameter.py +1 -2
  96. classiq/qmod/qmod_variable.py +364 -172
  97. classiq/qmod/quantum_callable.py +3 -3
  98. classiq/qmod/quantum_expandable.py +119 -65
  99. classiq/qmod/quantum_function.py +15 -3
  100. classiq/qmod/semantics/annotation.py +12 -13
  101. classiq/qmod/semantics/error_manager.py +36 -10
  102. classiq/qmod/semantics/static_semantics_visitor.py +163 -75
  103. classiq/qmod/semantics/validation/func_call_validation.py +42 -96
  104. classiq/qmod/semantics/validation/handle_validation.py +85 -0
  105. classiq/qmod/semantics/validation/types_validation.py +108 -1
  106. classiq/qmod/type_attribute_remover.py +32 -0
  107. classiq/qmod/utilities.py +26 -5
  108. {classiq-0.43.2.dist-info → classiq-0.44.0.dist-info}/METADATA +3 -3
  109. {classiq-0.43.2.dist-info → classiq-0.44.0.dist-info}/RECORD +111 -99
  110. classiq/qmod/qmod_struct.py +0 -13
  111. /classiq/{interface/ide/show.py → show.py} +0 -0
  112. {classiq-0.43.2.dist-info → classiq-0.44.0.dist-info}/WHEEL +0 -0
@@ -617,7 +617,7 @@ class Power(BinaryOpParams[RegisterArithmeticInfo, pydantic.PositiveInt]):
617
617
  *,
618
618
  arg: RegisterArithmeticInfo,
619
619
  action_right_arg: RegisterOrConst,
620
- compute_power: int
620
+ compute_power: int,
621
621
  ) -> pydantic.NonNegativeInt:
622
622
  inner_compute_power_params = Power(
623
623
  left_arg=arg,
@@ -800,6 +800,7 @@ class Modulo(EffectiveUnaryOpParams[int]):
800
800
  return 2 ** (repr_qubits)
801
801
 
802
802
  def _get_result_register(self) -> RegisterArithmeticInfo:
803
- return RegisterArithmeticInfo(
804
- size=round(math.log2(self.right_arg)), is_signed=False, fraction_places=0
805
- )
803
+ size = round(math.log2(self.right_arg))
804
+ if size <= 0:
805
+ raise ClassiqValueError("Cannot use a quantum expression with zero size")
806
+ return RegisterArithmeticInfo(size=size, is_signed=False, fraction_places=0)
@@ -57,38 +57,56 @@ class Extremum(ArithmeticOperationParams):
57
57
  def _bound_calculator(cls, arg1: float, arg2: float) -> float:
58
58
  pass
59
59
 
60
+ @staticmethod
61
+ def _less_qubits_arg(
62
+ arg1: RegisterOrConst, arg2: RegisterOrConst
63
+ ) -> RegisterOrConst:
64
+ if not isinstance(arg1, RegisterArithmeticInfo):
65
+ return arg1
66
+ if not isinstance(arg2, RegisterArithmeticInfo):
67
+ return arg2
68
+ return arg1 if arg1.size <= arg2.size else arg2
69
+
60
70
  @classmethod
61
71
  @abc.abstractmethod
62
- def _preferred_arg(
72
+ def preferred_arg(
63
73
  cls, arg1: RegisterOrConst, arg2: RegisterOrConst
64
74
  ) -> RegisterOrConst:
65
75
  pass
66
76
 
67
77
  def _get_result_register(self) -> RegisterArithmeticInfo:
68
- if argument_utils.arg_bounds_overlap((self.left_arg, self.right_arg)):
69
- return self._get_general_case_result_register()
78
+ eff_left_arg = argument_utils.limit_fraction_places(
79
+ self.left_arg, self.machine_precision
80
+ )
81
+ eff_right_arg = argument_utils.limit_fraction_places(
82
+ self.right_arg, self.machine_precision
83
+ )
84
+ if argument_utils.arg_bounds_overlap((eff_left_arg, eff_right_arg)):
85
+ return self._get_general_case_result_register(eff_left_arg, eff_right_arg)
70
86
  return argument_utils.as_arithmetic_info(
71
- self._preferred_arg(self.left_arg, self.right_arg)
87
+ self.preferred_arg(eff_left_arg, eff_right_arg)
72
88
  )
73
89
 
74
- def _get_general_case_result_register(self) -> RegisterArithmeticInfo:
90
+ def _get_general_case_result_register(
91
+ self, eff_left_arg: RegisterOrConst, eff_right_arg: RegisterOrConst
92
+ ) -> RegisterArithmeticInfo:
75
93
  integer_part_size = max(
76
- argument_utils.integer_part_size(self.left_arg),
77
- argument_utils.integer_part_size(self.right_arg),
94
+ argument_utils.integer_part_size(eff_left_arg),
95
+ argument_utils.integer_part_size(eff_right_arg),
78
96
  )
79
97
  fraction_places = max(
80
- argument_utils.fraction_places(self.left_arg),
81
- argument_utils.fraction_places(self.right_arg),
98
+ argument_utils.fraction_places(eff_left_arg),
99
+ argument_utils.fraction_places(eff_right_arg),
82
100
  )
83
101
  required_size = integer_part_size + fraction_places
84
102
  bounds = (
85
103
  self._bound_calculator(
86
- argument_utils.lower_bound(self.left_arg),
87
- argument_utils.lower_bound(self.right_arg),
104
+ argument_utils.lower_bound(eff_left_arg),
105
+ argument_utils.lower_bound(eff_right_arg),
88
106
  ),
89
107
  self._bound_calculator(
90
- argument_utils.upper_bound(self.left_arg),
91
- argument_utils.upper_bound(self.right_arg),
108
+ argument_utils.upper_bound(eff_left_arg),
109
+ argument_utils.upper_bound(eff_right_arg),
92
110
  ),
93
111
  )
94
112
  return RegisterArithmeticInfo(
@@ -107,12 +125,15 @@ class Min(Extremum):
107
125
  return min(arg1, arg2)
108
126
 
109
127
  @classmethod
110
- def _preferred_arg(
128
+ def preferred_arg(
111
129
  cls, arg1: RegisterOrConst, arg2: RegisterOrConst
112
130
  ) -> RegisterOrConst:
113
- if min(argument_utils.bounds(arg1)) < min(argument_utils.bounds(arg2)):
131
+ min1, min2 = min(argument_utils.bounds(arg1)), min(argument_utils.bounds(arg2))
132
+ if min1 < min2:
114
133
  return arg1
115
- return arg2
134
+ if min2 < min1:
135
+ return arg2
136
+ return cls._less_qubits_arg(arg1, arg2)
116
137
 
117
138
 
118
139
  class Max(Extremum):
@@ -123,9 +144,12 @@ class Max(Extremum):
123
144
  return max(arg1, arg2)
124
145
 
125
146
  @classmethod
126
- def _preferred_arg(
147
+ def preferred_arg(
127
148
  cls, arg1: RegisterOrConst, arg2: RegisterOrConst
128
149
  ) -> RegisterOrConst:
129
- if max(argument_utils.bounds(arg1)) > max(argument_utils.bounds(arg2)):
150
+ max1, max2 = max(argument_utils.bounds(arg1)), max(argument_utils.bounds(arg2))
151
+ if max1 > max2:
130
152
  return arg1
131
- return arg2
153
+ if max2 > max1:
154
+ return arg2
155
+ return cls._less_qubits_arg(arg1, arg2)
@@ -1,6 +1,6 @@
1
1
  from classiq.interface.ast_node import ASTNode
2
2
  from classiq.interface.generator.expressions.expression import Expression
3
- from classiq.interface.generator.functions.classical_type import ConcreteClassicalType
3
+ from classiq.interface.generator.functions.concrete_types import ConcreteClassicalType
4
4
 
5
5
 
6
6
  class Constant(ASTNode):
@@ -24,6 +24,7 @@ SUPPORTED_CLASSIQ_SYMPY_WRAPPERS = {
24
24
  "BitwiseXor",
25
25
  "BitwiseNot",
26
26
  "BitwiseOr",
27
+ "LogicalXor",
27
28
  }
28
29
 
29
30
  SUPPORTED_ATOMIC_EXPRESSION_FUNCTIONS = {
@@ -1,5 +1,5 @@
1
1
  import keyword
2
- from typing import Set
2
+ from typing import Final, FrozenSet, Set
3
3
 
4
4
  from classiq.interface.generator.arith.arithmetic_expression_parser import (
5
5
  DEFAULT_SUPPORTED_FUNC_NAMES,
@@ -18,3 +18,5 @@ SUPPORTED_FUNC_NAMES: Set[str] = (
18
18
  )
19
19
  BOOLEAN_LITERALS = {"True", "False"}
20
20
  FORBIDDEN_LITERALS: Set[str] = set(keyword.kwlist) - SUPPORTED_FUNC_NAMES
21
+ CPARAM_EXECUTION_SUFFIX: Final[str] = "_param"
22
+ RESERVED_EXPRESSIONS: FrozenSet[str] = frozenset({"i"})
@@ -1,4 +1,6 @@
1
- from typing import Any, Callable, Mapping, Optional, Tuple, Union
1
+ from typing import TYPE_CHECKING, Any, Mapping, Union
2
+
3
+ from sympy import Integer
2
4
 
3
5
  from classiq.interface.generator.expressions.expression import Expression
4
6
  from classiq.interface.generator.expressions.non_symbolic_expr import NonSymbolicExpr
@@ -11,88 +13,81 @@ from classiq.interface.model.handle_binding import (
11
13
 
12
14
  from classiq.exceptions import ClassiqValueError
13
15
 
16
+ if TYPE_CHECKING:
17
+ from classiq.interface.model.quantum_type import QuantumType
18
+
19
+
14
20
  ILLEGAL_SLICING_STEP_MSG = "Slicing with a step of a quantum variable is not supported"
15
- SLICE_OUT_OF_BOUNDS_MSG = "Slice end index out of bounds"
16
- QARRAY_ELEMENT_NOT_SUBSCRIPTABLE = "Subscripting an element in QArray is illegal"
21
+ SLICE_OUT_OF_BOUNDS_MSG = "Slice indices out of bounds"
22
+ SUBSCRIPT_OUT_OF_BOUNDS_MSG = "Subscript index out of bounds"
23
+ ILLEGAL_SLICE_MSG = "Quantum array slice must be of the form [<int-value>:<int-value>]."
24
+ ILLEGAL_SLICE_BOUNDS_MSG = (
25
+ "The quantum array slice start value ({}) must be lower than its stop value ({})."
26
+ )
17
27
 
18
28
 
19
29
  class QmodQArrayProxy(NonSymbolicExpr, QmodSizedProxy):
20
30
  def __init__(
21
31
  self,
22
32
  handle: HandleBinding,
23
- element_proxy: Callable[[HandleBinding], QmodSizedProxy],
33
+ element_type: "QuantumType",
24
34
  element_size: int,
25
35
  length: int,
26
36
  ) -> None:
27
37
  super().__init__(handle, element_size * length)
28
38
  self._length = length
29
- self._element_proxy = element_proxy
39
+ self._element_type = element_type
30
40
  self._element_size = element_size
31
41
 
32
- def __getitem__(self, key: Union[slice, int]) -> "QmodSizedProxy":
33
- if self._index is not None:
34
- raise TypeError(QARRAY_ELEMENT_NOT_SUBSCRIPTABLE)
42
+ def __getitem__(self, key: Union[slice, int, Integer]) -> "QmodSizedProxy":
43
+ return (
44
+ self._get_slice(key) if isinstance(key, slice) else self._get_subscript(key)
45
+ )
35
46
 
36
- new_index: Optional[int] = None
47
+ def _get_subscript(self, index: Union[int, Integer]) -> "QmodSizedProxy":
48
+ if isinstance(index, Integer):
49
+ index = int(index)
50
+ if index < 0 or index >= self._length:
51
+ raise ClassiqValueError(SUBSCRIPT_OUT_OF_BOUNDS_MSG)
37
52
 
38
- if isinstance(key, slice):
39
- if key.step is not None:
40
- raise ClassiqValueError(ILLEGAL_SLICING_STEP_MSG)
41
- new_slice = self._get_new_slice(key.start, key.stop)
42
- else:
43
- new_slice = self._get_new_slice(key, key + 1)
44
- new_index = new_slice[0]
53
+ return self._element_type.get_proxy(
54
+ SubscriptHandleBinding(
55
+ base_handle=self.handle,
56
+ index=Expression(expr=str(index)),
57
+ )
58
+ )
45
59
 
46
- if (self._slice is not None and new_slice[1] > self._slice[1]) or new_slice[
47
- 1
48
- ] > self._size:
60
+ def _get_slice(self, slice_: slice) -> "QmodSizedProxy":
61
+ if slice_.step is not None:
62
+ raise ClassiqValueError(ILLEGAL_SLICING_STEP_MSG)
63
+ if isinstance(slice_.start, Integer):
64
+ slice_ = slice(int(slice_.start), slice_.stop)
65
+ if isinstance(slice_.stop, Integer):
66
+ slice_ = slice(slice_.start, int(slice_.stop))
67
+ if not isinstance(slice_.start, int) or not isinstance(slice_.stop, int):
68
+ raise ClassiqValueError(ILLEGAL_SLICE_MSG)
69
+ if slice_.start >= slice_.stop:
70
+ raise ClassiqValueError(
71
+ ILLEGAL_SLICE_BOUNDS_MSG.format(slice_.start, slice_.stop)
72
+ )
73
+ if slice_.start < 0 or slice_.stop > self._length:
49
74
  raise ClassiqValueError(SLICE_OUT_OF_BOUNDS_MSG)
50
75
 
51
- new_handle = self._get_new_handle(new_index, new_slice)
52
- if new_index is not None:
53
- return self._element_proxy(new_handle)
54
76
  return QmodQArrayProxy(
55
- new_handle,
56
- self._element_proxy,
77
+ SlicedHandleBinding(
78
+ base_handle=self.handle,
79
+ start=Expression(expr=str(slice_.start)),
80
+ end=Expression(expr=str(slice_.stop)),
81
+ ),
82
+ self._element_type,
57
83
  self._element_size,
58
- self._length,
84
+ slice_.stop - slice_.start,
59
85
  )
60
86
 
61
- def _get_new_slice(self, start: int, end: int) -> Tuple[int, int]:
62
- if self._slice is not None:
63
- return self._slice[0] + start, self._slice[0] + end
64
- return start, end
65
-
66
87
  @property
67
88
  def type_name(self) -> str:
68
89
  return "Quantum array"
69
90
 
70
- @property
71
- def _index(self) -> Optional[int]:
72
- if not isinstance(self._handle, SubscriptHandleBinding):
73
- return None
74
- return self._handle.index.to_int_value()
75
-
76
- @property
77
- def _slice(self) -> Optional[Tuple[int, int]]:
78
- if not isinstance(self._handle, SlicedHandleBinding):
79
- return None
80
- return self._handle.start.to_int_value(), self._handle.end.to_int_value()
81
-
82
- def _get_new_handle(
83
- self, new_index: Optional[int], new_slice: Tuple[int, int]
84
- ) -> HandleBinding:
85
- if new_index is not None:
86
- return SubscriptHandleBinding(
87
- name=self.handle.name,
88
- index=Expression(expr=str(new_index)),
89
- )
90
- return SlicedHandleBinding(
91
- name=self.handle.name,
92
- start=Expression(expr=str(new_slice[0])),
93
- end=Expression(expr=str(new_slice[1])),
94
- )
95
-
96
91
  @property
97
92
  def len(self) -> int:
98
93
  return self._length
@@ -105,13 +100,4 @@ class QmodQArrayProxy(NonSymbolicExpr, QmodSizedProxy):
105
100
 
106
101
  @property
107
102
  def size(self) -> int:
108
- if (slice_ := self._slice) is not None:
109
- length = slice_[1] - slice_[0]
110
- elif self._index is not None:
111
- length = 1
112
- else:
113
- length = self._length
114
- return length * self._element_size
115
-
116
- def __str__(self) -> str:
117
- return str(self.handle)
103
+ return self.len * self._element_size
@@ -0,0 +1,35 @@
1
+ from typing import TYPE_CHECKING, Mapping
2
+
3
+ from classiq.interface.generator.expressions.non_symbolic_expr import NonSymbolicExpr
4
+ from classiq.interface.generator.expressions.qmod_sized_proxy import QmodSizedProxy
5
+ from classiq.interface.model.handle_binding import (
6
+ FieldHandleBinding,
7
+ HandleBinding,
8
+ )
9
+
10
+ if TYPE_CHECKING:
11
+ from classiq.interface.model.quantum_type import QuantumType
12
+
13
+
14
+ class QmodQStructProxy(NonSymbolicExpr, QmodSizedProxy):
15
+ def __init__(
16
+ self,
17
+ handle: HandleBinding,
18
+ struct_name: str,
19
+ fields: Mapping[str, "QuantumType"],
20
+ ) -> None:
21
+ self._fields = {
22
+ name: type_.get_proxy(FieldHandleBinding(base_handle=handle, field=name))
23
+ for name, type_ in fields.items()
24
+ }
25
+ size = sum(proxy.size for proxy in self._fields.values())
26
+ super().__init__(handle, size)
27
+ self._struct_name = struct_name
28
+
29
+ @property
30
+ def type_name(self) -> str:
31
+ return self._struct_name
32
+
33
+ @property
34
+ def fields(self) -> Mapping[str, QmodSizedProxy]:
35
+ return self._fields
@@ -66,7 +66,8 @@ NUMERIC_CONSTANTS: List[str] = [
66
66
  "EulerGamma",
67
67
  "Catalan",
68
68
  ]
69
- CONSTANTS: List[str] = NUMERIC_CONSTANTS + ["true", "false"]
69
+ BOOLEAN_CONSTANTS: List[str] = ["true", "false"]
70
+ CONSTANTS: List[str] = NUMERIC_CONSTANTS + BOOLEAN_CONSTANTS
70
71
 
71
72
  DATA_TYPES: List[str] = ["Matrix"]
72
73
  LOGIC_OPERATORS: List[str] = [
@@ -3,12 +3,14 @@ from classiq.interface.generator.application_apis.combinatorial_optimization_dec
3
3
  from classiq.interface.generator.application_apis.finance_declarations import * # noqa: F403
4
4
  from classiq.interface.generator.application_apis.qsvm_declarations import * # noqa: F403
5
5
  from classiq.interface.model.quantum_function_declaration import (
6
- QuantumFunctionDeclaration,
6
+ NamedParamsQuantumFunctionDeclaration,
7
7
  )
8
8
 
9
9
  from .atomic_quantum_functions import * # noqa: F403
10
10
  from .exponentiation_functions import * # noqa: F403
11
11
 
12
12
  CORE_LIB_DECLS = [
13
- func for func in vars().values() if isinstance(func, QuantumFunctionDeclaration)
13
+ func
14
+ for func in vars().values()
15
+ if isinstance(func, NamedParamsQuantumFunctionDeclaration)
14
16
  ]