from pytket.circuit import Circuit
from pytket.phir.api import pytket_to_phir
c = Circuit(1)
a = c.add_c_register("a", 1)
b = c.add_c_register("b", 1)
c.add_c_copyreg(a, b)
phir = pytket_to_phir(c)
Output:
Traceback (most recent call last):
File "/home/alec/r/pytket-phir/classical.py", line 10, in <module>
phir = pytket_to_phir(c)
File "/home/alec/r/pytket-phir/pytket/phir/api.py", line 54, in pytket_to_phir
shards = sharder.shard()
File "/home/alec/r/pytket-phir/pytket/phir/sharding/sharder.py", line 73, in shard
self._process_command(command)
File "/home/alec/r/pytket-phir/pytket/phir/sharding/sharder.py", line 105, in _process_command
self._add_pending_sub_command(command)
File "/home/alec/r/pytket-phir/pytket/phir/sharding/sharder.py", line 195, in _add_pending_sub_command
qubit_key = command.qubits[0]
IndexError: list index out of range
(I have seen #25 and maybe this is covered by that but it looks like a different issue since from the description there I would have expected a NotImplementedError.)
Output:
(I have seen #25 and maybe this is covered by that but it looks like a different issue since from the description there I would have expected a
NotImplementedError
.)