mitiq
mitiq copied to clipboard
Mapping Qiskit registers via transpilation passes
Issue Description
We currently have a functions to change the qubit and bit registers in Qiskit circuits (see e.g. this). They are necessary for having consistent names in conversions.
However those functions touch very low-level (sometimes private) attributes of the QuantumCircuit
class and are therefore subject to bugs, especially when new Qiskit versions are released.
Proposed Solution
In this PR https://github.com/unitaryfund/mitiq/pull/1421 it has been suggested to transform quantum and classical registers with Qiskit transpilation passes. This method is probably more stable.
In this PR https://github.com/unitaryfund/mitiq/pull/1421 it has been suggested to transform quantum and classical registers with Qiskit transpilation passes. This method is probably more stable.
I think the same might apply to _add_identity_to_idle
, _remove_identity_from_idle
, and other circuit transformations. Even the "executor" itself.