qat.runtime.passes.analysis module

class IndexMappingAnalysis(model)

Bases: AnalysisPass

Determines a mapping from classical bit registers to qubits.

Searches through the acquires of the package and determines their associated qubit. Also looks for classical registers of the form <clreg_name>[<clreg_index>].

Supports both Executable packages and InstructionBuilder.

Parameters:

model (PhysicalHardwareModel) – The hardware model is needed for the qubit mapping.

run(acquisitions, res_mgr, *args, package, **kwargs)
Parameters:
  • acquisitions (dict[str, any]) – The dictionary of results acquired from the target machine.

  • res_mgr (ResultManager) – The results manager to save the mapping.

  • package (Union[InstructionBuilder, Executable]) – The executable program containing the results-processing information should be passed as a keyword argument.

static var_to_physical_channel_executable(package)
Return type:

dict[str, str]

var_to_physical_channel_qat_ir(package)
Return type:

dict[str, str]

var_to_qubit_map(mapping)

Maps the variables in the mapping to qubit indices.

class IndexMappingResult(mapping)

Bases: ResultInfoMixin

mapping: dict[str, int]