Skip to content

Transpilation

ampamp.transpilation

Transpilation and hardware-profiling utilities for ampamp.

This module provides reusable, library-grade classes for staged circuit transpilation analysis, routing diagnostics, and unified hardware scoring.

HardwareCostWeights dataclass

Weights used by the unified hardware cost function.

TranspilationBatchProfiler

Profiles multiple circuits with one shared transpilation configuration.

profile_many(circuits)

Profile a dictionary of named circuits.

TranspilationProfileConfig dataclass

Configuration for staged transpilation profiling.

TranspilationProfiler

Profiles a circuit through layout, routing, optimization, and scheduling.

calculate_cost_function(*, time_ns, cnots, distance)

Compute unified hardware penalty score.

score = w_timetime + w_cnotcnots + w_distance*distance

profile_circuit(logical_circuit)

Run a multi-stage transpilation profile and return hardware metrics.