LCHS

oracq.algorithms.qode.lchs

Assemble dissipative linear evolution as a finite weighted sum of Hermitian evolution branches.

class oracq.algorithms.qode.lchs.QuadraturePlan(nodes, weights, kernel='user_supplied')[源代码]

基类:object

Discrete quadrature plan for the LCHS integral.

变量:
  • nodes (tuple[float, ...]) -- Finite real quadrature nodes.

  • weights (tuple[complex, ...]) -- Finite complex weights of the same length as nodes; must already include the integration kernel and not be all zero.

  • kernel (str) -- Plan source marker, written verbatim into the result metadata.

抛出:

ValidationError -- Node and weight lengths mismatch, non-finite values are present, or the weights are all zero.

nodes
weights
kernel = 'user_supplied'
classmethod cauchy(cutoff=2, spacing=1.0)[源代码]

Construct a symmetric quadrature plan for the Cauchy kernel.

参数:
  • cutoff -- Non-negative truncation; nodes are k*spacing with k in -cutoff..cutoff.

  • spacing -- Positive node spacing.

返回:

Weights are spacing/(pi*(1+k**2)), with kernel marked finite_cauchy.

返回类型:

QuadraturePlan

抛出:

ValidationError -- The truncation is negative or the spacing is not positive.

oracq.algorithms.qode.lchs.lchs_qode(model, time, *, plan=None, hamiltonian_function=<function taylor_hamiltonian>)[源代码]

Assemble dissipative linear evolution as a finite weighted sum of Hermitian evolution branches per LCHS.

参数:
  • model -- LinearODE input model; parts.hermitian is L, parts.h is H, and initial is the initial state preparation.

  • time -- Non-negative evolution time.

  • plan -- QuadraturePlan quadrature plan; the default Cauchy plan is used when omitted.

  • hamiltonian_function -- Replaceable protocol taking (K, time) and returning a BlockEncoding.

返回:

Per-node K_j=H+k_j*L branches combined via LCU and applied to the initial state; the success subspace is all-zero signal.

返回类型:

StateOracle

抛出:

ValidationError -- model or plan has the wrong type, time is invalid, or the input capability contract is not satisfied.

Finite quadrature carries no tail-integral guarantee; the remainder is declared pending in the remainder metadata.