Store all signal and improve structuce of signal line #29
Labels
can-wait
Not working, not urgent
enhancement
New feature or request
good first issue
Good for newcomers
Milestone
At the moment, most devices have a
self.signal
where the last signal that was produced gets stored.For example:
c3/c3/generator/devices.py
Lines 926 to 931 in 815bf32
We should instead store all signals generated in the generator object by doing something like
For this to work we would have to make sure that when taking elements from the signal stack they aren't popped.
However, this creates a problem:
Imagine your generator stack has the following devices:
LO, LO_noise, AWG, AWG_noise, Mixer
where the
LO_noise
andAWG_noise
take 1 input and have 1 output.Then the popping works because the mixer will find in the stack the noisy AWG output and the noisy LO output.
If we don't pop the stack when we get to the mixer would have the outputs:
[LO, LO_noise, AWG, AWG_noise]
And won't know that it needs to take the 2nd and 4th elements of the stack.
This leads to the point that we need to implement a more general (and more intuitive) signal generation chain that is a directed graph.
One way to do this would be when specifying the chain you specify the inputs.
What is currently:
could become:
where the first element of each tuple is the device that needs to make a signal and the others are the inputs.
This is to get closer to the point where we truly have a directed graph.
The tuple structure is just a suggestion but anything would do even:
I'm aware this is a more annoying to setup but it does make more sense to someone that isn't familiar with the stack and how to make it work for new devices.
[thanks @GlaserN for the input]
The text was updated successfully, but these errors were encountered: