Circuit2place
CleanUpLogicalInitialize
Bases: RewriteRule
Clean up any remaining LogicalInitialize statements.
HoistConstants
Bases: RewriteRule
This rewrite rule hoists all constant values to the top of the kernel.
HoistNewQubitsUp
Bases: RewriteRule
This rewrite rule shifts all qubit allocations before all gate operations.
InitializeNewQubits
Bases: RewriteRule
Rewrite NewLogical qubit allocations to Initialize statements.
MergePlacementRegions
dataclass
MergePlacementRegions(
merge_heuristic: Callable[
[Region, Region], bool
] = _default_merge_heuristic,
)
Bases: RewriteRule
Merge adjacent placement regions into a single region. This is a placeholder for the actual implementation.
merge_heuristic
class-attribute
instance-attribute
merge_heuristic: Callable[[Region, Region], bool] = (
_default_merge_heuristic
)
Heuristic function to decide whether to merge two circuit regions.
RewriteInitializeToLogicalInitialize
Bases: RewriteRule
Rewrite gemini.logical.Initialize statements to place.LogicalInitialize statement.
RewriteLogicalInitializeToNewLogical
Bases: RewriteRule
Rewrite qubit references in place.LogicalInitialize statements to place.NewLogicalQubit allocations.
RewritePlaceOperations
dataclass
RewritePlaceOperations()
Bases: RewriteRule
Rewrite rule to convert native operations to place operations. This is a placeholder for the actual implementation.