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

Fix compiler adding phases to flux pulses #1099

Open
wants to merge 1 commit into
base: 0.1
Choose a base branch
from
Open

Conversation

stavros11
Copy link
Member

Current compiler adds the virtual-z phases to flux pulses in addition to the drive ones. This should not have any effect since flux pulses are DC, but it is probably better to remove to be on the safe side.

@igres26 I have not tested on hardware, but this should remove the frame rotations of the flux channel from the qua script.

Copy link

codecov bot commented Nov 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.88%. Comparing base (49b6572) to head (a678413).

Additional details and impacted files
@@           Coverage Diff           @@
##              0.1    #1099   +/-   ##
=======================================
  Coverage   69.88%   69.88%           
=======================================
  Files          64       64           
  Lines        6880     6880           
=======================================
  Hits         4808     4808           
  Misses       2072     2072           
Flag Coverage Δ
unittests 69.88% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@alecandido alecandido left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even fine. But as you said, they are DC pulses, so there is no modulation process involved, and no I and Q components. Being just a real number, the phase can only be ignored...

@stavros11
Copy link
Member Author

stavros11 commented Nov 15, 2024

Even fine. But as you said, they are DC pulses, so there is no modulation process involved, and no I and Q components. Being just a real number, the phase can only be ignored...

Regarding QM in particular, the issue is that when the driver sees relative_phase != 0 in the pulse, it adds the corresponding frame_rotation commands in the QUA program, regardless of the pulse type. I would expect these to have no effect for DC pulses, but as usual, I am not sure how the instrument behaves in this case, so the safest approach is to just drop these commands. Note that this PR doesn't really fix this issue, it only fixes it for circuit execution, which is where @igres26 discovered it. Users are still able to define FluxPulses with phases and these will cause the frame_rotation, but in that case I would say it is the user's responsibility.

The open question is whether we actually want to enforce zero-phases for DC or leave it up to the user. Worrying more about 0.2 (since 0.1 will soon be deprecated), I would probably leave it up to the user, because neither pulse types nor frequencies are in the Pulse, so the Pulse object itself has no information if its a DC or no (it depends on the channel it will play.

I would still make sure that the 0.2 compiler is correct in that regard, so basically just port this PR (if still needed).

Another option is to fix this internally in the QM driver (ignore .relative_phase for pulses playing on DC channels), however I am not a big fan of this approach because it is like quietly enforcing this and then we would also have to make sure that other drivers do the same.

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.

2 participants