-
Notifications
You must be signed in to change notification settings - Fork 31
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
HDAWG: Iteration dispatch to linspace, step and unroll #863
Comments
|
I cannot claim a detailed penetration, but generally feel that a solution working reliably for charge scans is a high priority, wheras for more powerful capabilities this is not clearly the case.
From: Simon Humpohl ***@***.***>
Sent: Freitag, 21. Juni 2024 17:12
To: qutech/qupulse ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [qutech/qupulse] HDAWG: Iteration dispatch to linspace, step and unroll (Issue #863)
Currently, the linspace builder just supports iterations that linearly change output voltages (and in principle times) with the loop index of an iteration.
The HDAWG however has three ways to represent iteration that a real world program might mix:
1. Linspace changes of pulse playback amplitude or hold duration
2. Indexed stepping through command table entries
3. Complete unroll
Especially 1 and 2 can coexist in the same iteration, f.i. we can change the constant output of channel one and modify the waveform shape of channel two.
The intended idea behind the program builder interface is that the program builder can inspect upon the first iteration if the body is linspace representable, stepping representable, or must be unrolled.
The bad thing is that the original idea to implement this via exceptions upon invalid expression evaluations is not possible because the program builder cannot catch those.
For linspace vs. stepping we need to distinguish between any scaled playback and a deferred build_waveform evaluation that allows unrolling the waveform building for this particular operation only.
A complete unroll is necessary if the number of operations changes over the iterations. This will occur if a waveform evaluates to zero in only a subset of iterations or an inner loop(iteration or repetition) depends on the index.
We need a way to insert proper branching at waveform build time, i.e. we need a way to interact with the waveform building process. Any simplification of the waveform building currently happens due to dispatch in the pulse template. F.i. the ConstantPT calls hold_voltage instead of play_waveform.
The following could help but increases complexity
class WayveformBuilder:
def build_waveform(self, parameter, channel_mapping):
pass
class ProgramBuilder:
def play_arbitrary_waveform(self, waveform_builder, parameter, channel_mapping):
# implementation in HDAWG
try:
hw_waveform = waveform_builder.build_waveform(parameters, channel_mapping)
except HWExpressionError:
stepped_waveform = []
for multi_idx, inner_scope in self.iter_scopes(parameters):
stepped_waveform[multi_idx] = waveform_builder.build_waveform(inner_scope, channel_mapping)
```
—
Reply to this email directly, view it on GitHub<#863>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACL4IMQMXAW3TFAPM2PLS73ZIQ7DHAVCNFSM6AAAAABJWE5K32VHI2DSMVQWIX3LMV43ASLTON2WKOZSGM3DMNZUGQ3TCOI>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, the linspace builder just supports iterations that linearly change output voltages (and in principle times) with the loop index of an iteration.
The HDAWG however has three ways to represent iteration that a real world program might mix:
Especially 1 and 2 can coexist in the same iteration, f.i. we can change the constant output of channel one and modify the waveform shape of channel two.
The intended idea behind the program builder interface is that the program builder can inspect upon the first iteration if the body is linspace representable, stepping representable, or must be unrolled.
The bad thing is that the original idea to implement this via exceptions upon invalid expression evaluations is not possible because the program builder cannot catch those.
For linspace vs. stepping we need to distinguish between any scaled playback and a deferred build_waveform evaluation that allows unrolling the waveform building for this particular operation only.
A complete unroll is necessary if the number of operations changes over the iterations. This will occur if a waveform evaluates to zero in only a subset of iterations or an inner loop(iteration or repetition) depends on the index.
We need a way to insert proper branching at waveform build time, i.e. we need a way to interact with the waveform building process. Any simplification of the waveform building currently happens due to dispatch in the pulse template. F.i. the ConstantPT calls
hold_voltage
instead ofplay_waveform
.The following could help but increases complexity
The text was updated successfully, but these errors were encountered: