Closed jjmartinezQT closed 2 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 95.81%. Comparing base (
b037fca
) to head (f5664cf
). Report is 1 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Is this the only requirement from QM needed to connect multiple experiments? are there some restrictions in terms of no overlaping input channels or some sort of condition that can couse a crash?
As reported by Yifei the way to do it is to set this flag to True and ensure qm.close() is done every time (see description of this PR for when that happens in Qililab), I assume to not have zombie virtual machines all around or not to reach a limit. The overlapping of input channels I believe it should be a matter of configuration (runcard) but we need to test it with the experimentalists.
This change could lead to a hanging QM that is not closed.
Imagine the scenario that you execute a QProgram, the QM is opened, but something goes wrong in the QUA execution in hardware. For example, the user uses a loop with a very large arbitrary array and memory overflow happens (Jordi had this issue at some point). The python execution is halted and
qm.close()
is never called. Withclose_other_machines=True
this was not an issue for the next QProgram execution. Withclose_other_machines=False
there will be a port conflict when trying to open the second QM.I believe we should add some kind of
try/finally
to close the QM in any case.
Makes sense, where do you suggest to try close the QM, execute_qprogram method?
Seems ok for me! 💯 Have we test it in hardware with some on purpose exceptions?
Also, this might be changed in the future implementation of Session, since it will be responsible for handling these errors.
ps: to clarify, it has been used by experimentalists over and over this branch, even when it crashes they can continue working without issue, so I will take that as hardware test.
Not yet tested in hardware, looking for the way to test it with the minimum impact to the guys measuring. Need to generate the on purpose exceptions, or a meaningful way to test this on hardware.
Setting the flag to allow multiple QM virtual machines at once. I think the qm.close is already executed when turning off the instrument, so if experimentalist do platform.disconnect() after each experiment, the virtual machine will be wipped off and not left floating around.