Skip to content

Commit

Permalink
Temporarily restrict maximum classical register width to 32 (#455)
Browse files Browse the repository at this point in the history
  • Loading branch information
cqc-alec authored Jun 14, 2024
1 parent 0b55ea4 commit 6186dea
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
6 changes: 6 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Changelog
~~~~~~~~~

Unreleased
----------

* Restrict classical registers to a maximum size of 32 (until pytket can
support larger values).

0.34.0 (June 2024)
------------------

Expand Down
7 changes: 3 additions & 4 deletions pytket/extensions/quantinuum/backends/quantinuum.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,6 @@ def _dict_to_backendinfo(
dct1["system_type"] = "local_emulator"
dct1.pop("emulator", None)
dct1["batching"] = False
dct1["cl_reg_width"] = 32 if n_qubits <= 32 else 64
return BackendInfo(
name=cls.__name__,
device_name=name + "LE" if local_emulator else name,
Expand Down Expand Up @@ -1026,9 +1025,9 @@ def process_circuits(
quantinuum_circ = circuit_to_qasm_str(
c0,
header="hqslib1",
maxwidth=self.backend_info.misc["cl_reg_width"]
if self.backend_info
else 32,
maxwidth=32,
# TODO Get maxwidth from self.backend_info once
# https://github.com/CQCL/tket/issues/1445 fixed in pytket
)
used_scratch_regs = _used_scratch_registers(quantinuum_circ)
for name, count in Counter(
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/api1_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,6 @@ def test_available_devices(
"syntax_checker": "H9-27SC",
"batching": True,
"wasm": True,
"cl_reg_width": 32,
}
assert backinfo0.name == "QuantinuumBackend"

Expand All @@ -519,7 +518,6 @@ def test_available_devices(
"syntax_checker": "H9-27SC",
"batching": False,
"wasm": True,
"cl_reg_width": 32,
}
assert backinfo1.name == "QuantinuumBackend"

Expand Down

0 comments on commit 6186dea

Please sign in to comment.