Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add StagedPassManager class for pass manager with defined stages #6403
Add StagedPassManager class for pass manager with defined stages #6403
Changes from 9 commits
e45b115
90c242c
c9a0ab4
53f34ba
1bebc51
76ffb74
c86a7fb
f177d5f
cc3c4fd
1937354
b392a45
f30ee80
f336a34
8637fa1
06582d4
35a8db9
10f543d
ff55b06
5e5657e
aa1db1f
d654b94
c51518f
f6cbb55
445fdfb
e34cbb8
5e007f3
14494db
897678c
8414533
75e3d41
7c14a6e
37ad778
a2472f2
c5ac5f6
af9e244
5a446a0
2205e3e
7b225ff
0329fb3
5325217
8b27565
7a8a675
4063b13
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think better names for these sort of functions would be
default_*_passmanager
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to me more like optimization or translation. Pulse gate is indeed a
Schedule
but this is used to override the instruction set. Updating the instruction set doesn't perform any scheduling.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I put it in scheduling since it was done after the optimization loop. I can make it a post-optimization stage or a pre-scheduling stage if you'd prefer that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Post-optimization sounds good to me. I still think we can have this in translation, because gate with calibration doesn't need to be translated or decomposed. For example, if I calibrate a CCX for (0, 1, 2), what I want to do would be
however, in this code,
ccx
is translated before reaching to the pulse gate pass. And no calibration is attached because noccx
primitive exist in the circuit. However, I cannot addccx
to basis gates because I have no calibration for ccx(1, 2, 0). This is why I want to move the pass before translation. Actually, we need to call pulse gate pass twice before and after the translation, because we may also want to add calibration for basis gates. Perhaps this can be solved with Target.