qua-platform / py-qua-tools

Tools for enhancing your quantum experiments
BSD 3-Clause "New" or "Revised" License
39 stars 19 forks source link

Fix voltage book-keeping error introduced in #211 #220

Closed matpompili closed 4 months ago

matpompili commented 4 months ago

In #211 I introduced an error: when calling set_amplitude with value 0.0, the value on the OPX is correctly updated, but the record in the python program is not, breaking following updates.

Remember to:

yomach commented 4 months ago

Hi @matpompili, Thanks for the PR and for fixing the bug. While I originally wrote this, I think it is confusing to use only the value variable and change it's meaning. I prefer the creation of more variables such that the code behavior is explicit.

Please see my changes and let me know what you think.

matpompili commented 4 months ago

@yomach I think your version doesn't work: the qua program behaves differently depending on the value:

Your version always sends the set_value (the actual voltage) but that's not what the qua program expects. I agree that it is a bit confusing.

yomach commented 4 months ago

Yes, you're right... I'll fix it

matpompili commented 4 months ago

LGTM, will test on hardware and let you know.

matpompili commented 4 months ago

Tested, works as expected for positive, negative and zero voltages.