Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explore the possibility of supporting Qiskit barriers #1391

Open
andreamari opened this issue Jul 8, 2022 · 2 comments · May be fixed by #1830
Open

Explore the possibility of supporting Qiskit barriers #1391

andreamari opened this issue Jul 8, 2022 · 2 comments · May be fixed by #1830
Assignees
Labels
feature-request A request for a feature, tool, or workflow in Mitiq. interface-and-conversions How Mitiq interfaces with quantum software packages. priority/mid Should be fixed by the next 1-2 milestones.

Comments

@andreamari
Copy link
Member

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.

@andreamari andreamari added priority/mid Should be fixed by the next 1-2 milestones. interface-and-conversions How Mitiq interfaces with quantum software packages. feature-request A request for a feature, tool, or workflow in Mitiq. Qiskit labels Jul 8, 2022
@natestemen natestemen removed the Qiskit label Nov 3, 2022
@Aaron-Robertson
Copy link
Contributor

Aaron-Robertson commented Apr 27, 2023

How about a custom placeholder gate, like this (Thanks to Dr. E. Z. with the assist 🤖😉):
image

@Misty-W
Copy link
Contributor

Misty-W commented Apr 28, 2023

Nice idea!
What happens when converted to QASM?

@Aaron-Robertson Aaron-Robertson self-assigned this Apr 28, 2023
@Aaron-Robertson Aaron-Robertson linked a pull request May 12, 2023 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A request for a feature, tool, or workflow in Mitiq. interface-and-conversions How Mitiq interfaces with quantum software packages. priority/mid Should be fixed by the next 1-2 milestones.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants