Skip to content

Commit

Permalink
test: add test for issue #237
Browse files Browse the repository at this point in the history
  • Loading branch information
qartik committed Oct 4, 2024
1 parent c758863 commit 18d1b46
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_phirgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,3 +486,12 @@ def test_condition_multiple_bits() -> None:
},
],
}


def test_unused_classical_registers() -> None:
"""From https://github.com/CQCL/pytket-phir/issues/237 ."""
circ = Circuit()
_ = circ.add_c_register("a", 1)
phir = json.loads(pytket_to_phir(circ))

assert phir["ops"] != []

0 comments on commit 18d1b46

Please sign in to comment.