Linear ODE input models¶
oracq.algorithms.qode.ode_models
Shared input model of Hermitian decompositions and autonomous linear ODEs.
- class oracq.algorithms.qode.ode_models.HermitianParts(hermitian, h)[source]¶
Bases:
objectA=L+iH; the Hermitian/positive-semidefinite properties are input-model declarations, not proved by the language.
- hermitian¶
- h¶
- classmethod from_operator(a)[source]¶
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).- Parameters:
a – Block encoding of the operator A.
- Returns:
The corresponding Hermitian decomposition; the Hermitian nature of each component remains caller-declared.
- Return type:
- class oracq.algorithms.qode.ode_models.LinearODE(parts, initial, label='du_dt_equals_minus_A_u')[source]¶
Bases:
objectShared input model of the autonomous linear ODE
u' = -Au(withA = L + iH).- Variables:
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'¶