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)[源代码]

基类:object

HAM 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_solver to 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)[源代码]

基类:object

A method's generated state oracle and its validated input contract.

amplitude_scale recovers 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)[源代码]

基类:Protocol

An 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/signal state oracle. There is no implicit conversion from a raw value query into amplitude preparation.

prepare(problem)[源代码]

Adapt the problem's inputs and return the validated state oracle.

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))[源代码]

基类:object

QHAM 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)
prepare(problem)[源代码]

Check oracle contracts, lift HAM, and generate the selected QODE circuit.

class oracq.algorithms.qpde.solver.PDECircuit(program, _memory=())[源代码]

基类:SolveCircuit

A prepared PDE circuit with shared export, estimation, and execution.

class oracq.algorithms.qpde.solver.PDEResult(state, layout, backend, amplitude_scale=None)[源代码]

基类:object

Backend 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.

physical_amplitudes(*, normalize=True)[源代码]

Read physical samples; optionally normalize the joint success channel.

physical_values()[源代码]

Recover physical values of the generated approximation when its scale is known.

class oracq.algorithms.qpde.solver.PDESolveInstance(problem, method)[源代码]

基类:object

Explicit 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.

prepare()[源代码]

Generate and validate once, then resolve every entry QRAM snapshot.

circuit()[源代码]

Inspect or export the generated circuit after preparation.

run_pysparq(*, max_steps=1000000, max_states=65536, native_registry=None)[源代码]

Execute with the real optional PySparQ backend and registered memory.

run_originir_ext(*, max_qubits=24, max_steps=1000000)[源代码]

Export and execute through the real optional UnifiedQuantum backend.

oracq.algorithms.qpde.solver.qpde_solve(problem, *, method='QHAM', config=None)[源代码]

Create an unprepared solve instance with a named or application-defined method.

Only QHAM is a built-in named method. Other methods implement PDEMethod and own their input contracts; the host lifecycle and backends are shared.