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: object

A=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 + iH from the block encoding of operator A.

Combines a and its adjoint via an LCU to build L = (A + A†)/2 and H = (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:

HermitianParts

class oracq.algorithms.qode.ode_models.LinearODE(parts, initial, label='du_dt_equals_minus_A_u')[source]

Bases: object

Shared input model of the autonomous linear ODE u' = -Au (with A = L + iH).

Variables:
parts
initial
label = 'du_dt_equals_minus_A_u'