solver¶
oracq.algorithms.qpde.solver
Prepared quantum PDE instances, backend execution, and physical readout.
- class oracq.algorithms.qpde.solver.QHAMConfig(order=1, eta=-1.0, taylor_degree=1, linear_solver=None, max_blocks=256, max_terms=4096, max_initial_words=4096, max_coefficient_words=4096)[source]¶
Bases:
objectHAM truncation and independent linear evolution configuration.
The default linear solver is a finite Taylor polynomial of the lifted generator. HAM convergence, spatial error, angle quantization, and Taylor error remain separate approximation questions. Supply
linear_solverto use an existing QODE protocol with its own input requirements.- order = 1¶
- eta = -1.0¶
- taylor_degree = 1¶
- linear_solver = None¶
- max_blocks = 256¶
- max_terms = 4096¶
- max_initial_words = 4096¶
- max_coefficient_words = 4096¶
- class oracq.algorithms.qpde.solver.PreparedPDE(state, report, qrams=(), model=None, amplitude_scale=None)[source]¶
Bases:
objectA method’s generated state oracle and its validated input contract.
amplitude_scalerecovers physical values from unnormalized success amplitudes when the chosen method supplies this normalization information. Custom methods may leave it unresolved and still support state readout.- state¶
- report¶
- qrams = ()¶
- model = None¶
- amplitude_scale = None¶
- class oracq.algorithms.qpde.solver.PDEMethod(*args, **kwargs)[source]¶
Bases:
ProtocolAn algorithm that owns the contracts and adaptations for its PDE inputs.
Implementations check their own grid, oracle capabilities, and mathematical promises, returning a physical
target/signalstate oracle. There is no implicit conversion from a raw value query into amplitude preparation.
- class oracq.algorithms.qpde.solver.QHAMMethod(config=QHAMConfig(order=1, eta=-1.0, taylor_degree=1, linear_solver=None, max_blocks=256, max_terms=4096, max_initial_words=4096, max_coefficient_words=4096))[source]¶
Bases:
objectQHAM adaptation from independently chosen grid and initial inputs.
- config = QHAMConfig(order=1, eta=-1.0, taylor_degree=1, linear_solver=None, max_blocks=256, max_terms=4096, max_initial_words=4096, max_coefficient_words=4096)¶
- class oracq.algorithms.qpde.solver.PDECircuit(program, _memory=())[source]¶
Bases:
SolveCircuitA prepared PDE circuit with shared export, estimation, and execution.
- class oracq.algorithms.qpde.solver.PDEResult(state, layout, backend, amplitude_scale=None)[source]¶
Bases:
objectBackend state and physical success-channel readout of a prepared PDE.
- state¶
- layout¶
- backend¶
- amplitude_scale = None¶
- property success_probability¶
Joint probability of zero signal and a physical output address.
- class oracq.algorithms.qpde.solver.PDESolveInstance(problem, method)[source]¶
Bases:
objectExplicit prepare/inspect/execute lifecycle for a quantum PDE algorithm.
Preparation is cached and imports no optional quantum backend. Execution requires successful preparation and never silently regenerates a circuit.
- property problem¶
The problem whose configuration is captured by this instance.
- property method¶
The algorithm implementation selected for this instance.
- property prepared¶
Inspect the method’s model and checked contract after preparation.
- oracq.algorithms.qpde.solver.qpde_solve(problem, *, method='QHAM', config=None)[source]¶
Create an unprepared solve instance with a named or application-defined method.
Only QHAM is a built-in named method. Other methods implement
PDEMethodand own their input contracts; the host lifecycle and backends are shared.