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

Fixes #4774. Addresses schedule inserts for long sequences. #4783

Closed
wants to merge 0 commits into from

Conversation

ehchen
Copy link
Contributor

@ehchen ehchen commented Jul 23, 2020

Summary

Pulse transforms need proper inserts to schedule so that longer sequences don't fail.

Details and comments

This addresses bug #4774, so no release note or docstrings were modified. No tests were included. I believe tests included in the PR for #4755 should have caught this error. I ran both tox -py38 and tox -elint successfully.
Thanks to @nkanazawa1989 and @taalexander for identification and proposing the solution to the problem.

Changelog: Bugfix Fixed

@ehchen ehchen requested review from DanPuzzuoli, eggerdj, nkanazawa1989 and a team as code owners July 23, 2020 01:43
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Edward Chen seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@nkanazawa1989
Copy link
Contributor

nkanazawa1989 commented Jul 23, 2020

Hi @ehchen, << is the syntax sugar of shift method and the replaced insert method has different behavior. Please make sure the transformed schedule represents the same instruction allocation. I also noticed we don't have unittest for equality check of transformed schedule, i.e. there are checks only for compression and the equality of compressed schedule is not guaranteed. I think we should add this kind of test.

I think a test for a large schedule compression should be included in this PR since the situation may be different. I don't know the best way to test this, because having dependency on ignis (like the code I wrote in the issue) is not good idea and pickling the schedule may cause another trouble with some update of the schedule class (we don't have serialization framework for schedule). I tried to append a gaussian pulse instruction multiple times (~1000) but this doesn't crash the program.

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.

3 participants