Skip to content

Commit

Permalink
made cp gates get transpiled to achieve better depth in some cases
Browse files Browse the repository at this point in the history
  • Loading branch information
positr0nium committed Jun 23, 2024
1 parent 942de73 commit 4e1792e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/qrisp/core/compilation.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ def allocation_level_transpile_predicate(op):

# Transpile logic synthesis
def logic_synth_transpile_predicate(op):
return isinstance(op, LogicSynthGate)
return (isinstance(op, LogicSynthGate)
or (op.name == "cp" and op.num_qubits == 2)
or allocation_level_transpile_predicate(op))

reordered_qc = transpile(
reordered_qc, transpile_predicate = logic_synth_transpile_predicate)
Expand Down

0 comments on commit 4e1792e

Please sign in to comment.