QHAM 推导报告¶
oracq.applications.qham.report
Export reviewable automated derivations and the QODE input manifest.
- oracq.applications.qham.report.input_manifest(plan, state_width)[源代码]¶
Build the input manifest handed to the QODE solver side.
- 参数:
plan --
QHAMPlanclosure plan.state_width -- Bit width of a single-component state.
- 返回:
plan.summary()extended with the state width and dimension, the generator target width, the total lifted dimension, per-port input and output widths and block encoding requirements, plus constraint notes on initial-state preparation, time dependence, and sparse access.- 返回类型:
dict
- oracq.applications.qham.report.row_description(plan, block, state_width, eta)[源代码]¶
Build the derivation description of a single row block.
- 参数:
plan --
QHAMPlanclosure plan.block -- Row block within the closure.
state_width -- Bit width of a single-component state.
eta -- Homotopy parameter.
- 返回:
Contains the block label, tensor word, block offset, and block dimension, plus for each linear edge the source block, port, action position, weight formula, and value at
eta(real and imaginary parts).- 返回类型:
dict
- oracq.applications.qham.report.export_derivation(plan, directory, *, state_width=2, eta=-1.0, max_blocks=256, row=None)[源代码]¶
Export the automated derivation results as reviewable JSON, Markdown, and a QODE manifest.
Writes
pde.json,qcl-plan.json,rows.json,qode-input.json, andderivation.mdunderdirectory; the directory is created recursively when absent.- 参数:
plan --
QHAMPlanclosure plan.directory -- Export directory.
state_width -- Bit width of a single-component state.
eta -- Homotopy parameter; must be a finite complex number.
max_blocks -- Budget for explicitly enumerating row blocks; when the closure block count exceeds it, rows are not enumerated and the manifest keeps the plan summary with a note that the budget was exceeded.
row -- When given, export only this row block; otherwise export all row blocks.
- 返回:
The manifest written to
qode-input.json(includingeta).- 返回类型:
dict
- 抛出:
ValidationError --
etais not finite, orrowis not in the QCL closure.