3 #include <unordered_map>
17 std::string kernelName;
19 std::unordered_map<std::string, int> gateCountBefore;
20 std::unordered_map<std::string, int> gateCountAfter;
24 static std::unordered_map<std::string, int>
25 countGates(
const std::shared_ptr<CompositeInstruction> &program);
27 std::string toString(
bool shortForm =
true)
const;
32 PassManager(
int level,
const std::vector<int> &qubitMap = {},
const std::string &placementName =
"");
34 static PassStat runPass(
const std::string &passName, std::shared_ptr<CompositeInstruction> program);
36 static constexpr
const char *DEFAULT_PLACEMENT =
"swap-shortest-path";
38 void applyPlacement(std::shared_ptr<CompositeInstruction> program)
const;
43 optimize(std::shared_ptr<CompositeInstruction> program)
const;
47 static const constexpr
char *
const LEVEL1_PASSES[] = {
51 "single-qubit-gate-merging",
57 static const constexpr
char *
const LEVEL2_PASSES[] = {
59 "single-qubit-gate-merging",
63 "two-qubit-block-merging",
66 "single-qubit-gate-merging",
73 std::vector<int> m_qubitMap;
74 std::string m_placement;