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

ScheduleBlock 2/4 - add Call instruction #5781

Merged
merged 84 commits into from
Feb 25, 2021

Conversation

nkanazawa1989
Copy link
Contributor

@nkanazawa1989 nkanazawa1989 commented Feb 3, 2021

Summary

This is 2/4 step of ScheduleBlock implementation #5679

Details and comments

This PR adds Call instruction to pulse instruction set. This instruction is not exposed to end users. However, it implicitly wraps schedules or circuits when pulse.call function is used within the pulse builder context. The Call instruction explicitly defines a subroutine that is defined outside of the current scope, thus the Qiskit compiler will be able to generate better target code, i.e. the compiler can avoid defining duplicated subprograms multiple times. The logic of the pulse builder is slightly updated to introduce this instruction.

@nkanazawa1989
Copy link
Contributor Author

Thanks, I updated docstrings accordingly, and updated the logic of call function. Now we can handle parameters as kwargs at the builder level, i.e.

with pulse.build() as sched:
   pulse.call(subroutine, amp=0.1, sigma=40, ...)

@nkanazawa1989
Copy link
Contributor Author

@taalexander Thanks! I updated parameter handling based on your suggestion.

@mergify mergify bot merged commit c556aa9 into Qiskit:master Feb 25, 2021
@nkanazawa1989 nkanazawa1989 deleted the issue-5679-2_schedule_block branch November 25, 2022 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants