Skip to content

Commit

Permalink
Read max classical register width from backend info (#458)
Browse files Browse the repository at this point in the history
  • Loading branch information
cqc-alec authored Jul 12, 2024
1 parent 73bea9f commit 597eebc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
5 changes: 5 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
~~~~~~~~~

Unreleased
----------

* Determine maximum classical register width from backend info.

0.36.0 (July 2024)
------------------

Expand Down
10 changes: 7 additions & 3 deletions pytket/extensions/quantinuum/backends/quantinuum.py
Original file line number Diff line number Diff line change
Expand Up @@ -1025,9 +1025,13 @@ def process_circuits(
quantinuum_circ = circuit_to_qasm_str(
c0,
header="hqslib1",
maxwidth=32,
# TODO Get maxwidth from self.backend_info once
# https://github.com/CQCL/tket/issues/1445 fixed in pytket
maxwidth=(
self.backend_info.misc.get(
"max_classical_register_width", 32
)
if self.backend_info
else 32
),
)
used_scratch_regs = _used_scratch_registers(quantinuum_circ)
for name, count in Counter(
Expand Down

0 comments on commit 597eebc

Please sign in to comment.