We've made some improvements in the past to refactor some of the more involved code on the qiskit_to_tk direction (converting qiskit QuantumCircuit to a pytket Circuit. See #313
The tk_to_qiskit direction is now the more problematic and messy part of the code. I found it a bit of a pain to work with during the qiskit v2 upgrade. I think it would be worth looking for oppurtunities to simplify the tk_to_qiskit converter (particularly the apply_tk_command_to_qiskit function here) to reduce maintence overhead
EDIT: We could refactor the handling of OpType.Conditional as well as most of the boxes out as separate helper functions. This would shorten the apply_tk_command_to_qiskit function and make the code a bit easier to follow.
We've made some improvements in the past to refactor some of the more involved code on the
qiskit_to_tkdirection (converting qiskitQuantumCircuitto a pytketCircuit. See #313The
tk_to_qiskitdirection is now the more problematic and messy part of the code. I found it a bit of a pain to work with during the qiskit v2 upgrade. I think it would be worth looking for oppurtunities to simplify thetk_to_qiskitconverter (particularly theapply_tk_command_to_qiskitfunction here) to reduce maintence overheadEDIT: We could refactor the handling of
OpType.Conditionalas well as most of the boxes out as separate helper functions. This would shorten theapply_tk_command_to_qiskitfunction and make the code a bit easier to follow.