Closed fuglede closed 10 months ago
As a workaround, I can remove the broken import on qiskit_convert.py:72
, and change qiskit_convert.py:637
from
if b.reg_name != _TEMP_BIT_NAME and (
to
if b.reg_name != 60 and (
and get something that seems to work (without knowing what _TEMP_BIT_NAME
was supposed to be).
Yes, the latest update to pytket (1.19) requires that pytket-qiskit also be updated. Please could you update to the latest pytket-qiskit and try again? Thanks!
Closing this: please reopen if still an issue after updating pytket.
The versions above were obtained by installing the packages in a blank environment (alongside a handful of other packages), so Pip's solver found the versions to be compatible; maybe some constraints are missing in the dependency specification of pytket
then?
Moreover, if I run pip install --upgrade pytket-qiskit
, it mages to go from 0.39.0 to 0.44.0, but the exact same error occurs.
Looks like I can't reopen the issue.
You probably have to pip install --upgrade pytket
as well.
This was in fact a bug, in that we updated pytket without realizing that doing so would break pytket-qiskit: we normally try to keep backwards compatibility in pytket 1.x releases, but forgot that some of the extensions import underscored symbols which aren't covered by that guarantee.
That takes me from pytket-1.19.1
to pytket-1.20.1
; the error persists.
Edit; sorry, what's failing is a manual run of
from pytket._tket.circuit import _TEMP_BIT_NAME
but I noticed qiskit_convert.py
effectively branches on version numbers now, avoiding this import, so this isn't an issue in practice.
OK, sorry for the inconvenience this has caused.
No worries, thanks for your work on TKET!
I used the above suggestion, but it's still showing the same issue
cannot import name '_TEMP_BIT_NAME' from 'pytket._tket.circuit
I used the above suggestion, but it's still showing the same issue
cannot import name '_TEMP_BIT_NAME' from 'pytket._tket.circuit
Is this using pytket-qiskit? Which version?
When installing
pytket
in a fresh environment, using Python 3.11/Pip from Conda, then Pip to resolve all dependencies, I get the below error when importing anything the Qiskit-TKET converters. Versions are:The full traceback is below: