Skip to content

Commit

Permalink
Update predicates_test.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sjdilkes committed Oct 30, 2024
1 parent 60cccf6 commit dc84f47
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pytket/tests/predicates_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -846,6 +846,14 @@ def test_conditional_phase() -> None:
assert any(any_check_list)


def test_rz_sx_decomp() -> None:
c = Circuit(1).TK1(0, 1.5, 0, 0)
AutoRebase({OpType.CX, OpType.SX, OpType.Rz}).apply(c)
comp = Circuit(1).Rz(1, 0).SX(0).Rz(1, 0)
comp.add_phase(1.75)
assert c == comp


def test_flatten_relabel_pass() -> None:
c = Circuit(3)
c.H(1).H(2)
Expand Down Expand Up @@ -1112,3 +1120,4 @@ def test_auto_rebase_deprecation(recwarn: Any) -> None:
test_rebase_custom_tk2()
test_selectively_decompose_boxes()
test_clifford_push_through_measures()
test_rz_sx_decomp()

0 comments on commit dc84f47

Please sign in to comment.