Skip to content

Commit

Permalink
Route circuit with maps.
Browse files Browse the repository at this point in the history
  • Loading branch information
cqc-alec committed Sep 18, 2024
1 parent 7781719 commit eaa9d25
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tket/src/Predicates/PassGenerators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -487,11 +487,12 @@ PassPtr gen_cx_mapping_pass(
if (delay_measures) return_pass = return_pass >> DelayMeasures();
return_pass = return_pass >> rebase_pass >>
gen_decompose_routing_gates_to_cxs_pass(arc, directed_cx);
Transform t{[=](Circuit& circ) {
Transform t{[=](Circuit& circ, std::shared_ptr<unit_bimaps_t> maps) {
MappingManager mm(std::make_shared<Architecture>(arc));
CompilationUnit cu(circ);
bool changed = return_pass->apply(cu);
circ = cu.get_circ_ref();
return changed;
return changed || mm.route_circuit_with_maps(circ, config, maps);
}};
PassConditions conditions = return_pass->get_conditions();
nlohmann::json j;
Expand Down

0 comments on commit eaa9d25

Please sign in to comment.