In principle, Mitiq should preserve the structure of input circuits as much as possible, apart from the transformations that are necessary for error mitigation (e.g. unitary folding).
For this reason it would be great if Qiskit barriers could be preserved. See this link for more info on barriers.
Unfortunately, since there is not a "barrier gate" in Cirq, this is not easy.
The current approach is quite brute-force since we just remove all barriers from qiskit circuits.
However this is not ideal and the user should at least be aware of this.
Proposed Solution
The first part of this issue is exploring/proposing a possible solution. Maybe there is a simple solution. Maybe not.
The second part of this issue is implementing a potential solution or, in the worst case, keeping the current code
but at least warning the user that barriers are not supported and so they are removed.
In principle, Mitiq should preserve the structure of input circuits as much as possible, apart from the transformations that are necessary for error mitigation (e.g. unitary folding).
For this reason it would be great if Qiskit barriers could be preserved. See this link for more info on barriers. Unfortunately, since there is not a "barrier gate" in Cirq, this is not easy.
The current approach is quite brute-force since we just remove all barriers from qiskit circuits. However this is not ideal and the user should at least be aware of this.
Proposed Solution
The first part of this issue is exploring/proposing a possible solution. Maybe there is a simple solution. Maybe not.
The second part of this issue is implementing a potential solution or, in the worst case, keeping the current code but at least warning the user that barriers are not supported and so they are removed.