PDE 模型与适配

oracq.algorithms.qpde.pde

Assembly interface between spatial discretization results and replaceable QODE generators.

class oracq.algorithms.qpde.pde.DiscretePDE(generator, initial, label='linear_pde')[源代码]

基类:object

Linear PDE input object after spatial discretization.

It stores only the discrete generator, the initial state preparation, and a label; application metadata such as the grid, boundaries, and dimensions is not carried by this type.

变量:
generator
initial
label = 'linear_pde'
oracq.algorithms.qpde.pde.make_qpde(qode, discretizer=<function <lambda>>)[源代码]

Wrap a three-argument linear QODE protocol into a QPDE generation function.

参数:
  • qode -- A linear solve protocol of the form (generator, initial, time) -> StateOracle.

  • discretizer -- A callable mapping the problem object to an object with generator and initial attributes (e.g. DiscretePDE); returns its input unchanged by default.

返回:

A generation function of the form (problem, final_time) -> StateOracle.

返回类型:

callable

class oracq.algorithms.qpde.pde.PDEInput(model, label='open_spatial_discretization')[源代码]

基类:object

Input model after spatial discretization; may directly be a PolynomialODE; no dense matrix is required.

model
label = 'open_spatial_discretization'
oracq.algorithms.qpde.pde.qpde_solver(qode, spatial_discretizer=<function <lambda>>)[源代码]

Wrap a (model, time)-shaped solve protocol into a QPDE generation function.

Unlike make_qpde, the discretization result is passed to qode directly as a single model, which suits model-level protocols such as PolynomialODE.

参数:
  • qode -- A solve protocol of the form (model, time) -> StateOracle.

  • spatial_discretizer -- A callable extracting the model from the problem object; defaults to problem.model.

返回:

A generation function of the form (problem, time) -> StateOracle.

返回类型:

callable