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

Bugfix: transpile() fails in a circuit with delay ops. #151

Merged
merged 3 commits into from
Mar 5, 2025

Conversation

smite
Copy link
Member

@smite smite commented Feb 27, 2025

  • IQMOptimizeSingleQubitGates now accepts delay operations.

@smite smite self-assigned this Feb 27, 2025
@smite smite requested review from Jajiko, Aerylia and jkotilahti and removed request for jkotilahti February 27, 2025 14:29
@Aerylia
Copy link
Contributor

Aerylia commented Feb 28, 2025

Hmm. Is there a nice way to make this fix more general rather than hardcode which gates commute with Rzs? So that with the next new gate, the fix still works

@smite
Copy link
Member Author

smite commented Mar 3, 2025

Hmm. Is there a nice way to make this fix more general rather than hardcode which gates commute with Rzs? So that with the next new gate, the fix still works

Ideally the entire single-qubit gate optimization pass should be included in Qiskit itself.
The Qiskit transpiler should know which circuit operations commute with one another, since it has this pass, maybe we could use something like it instead of mapping gate names explicitly to their RZ commutation properties in the if/elif, eventually.

@Aerylia
Copy link
Contributor

Aerylia commented Mar 5, 2025

Yeah, something along those lines. Let's make it a separate ticket, so that this can be merged.

Copy link
Contributor

@Aerylia Aerylia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.
Needs an additional ticket for automatic checking of the gate commutation in the optimization pass.

@smite smite merged commit d671d72 into main Mar 5, 2025
15 checks passed
@smite smite deleted the bugfix_transpiler_refuses_delay branch March 5, 2025 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants