classiq 0.33.0__py3-none-any.whl → 0.35.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.
- classiq/_internals/api_wrapper.py +61 -23
- classiq/_internals/client.py +4 -1
- classiq/_internals/jobs.py +9 -2
- classiq/applications_model_constructors/grover_model_constructor.py +1 -1
- classiq/execution/__init__.py +9 -2
- classiq/execution/jobs.py +84 -11
- classiq/executor.py +3 -10
- classiq/interface/_version.py +1 -1
- classiq/interface/backend/backend_preferences.py +17 -0
- classiq/interface/backend/pydantic_backend.py +8 -0
- classiq/interface/backend/quantum_backend_providers.py +15 -1
- classiq/interface/chemistry/ground_state_problem.py +1 -1
- classiq/interface/chemistry/operator.py +198 -0
- classiq/interface/execution/jobs.py +28 -0
- classiq/interface/executor/execution_request.py +2 -12
- classiq/interface/generator/arith/arithmetic_expression_validator.py +1 -0
- classiq/interface/generator/arith/arithmetic_param_getters.py +12 -0
- classiq/interface/generator/arith/binary_ops.py +34 -0
- classiq/interface/generator/expressions/expression.py +3 -0
- classiq/interface/generator/expressions/qmod_sized_proxy.py +12 -2
- classiq/interface/generator/function_param_list_without_self_reference.py +2 -0
- classiq/interface/generator/function_params.py +4 -0
- classiq/interface/generator/functions/core_lib_declarations/quantum_functions/atomic_quantum_functions.py +2 -2
- classiq/interface/generator/functions/core_lib_declarations/quantum_functions/std_lib_functions.py +42 -105
- classiq/interface/generator/generated_circuit.py +8 -44
- classiq/interface/generator/generated_circuit_data.py +2 -11
- classiq/interface/generator/model/preferences/preferences.py +4 -2
- classiq/interface/generator/quantum_function_call.py +1 -1
- classiq/interface/hardware.py +2 -0
- classiq/interface/ide/show.py +1 -14
- classiq/interface/model/bind_operation.py +10 -0
- classiq/interface/model/handle_binding.py +18 -0
- classiq/interface/model/model.py +12 -3
- classiq/interface/model/quantum_expressions/amplitude_loading_operation.py +2 -1
- classiq/interface/model/quantum_expressions/arithmetic_operation.py +3 -1
- classiq/interface/model/quantum_expressions/quantum_expression.py +9 -6
- classiq/interface/model/quantum_function_call.py +9 -339
- classiq/interface/model/quantum_statement.py +3 -2
- classiq/interface/server/routes.py +8 -6
- classiq/model/function_handler.pyi +86 -85
- classiq/qmod/__init__.py +2 -2
- classiq/qmod/builtins/__init__.py +8 -0
- classiq/{interface/model/clients/qmod/qmod_builtins.py → qmod/builtins/functions.py} +46 -165
- classiq/qmod/builtins/operations.py +19 -0
- classiq/qmod/builtins/structs.py +128 -0
- classiq/qmod/declaration_inferrer.py +34 -17
- classiq/qmod/model_state_container.py +6 -3
- classiq/qmod/qmod_parameter.py +24 -8
- classiq/qmod/qmod_variable.py +4 -4
- classiq/qmod/quantum_callable.py +2 -2
- classiq/qmod/quantum_expandable.py +7 -3
- classiq/qmod/quantum_function.py +9 -9
- {classiq-0.33.0.dist-info → classiq-0.35.0.dist-info}/METADATA +1 -1
- {classiq-0.33.0.dist-info → classiq-0.35.0.dist-info}/RECORD +56 -55
- classiq/interface/model/clients/qmod/__init__.py +0 -0
- classiq/interface/model/semantics.py +0 -15
- classiq/qmod/qmod_builtins.py +0 -4
- /classiq/interface/{model/clients → execution}/__init__.py +0 -0
- {classiq-0.33.0.dist-info → classiq-0.35.0.dist-info}/WHEEL +0 -0
@@ -40,114 +40,115 @@ class FunctionHandler(abc.ABC, metaclass=abc.ABCMeta):
|
|
40
40
|
def output_wires(self) -> WireNameDict: ...
|
41
41
|
def create_inputs(self, inputs: Mapping[IOName, QRegGenericAlias]) -> Dict[IOName, QReg]: ...
|
42
42
|
def set_outputs(self, outputs: Mapping[IOName, QReg]) -> None: ...
|
43
|
-
def apply(self, function_name: Union[str, SynthesisQuantumFunctionDeclaration, QuantumFunction], in_wires: Optional[SupportedInputArgs] =
|
43
|
+
def apply(self, function_name: Union[str, SynthesisQuantumFunctionDeclaration, QuantumFunction], in_wires: Optional[SupportedInputArgs] = None, out_wires: Optional[SupportedInputArgs] = None, is_inverse: bool = False, strict_zero_ios: bool = True, release_by_inverse: bool = False, control_states: Optional[Union[ControlState, Iterable[ControlState]]] = None, should_control: bool = True, power: int = 1, call_name: Optional[str] = None, parameters_dict: Optional[Dict[str, ParameterFloatType]] = None) -> Dict[IOName, QReg]: ...
|
44
44
|
def release_qregs(self, qregs: Union[QReg, Collection[QReg]]) -> None: ...
|
45
45
|
def __getattr__(self, item: str) -> Callable[..., Any]: ...
|
46
46
|
def __dir__(self) -> List[str]: ...
|
47
47
|
def include_library(self, library: FunctionLibrary) -> None: ...
|
48
48
|
@abc.abstractmethod
|
49
49
|
def create_library(self) -> None: ...
|
50
|
-
def
|
51
|
-
def
|
52
|
-
def
|
53
|
-
def
|
50
|
+
def BellStatePreparation(self, params: BellStatePreparation, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
51
|
+
def CyclicShift(self, params: CyclicShift, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
52
|
+
def CommutingPauliExponentiation(self, params: CommutingPauliExponentiation, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
53
|
+
def UnitaryGate(self, params: UnitaryGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
54
|
+
def RYGate(self, params: RYGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
55
|
+
def RZZGate(self, params: RZZGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
56
|
+
def CHGate(self, params: CHGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
57
|
+
def CSXGate(self, params: CSXGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
58
|
+
def LogicalAnd(self, params: LogicalAnd, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
59
|
+
def Exponentiation(self, params: Exponentiation, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
60
|
+
def BitwiseXor(self, params: BitwiseXor, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
61
|
+
def LinearPauliRotations(self, params: LinearPauliRotations, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
62
|
+
def RYYGate(self, params: RYYGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
54
63
|
def GroverOperator(self, params: GroverOperator, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
64
|
+
def FinanceModels(self, params: FinanceModels, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
55
65
|
def AmplitudeEstimation(self, params: AmplitudeEstimation, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
56
|
-
def
|
57
|
-
def
|
58
|
-
def
|
59
|
-
def
|
60
|
-
def
|
61
|
-
def
|
62
|
-
def GridEntangler(self, params: GridEntangler, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
63
|
-
def BitwiseInvert(self, params: BitwiseInvert, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
64
|
-
def Equal(self, params: Equal, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
65
|
-
def CustomFunction(self, params: CustomFunction, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
66
|
-
def Negation(self, params: Negation, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
67
|
-
def NotEqual(self, params: NotEqual, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
66
|
+
def HadamardTransform(self, params: HadamardTransform, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
67
|
+
def RXGate(self, params: RXGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
68
|
+
def Subtractor(self, params: Subtractor, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
69
|
+
def QSVMFeatureMap(self, params: QSVMFeatureMap, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
70
|
+
def HypercubeEntangler(self, params: HypercubeEntangler, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
71
|
+
def QFT(self, params: QFT, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
68
72
|
def CRYGate(self, params: CRYGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
73
|
+
def AmplitudeLoading(self, params: AmplitudeLoading, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
69
74
|
def CCXGate(self, params: CCXGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
70
|
-
def RandomizedBenchmarking(self, params: RandomizedBenchmarking, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
71
|
-
def RZZGate(self, params: RZZGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
72
75
|
def CRXGate(self, params: CRXGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
76
|
+
def YGate(self, params: YGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
77
|
+
def GHZStatePreparation(self, params: GHZStatePreparation, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
73
78
|
def ZGate(self, params: ZGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
74
|
-
def PhaseGate(self, params: PhaseGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
75
79
|
def HGate(self, params: HGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
76
|
-
def
|
77
|
-
def SGate(self, params: SGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
78
|
-
def SdgGate(self, params: SdgGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
80
|
+
def iSwapGate(self, params: iSwapGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
79
81
|
def C4XGate(self, params: C4XGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
82
|
+
def UGate(self, params: UGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
83
|
+
def Arithmetic(self, params: Arithmetic, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
84
|
+
def TwoDimensionalEntangler(self, params: TwoDimensionalEntangler, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
85
|
+
def ComputationalBasisStatePreparation(self, params: ComputationalBasisStatePreparation, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
86
|
+
def LShift(self, params: LShift, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
87
|
+
def StatePreparation(self, params: StatePreparation, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
88
|
+
def BitwiseOr(self, params: BitwiseOr, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
89
|
+
def SwapGate(self, params: SwapGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
90
|
+
def RandomizedBenchmarking(self, params: RandomizedBenchmarking, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
80
91
|
def FinancePayoff(self, params: FinancePayoff, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
81
|
-
def
|
82
|
-
def Mcx(self, params: Mcx, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
83
|
-
def SuzukiTrotter(self, params: SuzukiTrotter, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
84
|
-
def GreaterEqual(self, params: GreaterEqual, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
85
|
-
def LessThan(self, params: LessThan, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
86
|
-
def LessEqual(self, params: LessEqual, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
87
|
-
def Modulo(self, params: Modulo, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
88
|
-
def ExponentialStatePreparation(self, params: ExponentialStatePreparation, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
89
|
-
def RGate(self, params: RGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
92
|
+
def ArithmeticOracle(self, params: ArithmeticOracle, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
90
93
|
def RXXGate(self, params: RXXGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
91
|
-
def
|
94
|
+
def IGate(self, params: IGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
95
|
+
def SGate(self, params: SGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
96
|
+
def SdgGate(self, params: SdgGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
92
97
|
def CPhaseGate(self, params: CPhaseGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
93
|
-
def GreaterThan(self, params: GreaterThan, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
94
|
-
def AmplitudeLoading(self, params: AmplitudeLoading, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
95
|
-
def Arithmetic(self, params: Arithmetic, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
96
|
-
def CRZGate(self, params: CRZGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
97
|
-
def PiecewiseLinearRotationAmplitudeLoading(self, params: PiecewiseLinearRotationAmplitudeLoading, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
98
|
-
def Subtractor(self, params: Subtractor, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
99
|
-
def UCC(self, params: UCC, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
100
|
-
def LinearGCI(self, params: LinearGCI, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
101
98
|
def SXGate(self, params: SXGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
102
|
-
def TwoDimensionalEntangler(self, params: TwoDimensionalEntangler, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
103
99
|
def SXdgGate(self, params: SXdgGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
104
|
-
def
|
105
|
-
def
|
100
|
+
def GridEntangler(self, params: GridEntangler, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
101
|
+
def NotEqual(self, params: NotEqual, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
102
|
+
def CRZGate(self, params: CRZGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
103
|
+
def TGate(self, params: TGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
104
|
+
def CustomFunction(self, params: CustomFunction, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
105
|
+
def TdgGate(self, params: TdgGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
106
|
+
def HVA(self, params: HVA, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
107
|
+
def PhaseGate(self, params: PhaseGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
108
|
+
def WeightedAdder(self, params: WeightedAdder, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
109
|
+
def Modulo(self, params: Modulo, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
110
|
+
def Mcu(self, params: Mcu, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
111
|
+
def BitwiseInvert(self, params: BitwiseInvert, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
106
112
|
def MCPhaseGate(self, params: MCPhaseGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
107
|
-
def
|
108
|
-
def
|
109
|
-
def
|
113
|
+
def Adder(self, params: Adder, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
114
|
+
def Negation(self, params: Negation, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
115
|
+
def UniformDistributionStatePreparation(self, params: UniformDistributionStatePreparation, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
116
|
+
def InequalityMixer(self, params: InequalityMixer, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
117
|
+
def HardwareEfficientAnsatz(self, params: HardwareEfficientAnsatz, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
118
|
+
def Multiplier(self, params: Multiplier, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
119
|
+
def RGate(self, params: RGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
110
120
|
def PhaseEstimation(self, params: PhaseEstimation, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
121
|
+
def Equal(self, params: Equal, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
122
|
+
def CXGate(self, params: CXGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
123
|
+
def SuzukiTrotter(self, params: SuzukiTrotter, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
124
|
+
def Identity(self, params: Identity, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
125
|
+
def GroverDiffuser(self, params: GroverDiffuser, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
126
|
+
def UCC(self, params: UCC, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
127
|
+
def ExponentialStatePreparation(self, params: ExponentialStatePreparation, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
128
|
+
def GreaterThan(self, params: GreaterThan, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
129
|
+
def GreaterEqual(self, params: GreaterEqual, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
130
|
+
def LessThan(self, params: LessThan, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
131
|
+
def LessEqual(self, params: LessEqual, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
132
|
+
def BitwiseAnd(self, params: BitwiseAnd, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
133
|
+
def CustomOracle(self, params: CustomOracle, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
134
|
+
def LogicalOr(self, params: LogicalOr, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
135
|
+
def Mcx(self, params: Mcx, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
136
|
+
def Power(self, params: Power, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
137
|
+
def Sign(self, params: Sign, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
111
138
|
def Min(self, params: Min, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
139
|
+
def LinearGCI(self, params: LinearGCI, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
140
|
+
def CZGate(self, params: CZGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
141
|
+
def CYGate(self, params: CYGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
112
142
|
def WStatePreparation(self, params: WStatePreparation, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
143
|
+
def C3XGate(self, params: C3XGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
113
144
|
def Max(self, params: Max, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
114
|
-
def
|
115
|
-
def
|
116
|
-
def
|
117
|
-
def
|
118
|
-
def
|
119
|
-
def GHZStatePreparation(self, params: GHZStatePreparation, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
120
|
-
def SwapGate(self, params: SwapGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
145
|
+
def RZGate(self, params: RZGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
146
|
+
def PiecewiseLinearRotationAmplitudeLoading(self, params: PiecewiseLinearRotationAmplitudeLoading, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
147
|
+
def Finance(self, params: Finance, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
148
|
+
def QDrift(self, params: QDrift, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
149
|
+
def XGate(self, params: XGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
121
150
|
def PiecewiseLinearAmplitudeLoading(self, params: PiecewiseLinearAmplitudeLoading, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
122
|
-
def
|
123
|
-
def RangeMixer(self, params: RangeMixer, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
124
|
-
def RYGate(self, params: RYGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
125
|
-
def CYGate(self, params: CYGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
126
|
-
def CZGate(self, params: CZGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
127
|
-
def Adder(self, params: Adder, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
128
|
-
def C3XGate(self, params: C3XGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
151
|
+
def StatePropagator(self, params: StatePropagator, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
129
152
|
def RShift(self, params: RShift, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
130
|
-
def
|
131
|
-
def
|
132
|
-
def BellStatePreparation(self, params: BellStatePreparation, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
133
|
-
def GroverDiffuser(self, params: GroverDiffuser, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
134
|
-
def HardwareEfficientAnsatz(self, params: HardwareEfficientAnsatz, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
135
|
-
def InequalityMixer(self, params: InequalityMixer, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
136
|
-
def CyclicShift(self, params: CyclicShift, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
137
|
-
def Sign(self, params: Sign, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
138
|
-
def iSwapGate(self, params: iSwapGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
139
|
-
def TGate(self, params: TGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
140
|
-
def ArithmeticOracle(self, params: ArithmeticOracle, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
141
|
-
def UnitaryGate(self, params: UnitaryGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
142
|
-
def BitwiseOr(self, params: BitwiseOr, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
143
|
-
def Identity(self, params: Identity, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
144
|
-
def QDrift(self, params: QDrift, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
145
|
-
def LogicalAnd(self, params: LogicalAnd, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
146
|
-
def RXGate(self, params: RXGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
147
|
-
def Multiplier(self, params: Multiplier, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
148
|
-
def HadamardTransform(self, params: HadamardTransform, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
149
|
-
def LinearPauliRotations(self, params: LinearPauliRotations, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
150
|
-
def CommutingPauliExponentiation(self, params: CommutingPauliExponentiation, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
151
|
-
def QSVMFeatureMap(self, params: QSVMFeatureMap, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
152
|
-
def CHGate(self, params: CHGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
153
|
-
def CSXGate(self, params: CSXGate, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
153
|
+
def RangeMixer(self, params: RangeMixer, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
154
|
+
def HartreeFock(self, params: HartreeFock, in_wires: Optional[Dict[str, Wire]] = None) -> Dict[str, Wire]: ...
|
classiq/qmod/__init__.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
from .
|
2
|
-
from .
|
1
|
+
from .builtins import * # noqa: F403
|
2
|
+
from .builtins import __all__ as _builtins_all
|
3
3
|
from .qmod_parameter import Array, QParam
|
4
4
|
from .qmod_struct import QStruct
|
5
5
|
from .qmod_variable import Input, Output, QArray, QBit, QFixed, QInt
|
@@ -0,0 +1,8 @@
|
|
1
|
+
from .functions import * # noqa: F403
|
2
|
+
from .functions import __all__ as _builtin_functions
|
3
|
+
from .operations import * # noqa: F403
|
4
|
+
from .operations import __all__ as _builtin_operations
|
5
|
+
from .structs import * # noqa: F403
|
6
|
+
from .structs import __all__ as _builtin_structs
|
7
|
+
|
8
|
+
__all__ = _builtin_structs + _builtin_functions + _builtin_operations
|
@@ -1,115 +1,13 @@
|
|
1
|
+
# This file was generated automatically - do not edit manually
|
2
|
+
|
1
3
|
from typing import List, Literal
|
2
4
|
|
3
5
|
from classiq.qmod.qmod_parameter import QParam
|
4
|
-
from classiq.qmod.qmod_struct import QStruct
|
5
6
|
from classiq.qmod.qmod_variable import Input, Output, QArray, QBit
|
6
7
|
from classiq.qmod.quantum_callable import QCallable
|
7
8
|
from classiq.qmod.quantum_function import ExternalQFunc
|
8
9
|
|
9
|
-
|
10
|
-
@QStruct
|
11
|
-
class PauliTerm:
|
12
|
-
pauli: List[int]
|
13
|
-
coefficient: float
|
14
|
-
|
15
|
-
|
16
|
-
@QStruct
|
17
|
-
class MoleculeProblem:
|
18
|
-
mapping: int
|
19
|
-
z2_symmetries: bool
|
20
|
-
molecule: "Molecule"
|
21
|
-
freeze_core: bool
|
22
|
-
remove_orbitals: List[int]
|
23
|
-
|
24
|
-
|
25
|
-
@QStruct
|
26
|
-
class Molecule:
|
27
|
-
atoms: List["ChemistryAtom"]
|
28
|
-
spin: int
|
29
|
-
charge: int
|
30
|
-
|
31
|
-
|
32
|
-
@QStruct
|
33
|
-
class ChemistryAtom:
|
34
|
-
element: int
|
35
|
-
position: "Position"
|
36
|
-
|
37
|
-
|
38
|
-
@QStruct
|
39
|
-
class Position:
|
40
|
-
x: float
|
41
|
-
y: float
|
42
|
-
z: float
|
43
|
-
|
44
|
-
|
45
|
-
@QStruct
|
46
|
-
class FockHamiltonianProblem:
|
47
|
-
mapping: int
|
48
|
-
z2_symmetries: bool
|
49
|
-
terms: List["LadderTerm"]
|
50
|
-
num_particles: List[int]
|
51
|
-
|
52
|
-
|
53
|
-
@QStruct
|
54
|
-
class LadderTerm:
|
55
|
-
coefficient: float
|
56
|
-
ops: List["LadderOp"]
|
57
|
-
|
58
|
-
|
59
|
-
@QStruct
|
60
|
-
class LadderOp:
|
61
|
-
op: int
|
62
|
-
index: int
|
63
|
-
|
64
|
-
|
65
|
-
@QStruct
|
66
|
-
class CombinatorialOptimizationSolution:
|
67
|
-
probability: float
|
68
|
-
cost: float
|
69
|
-
solution: List[int]
|
70
|
-
count: int
|
71
|
-
|
72
|
-
|
73
|
-
@QStruct
|
74
|
-
class GaussianModel:
|
75
|
-
num_qubits: int
|
76
|
-
normal_max_value: float
|
77
|
-
default_probabilities: List[float]
|
78
|
-
rhos: List[float]
|
79
|
-
loss: List[int]
|
80
|
-
min_loss: int
|
81
|
-
|
82
|
-
|
83
|
-
@QStruct
|
84
|
-
class LogNormalModel:
|
85
|
-
num_qubits: int
|
86
|
-
mu: float
|
87
|
-
sigma: float
|
88
|
-
|
89
|
-
|
90
|
-
@QStruct
|
91
|
-
class FinanceFunction:
|
92
|
-
f: int
|
93
|
-
threshold: float
|
94
|
-
larger: bool
|
95
|
-
polynomial_degree: int
|
96
|
-
use_chebyshev_polynomial_approximation: bool
|
97
|
-
tail_probability: float
|
98
|
-
|
99
|
-
|
100
|
-
@QStruct
|
101
|
-
class QsvmResult:
|
102
|
-
test_score: float
|
103
|
-
predicted_labels: List[float]
|
104
|
-
|
105
|
-
|
106
|
-
@QStruct
|
107
|
-
class QSVMFeatureMapPauli:
|
108
|
-
feature_dimension: int
|
109
|
-
reps: int
|
110
|
-
entanglement: int
|
111
|
-
alpha: float
|
112
|
-
paulis: List[List[int]]
|
10
|
+
from .structs import *
|
113
11
|
|
114
12
|
|
115
13
|
@ExternalQFunc
|
@@ -342,8 +240,8 @@ def unitary(
|
|
342
240
|
|
343
241
|
@ExternalQFunc
|
344
242
|
def add(
|
345
|
-
left:
|
346
|
-
right:
|
243
|
+
left: QArray[QBit],
|
244
|
+
right: QArray[QBit],
|
347
245
|
result: Output[QArray[QBit, Literal["Max(len(left), len(right)) + 1"]]],
|
348
246
|
) -> None:
|
349
247
|
pass
|
@@ -394,7 +292,7 @@ def single_pauli_exponent(
|
|
394
292
|
|
395
293
|
@ExternalQFunc
|
396
294
|
def suzuki_trotter(
|
397
|
-
pauli_operator: QParam[List[
|
295
|
+
pauli_operator: QParam[List[PauliTerm]],
|
398
296
|
evolution_coefficient: QParam[float],
|
399
297
|
order: QParam[int],
|
400
298
|
repetitions: QParam[int],
|
@@ -405,7 +303,7 @@ def suzuki_trotter(
|
|
405
303
|
|
406
304
|
@ExternalQFunc
|
407
305
|
def qdrift(
|
408
|
-
pauli_operator: QParam[List[
|
306
|
+
pauli_operator: QParam[List[PauliTerm]],
|
409
307
|
evolution_coefficient: QParam[float],
|
410
308
|
num_qdrift: QParam[int],
|
411
309
|
qbv: QArray[QBit, Literal["len(get_field(pauli_operator[0], 'pauli'))"]],
|
@@ -415,7 +313,7 @@ def qdrift(
|
|
415
313
|
|
416
314
|
@ExternalQFunc
|
417
315
|
def exponentiation_with_depth_constraint(
|
418
|
-
pauli_operator: QParam[List[
|
316
|
+
pauli_operator: QParam[List[PauliTerm]],
|
419
317
|
evolution_coefficient: QParam[float],
|
420
318
|
max_depth: QParam[int],
|
421
319
|
qbv: QArray[QBit, Literal["len(get_field(pauli_operator[0], 'pauli'))"]],
|
@@ -425,38 +323,42 @@ def exponentiation_with_depth_constraint(
|
|
425
323
|
|
426
324
|
@ExternalQFunc
|
427
325
|
def qft_step(
|
428
|
-
|
429
|
-
qbv: QArray[QBit, Literal["num_qbits"]],
|
326
|
+
target: QArray[QBit],
|
430
327
|
) -> None:
|
431
328
|
pass
|
432
329
|
|
433
330
|
|
434
331
|
@ExternalQFunc
|
435
332
|
def qft(
|
436
|
-
|
437
|
-
|
333
|
+
target: QArray[QBit],
|
334
|
+
) -> None:
|
335
|
+
pass
|
336
|
+
|
337
|
+
|
338
|
+
@ExternalQFunc
|
339
|
+
def standard_qpe(
|
340
|
+
precision: QParam[int],
|
341
|
+
unitary: QCallable,
|
342
|
+
phase: QArray[QBit, Literal["precision"]],
|
438
343
|
) -> None:
|
439
344
|
pass
|
440
345
|
|
441
346
|
|
442
347
|
@ExternalQFunc
|
443
348
|
def qpe(
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
x: QArray[QBit, Literal["reg_size"]],
|
448
|
-
q: QArray[QBit, Literal["qpe_reg_size"]],
|
349
|
+
precision: QParam[int],
|
350
|
+
unitary: QCallable,
|
351
|
+
phase: Output[QArray[QBit, Literal["precision"]]],
|
449
352
|
) -> None:
|
450
353
|
pass
|
451
354
|
|
452
355
|
|
453
356
|
@ExternalQFunc
|
454
357
|
def single_pauli(
|
455
|
-
reg_size: QParam[int],
|
456
358
|
slope: QParam[float],
|
457
359
|
offset: QParam[float],
|
458
360
|
q1_qfunc: QCallable[QParam[float], QBit],
|
459
|
-
x: QArray[QBit
|
361
|
+
x: QArray[QBit],
|
460
362
|
q: QBit,
|
461
363
|
) -> None:
|
462
364
|
pass
|
@@ -464,13 +366,11 @@ def single_pauli(
|
|
464
366
|
|
465
367
|
@ExternalQFunc
|
466
368
|
def linear_pauli_rotations(
|
467
|
-
reg_size: QParam[int],
|
468
|
-
num_state_qubits: QParam[int],
|
469
369
|
bases: QParam[List[int]],
|
470
370
|
slopes: QParam[List[float]],
|
471
371
|
offsets: QParam[List[float]],
|
472
|
-
x: QArray[QBit
|
473
|
-
q: QArray[QBit
|
372
|
+
x: QArray[QBit],
|
373
|
+
q: QArray[QBit],
|
474
374
|
) -> None:
|
475
375
|
pass
|
476
376
|
|
@@ -515,17 +415,15 @@ def grover_operator(
|
|
515
415
|
|
516
416
|
@ExternalQFunc
|
517
417
|
def hadamard_transform(
|
518
|
-
|
519
|
-
q: QArray[QBit, Literal["num_qubits"]],
|
418
|
+
target: QArray[QBit],
|
520
419
|
) -> None:
|
521
420
|
pass
|
522
421
|
|
523
422
|
|
524
423
|
@ExternalQFunc
|
525
424
|
def apply_to_all(
|
526
|
-
num_qubits: QParam[int],
|
527
425
|
gate_operand: QCallable[QBit],
|
528
|
-
|
426
|
+
target: QArray[QBit],
|
529
427
|
) -> None:
|
530
428
|
pass
|
531
429
|
|
@@ -550,40 +448,36 @@ def prepare_int(
|
|
550
448
|
|
551
449
|
@ExternalQFunc
|
552
450
|
def qaoa_mixer_layer(
|
553
|
-
num_qubits: QParam[int],
|
554
451
|
b: QParam[float],
|
555
|
-
target: QArray[QBit
|
452
|
+
target: QArray[QBit],
|
556
453
|
) -> None:
|
557
454
|
pass
|
558
455
|
|
559
456
|
|
560
457
|
@ExternalQFunc
|
561
458
|
def qaoa_cost_layer(
|
562
|
-
num_qubits: QParam[int],
|
563
459
|
g: QParam[float],
|
564
|
-
hamiltonian: QParam[List[
|
460
|
+
hamiltonian: QParam[List[PauliTerm]],
|
565
461
|
is_st: QParam[bool],
|
566
|
-
target: QArray[QBit
|
462
|
+
target: QArray[QBit],
|
567
463
|
) -> None:
|
568
464
|
pass
|
569
465
|
|
570
466
|
|
571
467
|
@ExternalQFunc
|
572
468
|
def qaoa_layer(
|
573
|
-
num_qubits: QParam[int],
|
574
469
|
g: QParam[float],
|
575
470
|
b: QParam[float],
|
576
|
-
hamiltonian: QParam[List[
|
471
|
+
hamiltonian: QParam[List[PauliTerm]],
|
577
472
|
is_st: QParam[bool],
|
578
|
-
target: QArray[QBit
|
473
|
+
target: QArray[QBit],
|
579
474
|
) -> None:
|
580
475
|
pass
|
581
476
|
|
582
477
|
|
583
478
|
@ExternalQFunc
|
584
479
|
def qaoa_init(
|
585
|
-
|
586
|
-
target: QArray[QBit, Literal["num_qubits"]],
|
480
|
+
target: QArray[QBit],
|
587
481
|
) -> None:
|
588
482
|
pass
|
589
483
|
|
@@ -592,7 +486,7 @@ def qaoa_init(
|
|
592
486
|
def qaoa_penalty(
|
593
487
|
num_qubits: QParam[int],
|
594
488
|
params_list: QParam[List[float]],
|
595
|
-
hamiltonian: QParam[List[
|
489
|
+
hamiltonian: QParam[List[PauliTerm]],
|
596
490
|
is_st: QParam[bool],
|
597
491
|
target: QArray[QBit, Literal["num_qubits"]],
|
598
492
|
) -> None:
|
@@ -690,7 +584,7 @@ def power(
|
|
690
584
|
|
691
585
|
@ExternalQFunc
|
692
586
|
def molecule_ucc(
|
693
|
-
molecule_problem: QParam[
|
587
|
+
molecule_problem: QParam[MoleculeProblem],
|
694
588
|
excitations: QParam[List[int]],
|
695
589
|
qbv: QArray[
|
696
590
|
QBit,
|
@@ -704,7 +598,7 @@ def molecule_ucc(
|
|
704
598
|
|
705
599
|
@ExternalQFunc
|
706
600
|
def molecule_hva(
|
707
|
-
molecule_problem: QParam[
|
601
|
+
molecule_problem: QParam[MoleculeProblem],
|
708
602
|
reps: QParam[int],
|
709
603
|
qbv: QArray[
|
710
604
|
QBit,
|
@@ -718,7 +612,7 @@ def molecule_hva(
|
|
718
612
|
|
719
613
|
@ExternalQFunc
|
720
614
|
def molecule_hartree_fock(
|
721
|
-
molecule_problem: QParam[
|
615
|
+
molecule_problem: QParam[MoleculeProblem],
|
722
616
|
qbv: QArray[
|
723
617
|
QBit,
|
724
618
|
Literal[
|
@@ -731,7 +625,7 @@ def molecule_hartree_fock(
|
|
731
625
|
|
732
626
|
@ExternalQFunc
|
733
627
|
def fock_hamiltonian_ucc(
|
734
|
-
fock_hamiltonian_problem: QParam[
|
628
|
+
fock_hamiltonian_problem: QParam[FockHamiltonianProblem],
|
735
629
|
excitations: QParam[List[int]],
|
736
630
|
qbv: QArray[
|
737
631
|
QBit,
|
@@ -745,7 +639,7 @@ def fock_hamiltonian_ucc(
|
|
745
639
|
|
746
640
|
@ExternalQFunc
|
747
641
|
def fock_hamiltonian_hva(
|
748
|
-
fock_hamiltonian_problem: QParam[
|
642
|
+
fock_hamiltonian_problem: QParam[FockHamiltonianProblem],
|
749
643
|
reps: QParam[int],
|
750
644
|
qbv: QArray[
|
751
645
|
QBit,
|
@@ -759,7 +653,7 @@ def fock_hamiltonian_hva(
|
|
759
653
|
|
760
654
|
@ExternalQFunc
|
761
655
|
def fock_hamiltonian_hartree_fock(
|
762
|
-
fock_hamiltonian_problem: QParam[
|
656
|
+
fock_hamiltonian_problem: QParam[FockHamiltonianProblem],
|
763
657
|
qbv: QArray[
|
764
658
|
QBit,
|
765
659
|
Literal[
|
@@ -772,8 +666,8 @@ def fock_hamiltonian_hartree_fock(
|
|
772
666
|
|
773
667
|
@ExternalQFunc
|
774
668
|
def log_normal_finance(
|
775
|
-
finance_model: QParam[
|
776
|
-
finance_function: QParam[
|
669
|
+
finance_model: QParam[LogNormalModel],
|
670
|
+
finance_function: QParam[FinanceFunction],
|
777
671
|
func_port: QArray[QBit, Literal["get_field(finance_model, 'num_qubits')"]],
|
778
672
|
obj_port: QBit,
|
779
673
|
) -> None:
|
@@ -782,8 +676,8 @@ def log_normal_finance(
|
|
782
676
|
|
783
677
|
@ExternalQFunc
|
784
678
|
def gaussian_finance(
|
785
|
-
finance_model: QParam[
|
786
|
-
finance_function: QParam[
|
679
|
+
finance_model: QParam[GaussianModel],
|
680
|
+
finance_function: QParam[FinanceFunction],
|
787
681
|
func_port: QArray[
|
788
682
|
QBit,
|
789
683
|
Literal[
|
@@ -797,7 +691,7 @@ def gaussian_finance(
|
|
797
691
|
|
798
692
|
@ExternalQFunc
|
799
693
|
def pauli_feature_map(
|
800
|
-
feature_map: QParam[
|
694
|
+
feature_map: QParam[QSVMFeatureMapPauli],
|
801
695
|
qbv: QArray[QBit, Literal["get_field(feature_map, 'feature_dimension')"]],
|
802
696
|
) -> None:
|
803
697
|
pass
|
@@ -812,20 +706,6 @@ def bloch_sphere_feature_map(
|
|
812
706
|
|
813
707
|
|
814
708
|
__all__ = [
|
815
|
-
"PauliTerm",
|
816
|
-
"MoleculeProblem",
|
817
|
-
"Molecule",
|
818
|
-
"ChemistryAtom",
|
819
|
-
"Position",
|
820
|
-
"FockHamiltonianProblem",
|
821
|
-
"LadderTerm",
|
822
|
-
"LadderOp",
|
823
|
-
"CombinatorialOptimizationSolution",
|
824
|
-
"GaussianModel",
|
825
|
-
"LogNormalModel",
|
826
|
-
"FinanceFunction",
|
827
|
-
"QsvmResult",
|
828
|
-
"QSVMFeatureMapPauli",
|
829
709
|
"H",
|
830
710
|
"X",
|
831
711
|
"Y",
|
@@ -866,6 +746,7 @@ __all__ = [
|
|
866
746
|
"exponentiation_with_depth_constraint",
|
867
747
|
"qft_step",
|
868
748
|
"qft",
|
749
|
+
"standard_qpe",
|
869
750
|
"qpe",
|
870
751
|
"single_pauli",
|
871
752
|
"linear_pauli_rotations",
|
@@ -0,0 +1,19 @@
|
|
1
|
+
from classiq.interface.model.bind_operation import BindOperation
|
2
|
+
|
3
|
+
from classiq.qmod.qmod_variable import Input, Output, QVar
|
4
|
+
from classiq.qmod.quantum_callable import QCallable
|
5
|
+
|
6
|
+
|
7
|
+
def bind(source: Input[QVar], destination: Output[QVar]) -> None:
|
8
|
+
assert QCallable.CURRENT_EXPANDABLE is not None
|
9
|
+
QCallable.CURRENT_EXPANDABLE.append_statement_to_body(
|
10
|
+
BindOperation(
|
11
|
+
in_handle=source.get_handle_binding(),
|
12
|
+
out_handle=destination.get_handle_binding(),
|
13
|
+
)
|
14
|
+
)
|
15
|
+
|
16
|
+
|
17
|
+
__all__ = [
|
18
|
+
"bind",
|
19
|
+
]
|