参考工作负载目录

oracq.applications.catalog

Reproducibly generated catalog of paradigm cases: open IR, binding plans and a finite set of concrete instances.

class oracq.applications.catalog.Case(name, program, bindings=<factory>, memory=<factory>, source=(), notes=(), readout=())[源代码]

基类:object

One paradigm reference case: an open program, implementation bindings and host memory data.

变量:
  • name (str) -- Case name, one of the entries of CASES.

  • program (oracq.infrastructure.ir.Program) -- The case's Program; abstract slots await filling by bindings.

  • bindings (dict[str, oracq.infrastructure.linking.Binding | oracq.infrastructure.builder.Operation]) -- Mapping of slot names to Binding or Operation; unlisted slots stay open.

  • memory (dict[str, list[int] | dict[int, int]]) -- Host-side memory tables of QRAM cases; keys are the names referenced by binding resource maps.

  • source (tuple[str, ...]) -- Tuple of provenance identifiers (language specification, spec tests or reference workload entries).

  • notes (tuple[str, ...]) -- Tuple of qualifying notes on the case's applicability boundary.

  • readout (tuple[oracq.infrastructure.readout.ReadoutAction, ...]) -- Tuple of terminal ReadoutAction readout actions executed in order after export.

name
program
bindings
memory
source = ()
notes = ()
readout = ()
closed()[源代码]

Bind the open slots of program per bindings and return the closed Program.

返回:

The closed program with each open slot replaced by its bound implementation.

返回类型:

Program

artifact()[源代码]

Export the OriginIR artifact of the closed program.

返回:

The OriginIR export artifact of the closed() result.

返回类型:

OriginIRArtifact

The OriginIR exporter is imported lazily inside this method, so core code gains no backend dependency.

oracq.applications.catalog.CASES = ('bell', 'ghz', 'python_generators', 'trotter_hamsim', 'dj_gate', 'dj_qram', 'grover_gate', 'grover_qram', 'stateprep_gate', 'stateprep_qram', 'sparse_gate', 'sparse_qram', 'costa_gate', 'costa_qram', 'costa_sparse_qram', 'qfvm_gate', 'qfvm_qram', 'qham_qode', 'qham_qpde', 'qpe', 'qsvt', 'oaa', 'lchs', 'heat_qode', 'poisson_qlss', 'carleman_step', 'schrodingerisation', 'be_algebra', 'arithmetic', 'batch_qram', 'banked_qram', 'register_views', 'measure_reset')

All case names accepted by build_case.

Naming convention: most cases are prefixed with an application family (e.g. dj_, grover_, qham_); the _gate suffix denotes a fixed gate-level implementation, the _qram suffix denotes an implementation that binds QRAM databases and carries host memory tables, and the _qode/_qpde suffixes distinguish solver wrapper layers; the remaining unsuffixed names are demo cases of primitives or single algorithms.

oracq.applications.catalog.build_case(name)[源代码]

Build one paradigm reference case by name.

All cases are generated from fixed constants and can be constructed reproducibly; QRAM cases also provide host memory tables.

参数:

name -- Case name; must be one of the entries of CASES.

返回:

The corresponding case, with implementation bindings, memory data and readout actions where applicable.

返回类型:

Case

抛出:

KeyError -- The case name is not in CASES.