Skip to content

Commit

Permalink
update error message for large classical registers (#124)
Browse files Browse the repository at this point in the history
* update error message for large classical registers

* fix format

* remove linebreak
  • Loading branch information
cqc-melf authored Mar 5, 2024
1 parent 766fe77 commit 1685820
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pytket/qir/conversion/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ def pytket_to_qir(

for creg in circ.c_registers:
if creg.size > 64:
raise ValueError("classical registers must not have more than 64 bits")
raise ValueError(
"""classical registers must not have more than 64 bits, \
you could try to set cut_pytket_register=True in the conversion"""
)

m = tketqirModule(
name=name,
Expand Down

0 comments on commit 1685820

Please sign in to comment.