mitiq icon indicating copy to clipboard operation
mitiq copied to clipboard

Mapping Qiskit registers via transpilation passes

Open andreamari opened this issue 2 years ago • 2 comments

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.

andreamari avatar Aug 03 '22 17:08 andreamari

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.

1ucian0 avatar Aug 04 '22 05:08 1ucian0

Giving this a shot :+1:

Edit:

Rahul-Mistri avatar Sep 18 '22 17:09 Rahul-Mistri