udm.transpiler#

Classes#

UDMTranspiler

Transpiler to convert raw bitstring-count results from a quantum SDK

Module Contents#

class UDMTranspiler(udg: udm.mwis_solver.Ising_UnitDiskGraph, num_vars: int)#

Bases: qamomile.core.transpiler.QuantumSDKTranspiler[collections.OrderedDict]

Transpiler to convert raw bitstring-count results from a quantum SDK into jijmodeling Solutions by mapping through the unit-disk-graph.

Parameters:
  • udg – An Ising_UnitDiskGraph instance containing the QUBO mapping.

  • jm_vars – Ordered list of jijmodeling.BinaryVar corresponding to the original problem variables.

udg#
num_vars#
convert_result(result: collections.OrderedDict) qamomile.core.bitssample.BitsSampleSet#

Convert the SDK-specific bitstring->count result into a list of jijmodeling Solution objects.

Steps: 1. Parse each bitstring into a list of ints (0/1). 2. Map through the QUBOResult using map_config_back to recover

the original binary assignments.

  1. Build a jijmodeling Solution with the variable assignments and the measurement count as weight.

transpile_circuit(circuit: qamomile.core.circuit.QuantumCircuit)#

No circuit-level changes needed; return the original circuit.

transpile_hamiltonian(operator: qamomile.core.operator.Hamiltonian)#

No Hamiltonian-level changes needed; return the original operator.