solver¶
oracq.algorithms.qode.solver
Prepared ODE solve instances with replaceable methods and physical vector readout.
- class oracq.algorithms.qode.solver.ODEConfig(taylor_degree=2, plan=None, hamiltonian_function=<function taylor_hamiltonian>, max_initial_words=4096)[source]¶
Bases:
objectLinear evolution settings; approximation choices remain method-specific.
- taylor_degree = 2¶
- plan = None¶
- hamiltonian_function(time, *, degree=2)¶
A closable plain Hamiltonian-function block encoding; replaceable by a QSP/HamSim protocol.
- Parameters:
hamiltonian – Block encoding of the operator.
time – Evolution time, a finite real number.
degree – Taylor truncation order, an integer not less than 0; order 0 keeps only the identity term.
- Returns:
LCU block encoding of the truncated Taylor series, with correctness marked pending.
- Return type:
- max_initial_words = 4096¶
- class oracq.algorithms.qode.solver.PreparedODE(state, report, qrams=(), model=None, amplitude_scale=None)[source]¶
Bases:
objectMethod output, checked contracts, memory, and optional physical magnitude scale.
- state¶
- report¶
- qrams = ()¶
- model = None¶
- amplitude_scale = None¶
- class oracq.algorithms.qode.solver.ODEMethod(*args, **kwargs)[source]¶
Bases:
ProtocolA method owns its input adaptations, mathematical requirements, and readout scale.
- class oracq.algorithms.qode.solver.LinearODEMethod(solver, max_initial_words=4096, recover_taylor_scale=False)[source]¶
Bases:
objectAdapt shared ODE inputs to an existing checked QODESolver protocol.
- solver¶
- max_initial_words = 4096¶
- recover_taylor_scale = False¶
- class oracq.algorithms.qode.solver.ODECircuit(program, _memory=())[source]¶
Bases:
SolveCircuitA modular ODE circuit sharing export, resource estimates, and backend execution.
- class oracq.algorithms.qode.solver.ODEResult(state, layout, backend, amplitude_scale=None)[source]¶
Bases:
objectBackend state and final-time vector readout, excluding register padding.
- state¶
- layout¶
- backend¶
- amplitude_scale = None¶
- property success_probability¶
Joint probability of zero signal and a physical vector address.
- class oracq.algorithms.qode.solver.ODESolveInstance(problem, method)[source]¶
Bases:
objectCached prepare/inspect/execute lifecycle, independent of native quantum backends.
- property problem¶
Captured mathematical problem and input choices.
- property method¶
Selected method and its configuration.
- property prepared¶
Inspect the method’s checked model and readout scale after preparation.
- oracq.algorithms.qode.solver.qode_solve(problem, *, method='taylor', config=None)[source]¶
Select Taylor, LCHS, CBMD, Schrödingerization, or an application-defined method.
Named methods use ODEConfig. A QODESolver keeps its own configuration and preconditions; an ODEMethod owns preparation and physical scale recovery.