-
Notifications
You must be signed in to change notification settings - Fork 17
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
Convert all QM sweepers to absolute #1018
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 0.2 #1018 +/- ##
==========================================
- Coverage 51.86% 51.71% -0.16%
==========================================
Files 58 58
Lines 2765 2777 +12
==========================================
+ Hits 1434 1436 +2
- Misses 1331 1341 +10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Thanks for the PR @stavros11. |
I would also say that even that is "absolute". Not the absolute value on the line, but that's the absolute value of the amplitude of the flux pulse itself, that's exactly the sweeper parameter. The offset is a different thing, generated differently (not "pulsed"), though on the same line. |
2baee43
to
b3e6b71
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.
Just to understand: while I'm fine with lifting the check from the frequency sweeper method earlier (such that _frequency
is more minimal and standard, and the check happens as early as possible), I'm not sure I understood why now you need to preprocess amplitude sweepers, while before you didn't.
True that you're now normalizing the amplitude, but this seems an element-wise operation...
I'm not even sure why you need the max(abs(values))
in sweeper_amplitude
, since I just expected the normalization with the maximum range (i.e. just the division by a constant).
Co-authored-by: Alessandro Candido <[email protected]>
for more information, see https://pre-commit.ci
0ecd845
to
cef71e4
Compare
Another reason I moved this was to eliminate most arguments in the sweeper functions (
I probably didn't document it very well and maybe there are different ways to make it work. In summary, the issue is that the amplitude of the original pulse may not be sufficient to reach all the values in the sweeper, because |
Yes, that's what I meant by minimal and standard.
Perfect, thanks for the explanation.
It's almost 10^-5, I'd say we really don't have that sensitivity... |
I see that #1001 is also rebased on top of this and it works on hardware so I’ll merge. Further testing would help to make sure that different sweep cases (including nested and parallel combinations) work as expected but we’re already aware that we need to improve testing in 0.2. |
Following the discussion in #540, this PR makes all QM sweepers absolute. Since
SweeperType
is already dropped in 0.2, this will also close the issue.I tested on hardware with the Rabi routine using an absolute amplitude sweeper: http://login.qrccluster.com:9000/XftyLYqDSsG8xBCkcz6ibg==
In this case, the same amplitude range is used on all qubits. It is possible to use a different range per qubit using parallel sweepers (#1008), but I have not tested this.
@alecandido @andrea-pasquale note that although all amplitude sweepers are now absolute (no more factors and multiplications), flux pulses are always played on top of the DC offset (sweetspot). This is true even when not sweeping. Therefore, amplitude sweeps on flux pulses will also be played on top of the DC offset. I could change this behavior to zero the offset when we are sweeping flux pulses, however I don't think we want that, since in most cases we are operating all qubits at their sweetspot. Moreover, we already provide an interface to temporarily change the DC offset for one execution, by passing an alternate
DcConfig
when callingplatform.execute
.EDIT: In contrast,
Parameter.offset
sweeps are really absolute, not around the sweetspot like in 0.1, because there we are sweeping the offset value directly (not a pulse amplitude on top).