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

🐛 BackendV2 unnecessarily transpiles supported gates #290

Closed
andresbar98 opened this issue Sep 5, 2023 · 1 comment · Fixed by #352
Closed

🐛 BackendV2 unnecessarily transpiles supported gates #290

andresbar98 opened this issue Sep 5, 2023 · 1 comment · Fixed by #352
Labels
bug Something isn't working python Pull requests that update Python code

Comments

@andresbar98
Copy link
Contributor

andresbar98 commented Sep 5, 2023

Environment information

Python

Description

Due to a bug, Qiskit transpiles single-qubit gates to u1, u2, or u3 gates even though the original gates are in the target gateset. This is being tracked upstream at Qiskit/qiskit#10568.
As a consequence, the new V2 backends in DDSIM actually transpile circuits containing such gates.
In most of the cases, MQT Core and the corresponding parser should be clever enough to reconstruct the original gate, but it is still not ideal.
This issue acts as a tracker for the upstream issue in Qiskit. Once that is resolved, we should more-or-less automatically benefit from it and can enable the respective tests again.

Expected behavior

Backends should not transpile gates that they declare to support.

How to Reproduce

Uncomment the respective lines in the test/python/test_target.py file and run the tests.

@burgholzer burgholzer changed the title 🐛 Wrong transpilation of single qubit gates (BackendV2) 🐛 BackendV2 unnecessarily transpiles supported gates Sep 5, 2023
@burgholzer
Copy link
Member

The upstream issue has been resolved and will be part of qiskit 0.45.2.
Once that has dropped, we should be able to close this issue.

@burgholzer burgholzer moved this to In Progress in MQT Dec 13, 2023
@burgholzer burgholzer moved this to In Progress in MQT Simulation Dec 13, 2023
@burgholzer burgholzer added bug Something isn't working python Pull requests that update Python code labels Dec 13, 2023
burgholzer added a commit that referenced this issue Feb 21, 2024
## Description

This PR removes the test workaround for the Qiskit target support.
Qiskit no longer unnecessarily transpiles gates that are natively
supported.

Fixes #290 

## Checklist:

<!---
This checklist serves as a reminder of a couple of things that ensure
your pull request will be merged swiftly.
-->

- [x] The pull request only contains commits that are related to it.
- [x] I have added appropriate tests and documentation.
- [x] I have made sure that all CI jobs on GitHub pass.
- [x] The pull request introduces no new warnings and follows the
project's style guidelines.

Signed-off-by: burgholzer <burgholzer@me.com>
@github-project-automation github-project-automation bot moved this from In Progress to Done in MQT Simulation Feb 21, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in MQT Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working python Pull requests that update Python code
Projects
Archived in project
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants