Skip to content

Commit

Permalink
Add KAKDecompostion pass to optimisation_level=2 after routing (#51)
Browse files Browse the repository at this point in the history
* add post-routing KAKDecomposition pass to OL=2

* consistent syntax

* fix bad syntax
  • Loading branch information
CalMacCQ authored Dec 12, 2023
1 parent 4b4358f commit b444f2e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pytket/extensions/pyquil/backends/forest.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
EulerAngleReduction,
CXMappingPass,
auto_rebase_pass,
KAKDecomposition,
SequencePass,
SynthesiseTket,
DecomposeBoxes,
Expand Down Expand Up @@ -165,7 +166,10 @@ def default_compilation_pass(self, optimisation_level: int = 2) -> BasePass:
)
passlist.append(NaivePlacementPass(self.backend_info.architecture)) # type: ignore
if optimisation_level == 2:
passlist.append(CliffordSimp(False))
# Add some connectivity preserving optimisations after routing.
passlist.extend(
[KAKDecomposition(allow_swaps=False), CliffordSimp(allow_swaps=False)]
)
if optimisation_level > 0:
passlist.append(SynthesiseTket())
passlist.append(self.rebase_pass())
Expand Down

0 comments on commit b444f2e

Please sign in to comment.