-
Notifications
You must be signed in to change notification settings - Fork 368
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
Support SwitchCaseOp
that will be released in qiskit-terra 0.24.0
#1778
Conversation
Qiskit-Terra added a new instruction of control-flow `SwitchCaseOp`. This commit enables Aer to simulate `SwitchCaseOp` by converting its conditions and bodies with `AerMark` and `AerJump`.
c0d481f
to
0338689
Compare
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.
Thanks Hiroshi, it's great to have the PR for this support so quickly!
@jakelishman Thanks. With you comments, codes became much simpler, I think. |
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.
In principle I think this looks fine. We should probably wait until Terra 0.24 is released properly before merge, though, so we don't need the Aer temporaries.
@jakelishman thank you for your review. terra 0.24.0 was released and I changed this PR to use its |
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.
Given my previous review, this now looks good to merge from me, thanks!
…iskit#1778) * Add support of `SwitchCaseOp` Qiskit-Terra added a new instruction of control-flow `SwitchCaseOp`. This commit enables Aer to simulate `SwitchCaseOp` by converting its conditions and bodies with `AerMark` and `AerJump`. * add switch_case temporarily until qiskit-terra 0.24.0 is released. * simplify switch compilation * use SwitchCaseOp of terra * fix lint errors
Summary
Add support of
SwitchCaseOp
Details and comments
Until 0.24.0 is released,
SwitchCaseOp
defined inqiskit_aer/library/control_flow_instructions/switch_case.py
is used. Once 0.24.0 is released, the second commit should be reset.This will resolve #1759.