solve

oracq.algorithms.common.solve

Shared modular solve circuits, memory binding, and optional native execution.

oracq.algorithms.common.solve.resolve_memory(program, banks)[source]

Trace resource arguments through calls without expanding gates or repeats.

class oracq.algorithms.common.solve.SolveCircuit(program, _memory=())[source]

Bases: object

A modular RIR circuit with separately snapshotted execution memory.

program
property memory

Copy entry bindings, including all resource argument renamings.

dumps(*, format='yaml')[source]

Serialize RIR without memory contents or module expansion.

originir_ext()[source]

Export modular OriginIR-ext without importing a native backend.

resource_estimate(basic_gates='clifford+t+qram')[source]

Estimate circuit resources compositionally in the requested basis.

Clifford+T uses the exact seven-T Toffoli decomposition: four T, three T-dagger, six CNOT, and two H gates. Arbitrary rotations remain synthesis estimates in ResourceEstimate.t_total(epsilon). QRAM queries remain independent oracle costs.

run_pysparq(*, max_steps=1000000, max_states=65536, native_registry=None)[source]

Execute the prepared RIR and memory with the optional PySparQ backend.

run_originir_ext(*, max_qubits=24, max_steps=1000000)[source]

Execute exported OriginIR and decode its original register boundaries.