线性 ODE 输入模型¶
oracq.algorithms.qode.ode_models
Shared input model of Hermitian decompositions and autonomous linear ODEs.
- class oracq.algorithms.qode.ode_models.HermitianParts(hermitian, h)[源代码]¶
基类:
objectA=L+iH; the Hermitian/positive-semidefinite properties are input-model declarations, not proved by the language.
- hermitian¶
- h¶
- classmethod from_operator(a)[源代码]¶
Construct the Hermitian decomposition
A = L + iHfrom the block encoding of operator A.Combines
aand its adjoint via an LCU to buildL = (A + A†)/2andH = (A - A†)/(2i).- 参数:
a -- Block encoding of the operator A.
- 返回:
The corresponding Hermitian decomposition; the Hermitian nature of each component remains caller-declared.
- 返回类型:
- class oracq.algorithms.qode.ode_models.LinearODE(parts, initial, label='du_dt_equals_minus_A_u')[源代码]¶
基类:
objectShared input model of the autonomous linear ODE
u' = -Au(withA = L + iH).- 变量:
parts (oracq.algorithms.qode.ode_models.HermitianParts) -- The
HermitianPartsdecomposition of A.initial (oracq.algorithms.input_model.oracles.StatePreparation) -- Initial state preparation; its target width must match
parts.label (str) -- Model label; the default spells out the equation form.
- parts¶
- initial¶
- label = 'du_dt_equals_minus_A_u'¶