Skip to content

Integer Channel numeration in LinSpaceBuilder makes awg assignment difficult #869

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

Open
Nomos11 opened this issue Jul 5, 2024 · 5 comments

Comments

@Nomos11
Copy link
Collaborator

Nomos11 commented Jul 5, 2024

Translating the ChannelIDs to integers in the LinSpaceBuilder makes it difficult to spread the program to multiple AWGs. In the current master branch, using multiple AWGs for a LinSpace program is not possible.

@Nomos11
Copy link
Collaborator Author

Nomos11 commented Jul 5, 2024

I feel like this could be solved by either adding metadata to the program, or have the channels be ChannelIDs still.

This can also get rid of having to supply the channels into the linspacebuilder when building the program

@shumpohl
Copy link
Member

The idea is to use a builder for each AWG. This also leads to easier programs for the awg

channel_sets = [('HDAWG_1_A', ), ("HDAWG_2_C", "HDAWG_2_D")]
for channel_set, awg in zip(channel_sets, awgs):
    awg_program = pt.create_program(channel_set, builder=awg.get_builder(), ...)
    awg.upload(program_name, awg_program, ...)

@Nomos11
Copy link
Collaborator Author

Nomos11 commented Feb 14, 2025

will that idea be relevant for 1.0?
otherwise, for readability it may still be worthwile considering to have ChannelIDs as identifiers, or what would be the drawback?
(it may be favorable fofr the awg driver afterwards)

@shumpohl
Copy link
Member

The drawback is that you have to use dictionaries everywhere which makes the code more complex, iteration orders path dependent and the structures unhashable. Although we can use frozendict which is already a dependency anyways.

@Nomos11
Copy link
Collaborator Author

Nomos11 commented Feb 14, 2025

(for the actual translation to the awg program so far i only needed the final commands to be hashable, which would still be given with ChannelIDs I think)
are hashable structures needed elsewhere so far? most dataclasses don't seem frozen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants