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')[source]¶
Bases:
objectDiscrete quadrature plan for the LCHS integral.
- Variables:
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.
- Raises:
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)[source]¶
Construct a symmetric quadrature plan for the Cauchy kernel.
- Parameters:
cutoff – Non-negative truncation; nodes are k*spacing with k in -cutoff..cutoff.
spacing – Positive node spacing.
- Returns:
Weights are spacing/(pi*(1+k**2)), with kernel marked
finite_cauchy.- Return type:
- Raises:
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>)[source]¶
Assemble dissipative linear evolution as a finite weighted sum of Hermitian evolution branches per LCHS.
- Parameters:
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.
- Returns:
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.
- Return type:
- Raises:
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
remaindermetadata.