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

transpile unrolls even when basis_gates=None #3017

Closed
ajavadia opened this issue Aug 21, 2019 · 1 comment · Fixed by #4263
Closed

transpile unrolls even when basis_gates=None #3017

ajavadia opened this issue Aug 21, 2019 · 1 comment · Fixed by #4263
Assignees
Labels
bug Something isn't working priority: high status: pending PR It has one or more PRs pending to solve this issue
Milestone

Comments

@ajavadia
Copy link
Member

The intention in the transpile() function was that if basis_gates is not specified, all gates are fair game and no explicit unrolling will be done (see docstring)

This behavior broke in #2357 when u3 and cx were added to all basis. This means that some explicit unrollings could happen.

This can be fixed in 2 ways:

  • Set the basis gates as the full set of gates in the original circuit. If any pass happens to add to this set, enlarge the basis gates (so basis_gates has to be stored in property set and Unroller read from there)

  • Modify the unroller to not do anything when basis_gates=None. This will be faster, as the Unroller won't even pass through the circuit once.

@1ucian0 1ucian0 self-assigned this Aug 21, 2019
@1ucian0
Copy link
Member

1ucian0 commented Aug 26, 2019

Modify the unroller to not do anything when basis_gates=None. This will be faster, as the Unroller won't even pass through the circuit once.

This can also be fixed at preset pass manager level, by avoiding adding the unroller to the scheduler if basis_gates is None.

@1ucian0 1ucian0 added the bug Something isn't working label Dec 19, 2019
@ajavadia ajavadia added this to the 0.14 milestone Apr 10, 2020
@1ucian0 1ucian0 added the status: pending PR It has one or more PRs pending to solve this issue label Apr 25, 2020
@mergify mergify bot closed this as completed in #4263 Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority: high status: pending PR It has one or more PRs pending to solve this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants