Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

qamomile.optimization

Domain-specific helper layer for quantum combinatorial optimization.

Design center

This package turns classical combinatorial optimization problems (OMMX Instance or Qamomile BinaryModel) into quantum programs and decodes measurement results back into classical solutions. It hosts the converter family: QAOAConverter (qaoa.py, QUBO/Ising and HUBO via phase gadgets), FQAOAConverter (fqaoa.py, fermionic mixers with particle-number constraints), the QRAC converters (qrao/), and PCEConverter (pce.py, Pauli correlation encoding).

Layering constraint (inviolable)

optimization → circuit ← backends. This package is a consumer of qamomile.circuit’s public transpiler and algorithm APIs (Transpiler, ExecutableProgram, qamomile.circuit.algorithm ansatz builders) — it must never be imported by qamomile.circuit or by backend packages, and it must never reach into circuit internals (passes, IR rewriting). A converter builds a qkernel / Hamiltonian and hands it to whatever backend Transpiler the caller supplies; backend choice stays out of this layer entirely.

Extension points

Submodules